-
-
Notifications
You must be signed in to change notification settings - Fork 535
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When an operation has tags applied at both the class and method level, only the class level tags are applied.
To Reproduce
Steps to reproduce the behavior:
-
What version of spring-boot you are using?
- 2.6.2
-
What modules and versions of springdoc-openapi are you using?
- springdoc-openapi-ui 1.6.3
-
Provide with a sample code (HelloController) or Test that reproduces the problem
@RestController @RequestMapping("/api/v1/hello") @Tag(name = "SomeTag") public class HelloController { @GetMapping(produces = "application/json") @Operation( description = "Get a hello message", tags = {"SomeOtherTag"}, responses = { @ApiResponse(responseCode = "200", description = "A hello message"), } ) public ResponseEntity<String> getHelloMessage() { return ResponseEntity.ok("Hello World"); } }
Expected behavior
The following json is produced
{
"tags" : ["SomeTag", "SomeOtherTag"],
"paths" : {
"/api/v1/hello": {
"get": {
"tags" : ["SomeTag", "SomeOtherTag"]
}
}
}
}
What is actually produced:
{
"tags" : ["SomeTag"],
"paths" : {
"/api/v1/hello": {
"get": {
"tags" : ["SomeTag"]
}
}
}
}
Additional context
When the class level @Tag
is removed the tag on the @Operation
appears.
The desired behaviour was observed in version 1.2.22
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working