Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.14.2
-
None
-
Unknown
Description
Hi
The OpenAPI specification supports multiple tags per operation allowing applications to use the tags for custom purposes. Camel only supports 1 tag per operation.
https://swagger.io/docs/specification/grouping-operations-with-tags/
Add support for , delimited values in the setTag() method.
The generator can will utilise this metadata with , delimiters to set multiple tags on the Oas object to represent multiple tags in the schema generated.
The following OpenApi metadata
rest("/tag") .get("single") .tag("Organisation") .consumes("application/json") .produces("application/json") .to("log:bye") ; rest("/tag") .get("multiple/a") .tag("Organisation,Group A") .consumes("application/json") .produces("application/json") .to("log:bye") ; rest("/tag") .get("multiple/b") .tag("Organisation,Group B") .consumes("application/json") .produces("application/json") .to("log:bye") ;
Will produce the following OpenAPI specification
... "/tag/single" : { "get" : { "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "tags" : [ "Organisation" ], ... "/tag/multiple/a" : { "get" : { "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "tags" : [ "Organisation", "Group A" ], ... "/tag/multiple/b" : { "get" : { "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "tags" : [ "Organisation", "Group B" ], ... "tags" : [ { "name" : "Group B" }, { "name" : "Organisation" }, { "name" : "Group A" }, { "name" : "/hello" } ] ....
Attachments
Issue Links
- links to