Closed diggernet closed 4 years ago
Looking into it today.
Well, that's weird. raml-java-tools handles them properly. Hmmmmmm. It does not...it's the jackson plugin that causes problems.
I'm currently trying to figure out the bug. It's a weird one where type names are confused for property names. The parser model is not very helpful on this. Why it depends on the type name, I have no idea. I hope it's not the parser :-)
This issue is impacting us as well. If there is any further progress you made debugging this, please share.
We can work around it by using the Jaxb parser, it seems
This was fixed in v3.0.7. Thanks!
Version: 3.0.0 and later (worked in 2.1.1). Scenario: Define a type with a name ending with "
Response
", and containing a property with a type which is an object with a discriminator. Error:[ERROR] Failed to execute goal org.raml.jaxrs:raml-to-jaxrs-maven-plugin:3.0.5:generate (default) on project [projectName]: Error generating Java classes from: null: can't fetch type named [propertyName]
(Where[projectName]
is the name of the maven project, and[propertyName]
is the name of the first property in the type which has a type with a discriminator.)Changing the name of
PetResponse
toPetresponse
orPetResponseType
(or pretty much anything else) avoids the error. As does definingAnimal
without a discriminator.test.raml: