You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/05/09 07:23:00 UTC
[jira] [Resolved] (CAMEL-18065) OpenApi Specification Generator - Support multiple tags for an operation
[ https://issues.apache.org/jira/browse/CAMEL-18065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-18065.
---------------------------------
Fix Version/s: 3.17.0
Resolution: Fixed
> OpenApi Specification Generator - Support multiple tags for an operation
> ------------------------------------------------------------------------
>
> Key: CAMEL-18065
> URL: https://issues.apache.org/jira/browse/CAMEL-18065
> Project: Camel
> Issue Type: Improvement
> Components: camel-openapi-java
> Affects Versions: 3.14.2
> Reporter: Johnathan Ingram
> Priority: Minor
> Fix For: 3.17.0
>
>
> 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
> {code:java}
> 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")
> ; {code}
> Will produce the following OpenAPI specification
> {code:java}
> ...
> "/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"
> } ]
> ....{code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)