[ 
https://issues.apache.org/jira/browse/CAMEL-18065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17533625#comment-17533625
 ] 

Johnathan Ingram commented on CAMEL-18065:
------------------------------------------

{color:#000000}Hi{color}

Pull request done, please see comment on 18066

> 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
>
> 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)

Reply via email to