mulesoft-labs / raml-for-jax-rs

This project is all about two way transformation of JAX-RS-annotated Java code to RAML API description and back.
Other
295 stars 181 forks source link

Support for Response objects #203

Open petrochenko-pavel-a opened 7 years ago

petrochenko-pavel-a commented 7 years ago

Currently Java->RAML is not able to infer actual schema class when using Response objects, it would be nice to support it in some monent.

Hi,

I am using jaxrs-raml maven plugin to generate raml file.

When i use return type as jax-rs method return type as Response.class building my response object inside it, Not getting the schema generated for my response object

@Path @Consumes @Produces public Response getDetails() { response = Response.OK(baseobject).build(); return response; }

In this case I am not getting schema generated fir my baseobject , where as when it is @Path @Consumes @Produces public BaseObject getDetails() { return baseobject; }

In this case , schema is generated properly.

Can anyone help on this? since have existing rest services trying to document without making much changes in it?

Regards, Pavel

ymamakis commented 7 years ago

Hello, I was wondering whether it still applies for the 2.0.x version of jaxrs-to-raml as I seem to be having exactly the same issue with jaxrs Response in the jaxrs-to-raml-maven-plugin

abhyankartushar commented 7 years ago

@ymamakis - I am also facing similar issue, I am using 2.1.0 version of jaxrs-to-raml but not able to generate schema for my Response object.

@petrochenko-pavel-a can you suggest something?