Closed piotrooo closed 3 months ago
@piotrooo,
This is related to https://docs.swagger.io/swagger-core/v2.2.22/apidocs/io/swagger/v3/oas/annotations/tags/Tag.html
When applied at method or class level, if only a name is provided, the tag will be added to operation only; if additional fields are also defined, like description or externalDocs, the Tag will also be added to openAPI.tags field
Describe the bug
Following example:
doesn't produce a global tag because it lacks a
description
attribute.When I define a:
the global tags are generated correctly.
To Reproduce
Expected behavior
The
@Tag
annotation at the type level should generate global tags as well.Additional context
In the
@OpenAPIDefinition
generation method, theAnnotationsUtils.getTags(apiDef.tags(), false)
method is used with afalse
flag, which allows registering tags without a description. For type handling, the same method is used withtrue
flag.