Closed ullgren closed 6 years ago
Hi, Thanks for the raising this issue. I would say number 3, the only problem is that we will break any existing client already generated as this is an api breaking change. So we should think if it worth adding a property to work as is used to, new behaviour should be by default but allow people to turn it off and log saying it is the deprecated mode and it will be deleted in next version.
What do you think? Do you need any help?
Sounds like a good compromise.
I've started looking at it but since it is the first time diving into codemodel it might take some time for me so if anybody has the time to complete it before I will not object :-)
This initial attempt should not be seen as a final solution just a proof of concept for now.
We have several APIs where part of the response is send as headers in the HTTP response. The way the the generator generates the client code there is no way to get this information since it is not stored in the generated model classes nor is the javax.ws.rs.core.Response object accessible to the program calling the generated resource client.
I can see three possible solutions to this:
/users
resource in the example).Before I go ahead and implement a solution I would like to know which of these, or any other, is more likely to get accepted by the project.
Here is a fork where I've added a response header to the api.raml file. https://github.com/ullgren/raml-java-client-generator/tree/handle-response-headers