Open GustavSchneider opened 5 years ago
That's weird, because I have an example that generates the @Valid annotations in the method:
raml-to-jaxrs/examples/maven-examples/raml-defined-example
That said, something is wrong. I'll check on my train ride home tonight.
As to the parameters, they are ripped from jsonschematopojo doc. I'll check if you have the right one.
We are currently experiencing build problems. You can build by hand by checking out raml-java-tools on branch 1.0.6 and building, and checking out this branch to do the same. I'll merge to 3.0.6 this PM.
The patch seems to solve my problem. Thank you!
I am currently working on a project which builds on raml-to-jax-rs-maven-plugin to generate types from RAML and JSON schemas. I've run into some problems which I have not been able to resolve. I've made a small example project to demonstrate my problem, the pom.xml file is pretty much identical to the main project.
I want jsr-303 annotations to be generated and the tool manages to generate most of them. The problem is that I want
@Valid
to be generated for the input of the interface method which I have not found a way to accomplish. For example in the example project we have one single endpoint "myendpoint" which a client should be able to sent POST request to. The types are specified using JSON schema. The abstract method responsible for handling the POST request is currently generated as:Because the server uses Jerseys bean validation I want this method to look something like:
All the files generated in the build process can be found here. Validation of the input works if I add
@Valid
manually. What would be the best way of accomplish this? The most relevant part of the pom.xml file looks as follows:On a side note I am also a little confused that I was able to get the tool to generate jsr-303 annotation when setting
<isIncludeJsr303Annotations>
to true but not<includeJsr303Annotations>
.