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 2015/07/11 09:18:04 UTC

[jira] [Commented] (CAMEL-6543) provide a way to expose common header names, types and payload types for endpoints

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

Claus Ibsen commented on CAMEL-6543:
------------------------------------

Yeah something we need to ponder about. Now we got the components to be auto documented for their options. We should look into how to get meta-data about the payload.

For the headers we need to add some kind of annotation that the apt plugin can detect and include in the docs. Similar we can have some meta-data in the @UriEndpoint that can provide information about the payload.

> provide a way to expose common header names, types and payload types for endpoints
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-6543
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6543
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: james strachan
>            Assignee: Grzegorz Grzybek
>             Fix For: Future
>
>
> Given a configuration of an Endpoint, it'd be nice if there was a way for endpoints to expose what a consumer will receive up front (at design time, before it actually runs), in terms of headers (their name & types) and the payload type.
> Most of this is documented on the wiki in places already - its useful stuff to konw; but there's no way to introspect an endpoint and know this (so we can, for example, visualise the things exposed by an endpoint - or provide better validation of what can connect to what, what will work or fail; what type conversions could be done after consuming from an endpoint, what headers are available by default in expression languages and so forth.
> I guess other steps in a camel flow can change this data too (e.g. adding/removing headers, changing the payload value).
> But as a start - and endpoint consumer specific plugin would be great.
> e.g. maybe we can add a new method to ComponentConfiguration which allows endpoints to return the header/payload metadata (if its known)
> https://cwiki.apache.org/confluence/display/CAMEL/ComponentConfiguration
> We could maybe add some annotations, metadata or code which could then be introspected by the generated endpoint documentation:
> https://cwiki.apache.org/confluence/display/CAMEL/Endpoint+Annotations
> afterall we often define constants for the header values already for a component; so it would be easy to add an annotation and have them discovered; its mostly just being able to find all the headers exposed by default (and which are optional I guess) on messages from an endpoint.



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