phoenixnap / springmvc-raml-plugin

Spring MVC - RAML Spec Synchroniser Plugin. A Maven plugin designed to Generate Server & Client code in Spring from a RAML API descriptor and conversely, a RAML API document from the SpringMVC Server implementation.
Apache License 2.0
136 stars 84 forks source link

queryParameters from nested traits is not honored in generated code #287

Open techpavan opened 5 years ago

techpavan commented 5 years ago

Found that applying the workaround in #283 by using required: false rather than short-hand notation is effective only when traits are directly referenced. If a trait is referring to a different trait which has queryParameters, the nested trait's queryParameters do not reflect in the generated code.

Reproducer - Clone the code from https://github.com/techpavan/springmvc-raml-plugin-issues/ and check the code generated to list all the bus brands against for the car brands.

stojsavljevic commented 5 years ago

Can you please check if the issue is related to raml-parser-2? There is a link to raml-parser-2 bug in #283 where you can find the way to reproduce issues with the parser.

techpavan commented 5 years ago

Right. Its an issue from the raml-parser-2 project. Have submitted an issue there.

https://github.com/raml-org/raml-java-parser/issues/558