-
-
Notifications
You must be signed in to change notification settings - Fork 543
Closed
Description
Describe the bug
one content type (a/a) is ignored
To Reproduce
Steps to reproduce the behavior:
- What is the actual and the expected result using OpenAPI Description (yml or json)?
input:
@Operation(description = "a")
@GetMapping(path = "/", produces = "a/a")
public String a() {
return "A";
}
@Operation(description = "b")
@GetMapping(path = "/", produces = "b/b")
public String b() {
return "B";
}
actual result:
"content":{
"b/b":{
"schema":{
"type":"string"
}
}
}
- Provide with a sample code (HelloController) or Test that reproduces the problem
#2477 buildApiResponses ignores produced ContentType in case of many @Operation #2478
A bug and solution are probably in GenericResponseService.java
:
https://github.com/springdoc/springdoc-openapi/pull/2478/files#diff-bde5de3f4d4588ddcb3a1efb697aa8fc5fd857d63bc4e1d003d10d55d1e973cf
Expected behavior
"responses":{
"200":{
"description":"OK",
"content":{
"b/b":{
"schema":{
"type":"string"
}
}
,"a/a":{
"schema":{
"type":"string"
}
}
}
}
}
Metadata
Metadata
Assignees
Labels
No labels