You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Yauheni ts (JIRA)" <ji...@apache.org> on 2016/01/25 14:40:39 UTC

[jira] [Commented] (CAMEL-9129) Create OptionsVerbDefinition - REST

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

Yauheni ts commented on CAMEL-9129:
-----------------------------------

It looks like one change was missed. 
In org\apache\camel\model\rest\jaxb.index -> OptionsVerbDefinition.

In org.apache.camel.model.ModelHelper  dumpModelAsXml  will create 
        <verb routeId="route1">
            <route rest="true" id="route1">
             ............
            </route>
        </verb>
and then VerbDefinition insted of OptionsVerbDefinition.

Next in RestSwaggerReader.class
method ->  private void parse(Swagger swagger, RestDefinition rest, String camelContextId, ClassResolver classResolver) 
will fail on String method = verb.asVerb().toLowerCase(Locale.US) as asVerb will return null for VerbDefinition.
Checked on  netty4-http rest component.

> Create OptionsVerbDefinition - REST
> -----------------------------------
>
>                 Key: CAMEL-9129
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9129
>             Project: Camel
>          Issue Type: New Feature
>          Components: rest
>    Affects Versions: 2.15.3
>            Reporter: Charles Moulliard
>            Assignee: Charles Moulliard
>             Fix For: 2.16.0, 2.15.4
>
>
> Some API like Swagger sends HTTP OPTIONS method request (http://restcookbook.com/HTTP%20Methods/options/) to get, when CORS is enable, the CORS HTTP Headers (Access-Control-Allow-*) prior to run a POST/PUT or DELETE operation
> A workaround has been proposed to pass using the verb("") method the ("OPTIONS") (see camel-8373) - but it should be better that we propose also a OptionsVerbDefinition.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)