GitHub user sebi-hgdata opened a pull request:

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

    Adding support for defining custom swagger parameters

    Hey,
       This PR adds support for defining swagger custom operation parameters in 
rest routes. 
        It has the options for specifying every swagger parameter option.
    
       An example route:
      rest("products")
                            .get("{url}").description("queries products by url")
                            
.produces("application/json").outTypeList(Product.class)
                           
.restParam().name("startDate").required(true).description("first verified 
date").type("query").endParam()
                            
.restParam().name("headerName").required(false).description("some header 
desc").type("header").endParam()
                            .route().processRef("validator").process(proc)
                            .marshal().json(JsonLibrary.Jackson).endRest();
    
     This will add 1 query param  and one header param  in the swagger json.
    
    Thanks
    


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

    $ git pull https://github.com/sebi-hgdata/camel 
sebi/swagger_param_definition

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

    https://github.com/apache/camel/pull/515.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 #515
    
----
commit a84f612f1689d19b59d4749cb466c4a747eccb72
Author: sebi <s...@softvision.ro>
Date:   2015-05-13T16:30:57Z

    adding swagger custom paramater definition

commit 1f4e6e6a27d44e4020c134b4fe96594b91eb4b43
Author: sebi <s...@softvision.ro>
Date:   2015-05-14T09:36:53Z

    removing some formating

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to