[jira] [Commented] (CAMEL-17040) rest-dsl - Add option to return http 204 when no data in response

2022-02-17 Thread Neo Xu (Jira)


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

Neo Xu commented on CAMEL-17040:


I think it should be the place since [RestProducer.java] pass values to 
[RestProducerBindingProcessor.java]

> rest-dsl - Add option to return http 204 when no data in response
> -
>
> Key: CAMEL-17040
> URL: https://issues.apache.org/jira/browse/CAMEL-17040
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core, rest
>Reporter: Claus Ibsen
>Priority: Major
> Fix For: 3.x
>
>
> For example if you have a json response as an empty list, then you can get a 
> 200 OK with [] as response.
> Or with an XML then it may be an empty xml root object.
> It may be desirable to have an option you can set to true to let Camel 
> auto-detect this and return no body and 204 instead.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (CAMEL-17040) rest-dsl - Add option to return http 204 when no data in response

2022-02-16 Thread Neo Xu (Jira)


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

Neo Xu commented on CAMEL-17040:


Is RestProducerBindingProcessor the out point to check enableAutoDetect and set 
204?
{code:java}
org.apache.camel.component.rest.RestProducerBindingProcessor.RestProducerBindingUnmarshalCallback#doDone
 {code}



By the way, I have added enableAutoDetect to the following files. I need some 
help to check the out point. 
{code:java}
modified:   
core/camel-api/src/main/java/org/apache/camel/spi/RestConfiguration.java
        modified:   
core/camel-core-engine/src/generated/java/org/apache/camel/impl/RestConfigurationConfigurer.java
        modified:   
core/camel-core-model/src/generated/resources/org/apache/camel/model/rest/delete.json
        modified:   
core/camel-core-model/src/generated/resources/org/apache/camel/model/rest/get.json
        modified:   
core/camel-core-model/src/generated/resources/org/apache/camel/model/rest/head.json
        modified:   
core/camel-core-model/src/generated/resources/org/apache/camel/model/rest/patch.json
        modified:   
core/camel-core-model/src/generated/resources/org/apache/camel/model/rest/post.json
        modified:   
core/camel-core-model/src/generated/resources/org/apache/camel/model/rest/put.json
        modified:   
core/camel-core-model/src/generated/resources/org/apache/camel/model/rest/restBinding.json
        modified:   
core/camel-core-model/src/generated/resources/org/apache/camel/model/rest/restConfiguration.json
        modified:   
core/camel-core-model/src/generated/resources/org/apache/camel/model/rest/verb.json
        modified:   
core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java
        modified:   
core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestConfigurationDefinition.java
        modified:   
core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java
        modified:   
core/camel-core-model/src/main/java/org/apache/camel/model/rest/VerbDefinition.java
        modified:   
core/camel-core-processor/src/main/java/org/apache/camel/processor/RestBindingAdvice.java
        modified:   
core/camel-core-reifier/src/main/java/org/apache/camel/reifier/rest/RestBindingReifier.java
        modified:   
core/camel-main/src/generated/java/org/apache/camel/main/RestConfigurationPropertiesConfigurer.java
        modified:   
core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
        modified:   
dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
 {code}

> rest-dsl - Add option to return http 204 when no data in response
> -
>
> Key: CAMEL-17040
> URL: https://issues.apache.org/jira/browse/CAMEL-17040
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core, rest
>Reporter: Claus Ibsen
>Priority: Major
> Fix For: 3.x
>
>
> For example if you have a json response as an empty list, then you can get a 
> 200 OK with [] as response.
> Or with an XML then it may be an empty xml root object.
> It may be desirable to have an option you can set to true to let Camel 
> auto-detect this and return no body and 204 instead.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (CAMEL-17040) rest-dsl - Add option to return http 204 when no data in response

2022-02-15 Thread Claus Ibsen (Jira)


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

Claus Ibsen commented on CAMEL-17040:
-

Yeah an empty string or null body etc

> rest-dsl - Add option to return http 204 when no data in response
> -
>
> Key: CAMEL-17040
> URL: https://issues.apache.org/jira/browse/CAMEL-17040
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core, rest
>Reporter: Claus Ibsen
>Priority: Major
> Fix For: 3.x
>
>
> For example if you have a json response as an empty list, then you can get a 
> 200 OK with [] as response.
> Or with an XML then it may be an empty xml root object.
> It may be desirable to have an option you can set to true to let Camel 
> auto-detect this and return no body and 204 instead.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (CAMEL-17040) rest-dsl - Add option to return http 204 when no data in response

2022-02-15 Thread Neo Xu (Jira)


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

Neo Xu commented on CAMEL-17040:


If it is json response, can it be three different cases [], {}, ""?

> rest-dsl - Add option to return http 204 when no data in response
> -
>
> Key: CAMEL-17040
> URL: https://issues.apache.org/jira/browse/CAMEL-17040
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core, rest
>Reporter: Claus Ibsen
>Priority: Major
> Fix For: 3.x
>
>
> For example if you have a json response as an empty list, then you can get a 
> 200 OK with [] as response.
> Or with an XML then it may be an empty xml root object.
> It may be desirable to have an option you can set to true to let Camel 
> auto-detect this and return no body and 204 instead.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)