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

ASF GitHub Bot commented on CAMEL-10932:
----------------------------------------

GitHub user zregvart opened a pull request:

    https://github.com/apache/camel/pull/1504

    CAMEL-10932 REST Swagger component

    Submitted for review, thanks in advance for your feedback :+1: 
    
    This includes the initial implementation of the `rest-swagger` component
    that allows for a higher level abstraction over the REST API usage from
    other Camel components that implement the `RestProducerFactory` SPI
    combined with Swagger (Open API) specifications.
    
    The most simple usage would be:
    
        to("rest-swagger:getPetById?endpoint=https://api.petstore.com";)
    
    Which would pick up the Swagger specification from `swagger.json` and
    try to find a single component that implements the `RestProducerFactory`
    SPI.
    
    Typical use case would be specifying the component to delegate to and
    the path to the specification file, assuming that client configured and
    added `petstore` component to the Camel context:
    
        to("rest-swagger:getPetById:apis/petstore.json?"
           + "endpoint=https://api.petstore.com";
           + "&componentName=petstore"
          )

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zregvart/camel CAMEL-10932

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1504.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1504
    
----
commit d3daf72ecaacb2e9bd992037dfb169635b8d8e84
Author: Zoran Regvart <[email protected]>
Date:   2017-03-03T11:40:54Z

    CAMEL-10932 REST Swagger component
    
    This includes the initial implementation of the `rest-swagger` component
    that allows for a higher level abstraction over the REST API usage from
    other Camel components that implement the `RestProducerFactory` SPI
    combined with Swagger (Open API) specifications.
    
    The most simple usage would be:
    
        to("rest-swagger:getPetById?endpoint=https://api.petstore.com";)
    
    Which would pick up the Swagger specification from `swagger.json` and
    try to find a single component that implements the `RestProducerFactory`
    SPI.
    
    Typical use case would be specifying the component to delegate to and
    the path to the specification file, assuming that client configured and
    added `petstore` component to the Camel context:
    
        to("rest-swagger:getPetById:apis/petstore.json?"
           + "endpoint=https://api.petstore.com";
           + "&componentName=petstore"
          )

----


> REST Swagger component
> ----------------------
>
>                 Key: CAMEL-10932
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10932
>             Project: Camel
>          Issue Type: New Feature
>    Affects Versions: 2.19.0
>            Reporter: Zoran Regvart
>            Assignee: Zoran Regvart
>            Priority: Minor
>
> As a result of discussion resulting from CAMEL-10809 ([GitHub PR 
> comment|https://github.com/apache/camel/pull/1454#issuecomment-279324224] a 
> need for a {{rest-swagger}} component has arisen.
> A component that would leverage the SPI support introduced in CAMEL-10164 and 
> create REST endpoints preconfigured with the Swagger specification. This 
> would allow choosing the _client_ component (e.g. http4, jetty, undertow...) 
> and have a higher level abstraction over the REST API.
> I think a good start would getting the Producer support first, and than 
> expand into specification first design for Consumers.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to