I am using the raml-to-jaxrs plugin to generate code for both a server and a client. However, I am having some difficulty to create the client code. Partially this is because the functions of the interfaces do not return the actual return types, but a response object wrapped around the return entity.
Is it possible to generate the interfaces where the return types are from the generated model classes? This could be used by the client, but also by a jersey server.
I tried looking at raml-to-pojo, but I found it does not generate any interfaces for the resource locations, and even if it would, I suppose it would not annotate them with the jax-rs annotations, since I still do need those.
What I did come up with is use the generated server code at the client side, and use reflection to figure out what "respond200WithXXX" builder I should use. This does create a valid response object, but then still I end up with an OUTbound response which is of no use for the client.
I am using the raml-to-jaxrs plugin to generate code for both a server and a client. However, I am having some difficulty to create the client code. Partially this is because the functions of the interfaces do not return the actual return types, but a response object wrapped around the return entity.
Is it possible to generate the interfaces where the return types are from the generated model classes? This could be used by the client, but also by a jersey server.
I tried looking at raml-to-pojo, but I found it does not generate any interfaces for the resource locations, and even if it would, I suppose it would not annotate them with the jax-rs annotations, since I still do need those.
What I did come up with is use the generated server code at the client side, and use reflection to figure out what "respond200WithXXX" builder I should use. This does create a valid response object, but then still I end up with an OUTbound response which is of no use for the client.