[jira] [Commented] (CAMEL-15998) Camel-Github: Better structure for consumer returned object

2021-01-15 Thread Andrea Cosentino (Jira)


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

Andrea Cosentino commented on CAMEL-15998:
--

Fixed.

> Camel-Github: Better structure for consumer returned object
> ---
>
> Key: CAMEL-15998
> URL: https://issues.apache.org/jira/browse/CAMEL-15998
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-git
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 3.8.0
>
>
> We can specify something more through headers. The problem is similar to 
> camel-git, we need to have a plain type as body and enrich the information 
> through headers. It will be much more easier to use, instead of having to 
> deal with egit pojos



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-15998) Camel-Github: Better structure for consumer returned object

2021-01-15 Thread Andrea Cosentino (Jira)


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

Andrea Cosentino commented on CAMEL-15998:
--

Yeah, it's a copy/paste problem.

In this case the fields are just a subset of the original pojo. I don't think 
there is any values in having the whole Pojo, also end user may not know what 
kind of class will be in the body (for our fault, because it's not always well 
documented).

In this case I think the essential information are returned.

> Camel-Github: Better structure for consumer returned object
> ---
>
> Key: CAMEL-15998
> URL: https://issues.apache.org/jira/browse/CAMEL-15998
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-git
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 3.8.0
>
>
> We can specify something more through headers. The problem is similar to 
> camel-git, we need to have a plain type as body and enrich the information 
> through headers. It will be much more easier to use, instead of having to 
> deal with egit pojos



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-15998) Camel-Github: Better structure for consumer returned object

2021-01-15 Thread Babak Vahdat (Jira)


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

Babak Vahdat commented on CAMEL-15998:
--

Hi

I think we override one set header value with another one:

[https://github.com/apache/camel/blob/bd790e5afb5bd3d4fbe294138d4b0be111717847/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/CommitConsumer.java#L75-L76]

Maybe it needs another header name for that?

And IMHO the downside of these changes is that as the github and / or git APIs 
evolve through time with more properties in those exposed POJOs of them then we 
continuously need to add them to the corresponding new headers as the time 
passes by. This however would not be necessary in case of the original 
implementation.

> Camel-Github: Better structure for consumer returned object
> ---
>
> Key: CAMEL-15998
> URL: https://issues.apache.org/jira/browse/CAMEL-15998
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-git
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 3.8.0
>
>
> We can specify something more through headers. The problem is similar to 
> camel-git, we need to have a plain type as body and enrich the information 
> through headers. It will be much more easier to use, instead of having to 
> deal with egit pojos



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-15998) Camel-Github: Better structure for consumer returned object

2021-01-14 Thread Andrea Cosentino (Jira)


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

Andrea Cosentino commented on CAMEL-15998:
--

Done for commit and events. The other consumers provides complex object, so 
it's not so easy to define what to put in the body and what in headers.

> Camel-Github: Better structure for consumer returned object
> ---
>
> Key: CAMEL-15998
> URL: https://issues.apache.org/jira/browse/CAMEL-15998
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-git
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 3.8.0
>
>
> We can specify something more through headers. The problem is similar to 
> camel-git, we need to have a plain type as body and enrich the information 
> through headers. It will be much more easier to use, instead of having to 
> deal with egit pojos



--
This message was sent by Atlassian Jira
(v8.3.4#803005)