You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by mstittle <ms...@gmail.com> on 2016/02/23 20:18:56 UTC

swagger operationid parameter

Trying to set the operationId on the io.swagger.models.Operation class
associated with a REST DSL route. looking at the source code I don't see
that it is set anywhere. The operationid seems to be defaulting to the path
and since we have a version number in the path like v.1.0.0 this is causing
problems with Swagger CodeGen.


        for (VerbDefinition verb : verbs) {

// set operationId ?????

            // the method must be in lower case
            String method = verb.asVerb().toLowerCase(Locale.US);
            // operation path is a key
            String opPath = SwaggerHelper.buildUrl(basePath, verb.getUri());

            Operation op = new Operation();
            if (ObjectHelper.isNotEmpty(pathAsTag)) {
                // group in the same tag
                op.addTag(pathAsTag);
            }



--
View this message in context: http://camel.465427.n5.nabble.com/swagger-operationid-parameter-tp5778141.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: swagger operationid parameter

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Ah yeah we can improve this. You are welcome log a JIRA ticket
http://camel.apache.org/support.html

And can you maybe if possible post what error you see in swagger?

On Tue, Feb 23, 2016 at 8:18 PM, mstittle <ms...@gmail.com> wrote:
>
> Trying to set the operationId on the io.swagger.models.Operation class
> associated with a REST DSL route. looking at the source code I don't see
> that it is set anywhere. The operationid seems to be defaulting to the path
> and since we have a version number in the path like v.1.0.0 this is causing
> problems with Swagger CodeGen.
>
>
>         for (VerbDefinition verb : verbs) {
>
> // set operationId ?????
>
>             // the method must be in lower case
>             String method = verb.asVerb().toLowerCase(Locale.US);
>             // operation path is a key
>             String opPath = SwaggerHelper.buildUrl(basePath, verb.getUri());
>
>             Operation op = new Operation();
>             if (ObjectHelper.isNotEmpty(pathAsTag)) {
>                 // group in the same tag
>                 op.addTag(pathAsTag);
>             }
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/swagger-operationid-parameter-tp5778141.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2