You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2017/02/26 08:29:44 UTC

[jira] [Commented] (CAMEL-7851) startup or APT plugin to help generate compile time (or startup) metadata about endpoints and their types so we can catch failures sooner?

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

Claus Ibsen commented on CAMEL-7851:
------------------------------------

There is the new contract / validate stuff which can help with this, and can allow Camel to detect missing stuff at startup or something

https://github.com/apache/camel/blob/master/camel-core/src/main/docs/transformer.adoc

> startup or APT plugin to help generate compile time (or startup) metadata about endpoints and their types so we can catch failures sooner?
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-7851
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7851
>             Project: Camel
>          Issue Type: New Feature
>            Reporter: james strachan
>
> It would be awesome if we could generate compile time errors if we do not have a type converter available ASAP - rather than waiting for that exact step in the flow to be fired at runtime.
> If we know endpoint A consumes PurchaseOrder objects and endpoint B consumes Invoice objects (e.g. via Bindings or https://issues.apache.org/jira/browse/CAMEL-6543); then we are going to need a type converter from PurchaseOrder to Invoice.
> It'd be great to have as much compile time/startup checks as possible to validate available converters where possible; and to help command line / maven / IDE tooling to auto-generate the missing converters as required.
> Maybe we need an APT plugin which is capable of starting a JVM but not actually starting any of the camel routes; then validating the bindings/endpoint types and finding all the conversions that the runtime will use and verifying the type converters are all there? Or it could happen at startup before camel starts up?
> Then we could have maven plugins / CLI tools / IDE tools to automatically create any required conversions (e.g. auto-defaulting best guess conversions using naming conventions etc)



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