Closed sasagonz closed 6 years ago
It's a bug.
@sasagonz , what version are you using? We had exact same problem, and I fixed it for the plugin. My config looks as follows:
<plugin>
<groupId>com.phoenixnap.oss</groupId>
<artifactId>springmvc-raml-plugin</artifactId>
<version>0.10.13</version>
<configuration>
<ramlPath>src/main/resources/static/api.raml</ramlPath>
<outputRelativePath>target/generated-sources</outputRelativePath>
<addTimestampFolder>false</addTimestampFolder>
<basePackage>com.yuranos.documented.api</basePackage>
<generateUnreferencedSchemas>true</generateUnreferencedSchemas>
<seperateMethodsByContentType>false</seperateMethodsByContentType>
<rule>com.phoenixnap.oss.ramlapisync.generation.rules.Spring4ControllerInterfaceRule</rule>
<ruleConfiguration>
<simpleReturnTypes>true</simpleReturnTypes>
<useShortcutMethodMappings>true</useShortcutMethodMappings>
</ruleConfiguration>
<generationConfig>
<includeJsr303Annotations>true</includeJsr303Annotations>
</generationConfig>
</configuration>
<executions>
<execution>
<id>generate-springmvc-endpoints</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-springmvc-endpoints</goal>
</goals>
</execution>
</executions>
</plugin>
I'm using same version than you and configuration is basically the same. Differences:
I'll try to change these values and I'll let you know if I get success.
Hi, after my lastests checks, I cannot reproduce this issue. I mean, Error model is not referenced by any other one and it is used only in error response bodies and now I see Error class generated successfully. So I think this bug can be closed as not reproducible.
Hi.
We've specified a type to model an Error entity. And this type is used when we specify the error response body in API spec (for 400, 500, etc.) But the corresponding POJO is not being generated. We tried also using the configuration param "generateUnreferencedSchemas" without success. So, the question is, can be unreferenced types be generated? (or referenced in error response bodies)
Rule used: Spring4ControllerInterfaceRule
Regards.