-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
When adding the same tag on two different controllers it adds the tag twice under tags.
It does add them correctly under the paths but because it is added twice under tags the openapi spec is invalid.
It would be nice to add the same tag on multiple controllers so I can group them.
So the following code:
@Tag(name = "test")
@Controller("/test1")
public class ExampleController {
@Get
public String test() {
return "test";
}
}
@Tag(name = "test")
@Controller("/test2")
public class ExampleController2 {
@Get
public String test() {
return "test";
}
}
Generatates the following openapi spec:
{
"openapi" : "3.0.1",
"info" : {
"title" : "",
"version" : ""
},
"servers" : [
{
"url" : "localhost:8080",
"description" : "local testing"
}
],
"tags" : [
{
"name" : "test",
"description" : ""
},
{
"name" : "test",
"description" : ""
}
],
"paths" : {
"/test1" : {
"get" : {
"tags" : [
"test"
],
"summary" : "",
"description" : "",
"responses" : {
"200" : {
"description" : "",
"content" : {
"application/json" : {
"schema" : {
"type" : "string"
}
}
}
}
}
}
},
"/test2" : {
"get" : {
"tags" : [
"test"
],
"summary" : "",
"description" : "",
"responses" : {
"200" : {
"description" : "",
"content" : {
"application/json" : {
"schema" : {
"type" : "string"
}
}
}
}
}
}
}
}
}
Metadata
Metadata
Assignees
Labels
No labels