Closed gr423 closed 6 years ago
@jstoiko Hi Jonathan, Please can you help here , Basically i want to validate each element of the collection , which is provided by the Javax validation . But since the @valid annotation is missed on the List type in the generated code, i'm missing on the validation of the List elements .
Thanks in advance, Ramya
Just back from vacation, looking at it.
includeAdditionalproperties is made false , but still the java objects generated has the field.
Have you tried the current snapshot ? I've fixed that, I think.
For the @Valid annotation, I will add it if the list contains an object type or union type (as opposed to a list type or primitive type).
String and integers require custom annotations. I know that java 8 supports annotating generic types, but right now, we have to support java 7 and this would be a major change. You could still pull it off with a plugin.
@gr423 , could you try the SNAPSHOT please ? (On branch 3.0.3)
@jpbelang , Its working :) Thank you !! The @Valid annotation is getting generated on the list type and the validations are working. I did take the the release 3.0.3 snapshot version and built the project. Since i build the raml-to-jaxrs project locally i was able to use raml-to-jaxrs-maven-plugin with 3.0.3-SNAPSHOT version .
Can we expect the same version in maven repository . Sorry i'm not sure of the procedure of when the latest version of the projects gets reflected in the maven repo . Can you please throw some light on this updates .
Thanks and Regards, Ramya
The SNAPSHOTS are on mulesoft's repositories (I don't have them here, I'll get them for you tonight).
Building them locally is certainly ok, but if you need to share them between devs, either you upload them to your own repo or point to the mulesoft repo
Sure, let me try this option.
Thank you
On Fri, 24 Aug 2018, 11:40 pm JP Belanger, notifications@github.com wrote:
The SNAPSHOTS are on mulesoft's repositories (I don't have them here, I'll get them for you tonight).
Building them locally is certainly ok, but if you need to share them between devs, either you upload them to your own repo or point to the mulesoft repo
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mulesoft-labs/raml-for-jax-rs/issues/361#issuecomment-415838823, or mute the thread https://github.com/notifications/unsubscribe-auth/AfGuzpm9U1cb6kmRpAFH--2lZiqhfnA_ks5uUEGngaJpZM4V9r0E .
@jpbelang
Hi ,
Since our project would go to production by this month end ,i'm not able to proceed with the SNAPSHOT version .
Please could you let me know , if can expect the release version some time closer.
Or else can you suggest me the alternate, with which i can go ahead doing validations .
Thanks in advance , Ramya S
I have one bit of the Arrays bug that I need to finish, which I should do tomorrow.
I'm trying to release on the week-end.
Thanks for the update . Sure we will wait for the release .
Regards, Ramya
I've just released 3.0.3. it should come up soon on central.
@jpbelang Hi , The RAML exposed endpoints are consumed by CXF Rest Client. But getting the issue of deserialization on retrieving the response . The issue is asked for in stackOverflow. https://stackoverflow.com/questions/52521191/jax-rs-client-cant-deserialize-json-response-returned-from-raml-1-0-generated-cl
Please could you give me some insight here .
Below is generated interface.
@Path("/editorialChannels")
public interface EditorialChannels {
/**
*/
@PUT
@Produces("application/json")
@Consumes("application/json")
PutEditorialChannelsResponse putEditorialChannels(
@Valid com.nagra.opentv.mas.v1.model.EditorialChannels entity);
class PutEditorialChannelsResponse extends ResponseDelegate {
private PutEditorialChannelsResponse(Response response, Object entity) {
super(response, entity);
}
private PutEditorialChannelsResponse(Response response) {
super(response);
}
public static PutEditorialChannelsResponse respond200WithApplicationJson(PutResponse entity) {
Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
responseBuilder.entity(entity);
return new PutEditorialChannelsResponse(responseBuilder.build(), entity);
}
}
}
Hi Team ,
I've the below RAML
Generated Java Objects are as below ,
I'm expecting the @valid annotation on the metadataSet of event .Which is not getting generated. And the JsonMapperConfiguration is never considered while generating the code . includeAdditionalproperties is made false , but still the java objects generated has the field.
Pom File