[
https://issues.apache.org/jira/browse/CAMEL-7487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14034849#comment-14034849
]
ASF GitHub Bot commented on CAMEL-7487:
---------------------------------------
GitHub user dhirajsb opened a pull request:
https://github.com/apache/camel/pull/188
CAMEL-7487 Add support for generating API Component documentation, simplify
generated code further
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dhirajsb/camel camel-7487
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/188.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 #188
----
commit f037c2da57492eac1819e415752f9d2b6585d5d6
Author: Dhiraj Bokde <[email protected]>
Date: 2014-06-13T21:55:54Z
Minor polish, added utility methods for document generation
commit c639b46d2e8e440ea6acfff894a7f5e22a886830
Author: Dhiraj Bokde <[email protected]>
Date: 2014-06-16T19:44:20Z
Initial version of API component documentation report generator MOJO, minor
re-factoring, fixed MOJO logging to use Log4J-SLF4J bridge to work with Maven
3.1.0 logging
commit dee15fb2a59644c00073b5cf922e71896d6776d6
Author: Dhiraj Bokde <[email protected]>
Date: 2014-06-16T19:58:59Z
Added project description to api-component archetype
commit 5dd9cc0f0981603ea1ac8f0f6ee6dfcb7ad56a26
Author: Dhiraj Bokde <[email protected]>
Date: 2014-06-17T04:21:57Z
Fixed ApiMethodHelper to throw RuntimeCamelException with API exception on
InvocationTargetException
commit 7dc2bb13a645c2c2a4dbfc9ec0ed0e5b2a63b914
Author: Dhiraj Bokde <[email protected]>
Date: 2014-06-17T20:50:34Z
Major refactor of API component framework to generify base classes, added
AbstractApiComponent to reduce boilderplate code, minor compiler warnings
removed
commit ef4d0a7ec43f4c702c75aafc3c6cba72ff9b9281
Author: Dhiraj Bokde <[email protected]>
Date: 2014-06-17T22:01:04Z
Moved sample APIs to api package, added bnd instructions in archetype
----
> Create an archetype and code generation plugins to generate Camel Components
> that wrap a third party API
> --------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-7487
> URL: https://issues.apache.org/jira/browse/CAMEL-7487
> Project: Camel
> Issue Type: Improvement
> Components: camel-core, tooling
> Affects Versions: 2.12.4
> Reporter: Dhiraj Bokde
> Assignee: Dhiraj Bokde
> Fix For: 2.12.4
>
>
> The Facebook component took the approach of creating an API model for the
> Facebook4J API and mapping its methods and parameters to its URI endpoint
> using API independent code. This reduced the number of lines of code in the
> component significantly while still being able to expose every operation in
> the Facebook4J API.
> This approach can be made generic, so that an API model can be created for
> any Java Class/Interface that needs to be wrapped by a Camel component. This
> model can either be manually written in a signature file similar to the
> output from the 'javap' command with a method per line with parameter names,
> or automatically generated by parsing Javadoc.
> The method and parameter names then can be mapped to the component's URI
> paths and URI parameters/options. The component could use a map of API name
> path prefixes to several APIs it supports/implements.
> An API-component archetype could generate boilerplate code that uses the
> code-generation plugins that can generate models. The component developer
> then just has to populate with code for actually creating the API proxies.
> Even integration tests can be generated (which use nulls for test values) for
> producer endpoints for the component, and the developer just needs to
> complete the skeleton test with actual values. The producer endpoint code can
> be easily copied and modified to write consumer tests.
> Components may want to customize consumer processing based on the consumer
> capabilities or features of the wrapped API/technology, which can be easily
> done by modifying the generated consumer code.
> This micro-framework for generating Camel components that use API models,
> will significantly reduce the amount of effort and time it takes to wrap any
> API and expose it as a Camel component. The framework is also useful in
> situations where an API is not readily available, but one can be written as a
> Java POJO or Interface and then wrapped as an API component.
--
This message was sent by Atlassian JIRA
(v6.2#6252)