raml-java-parser
raml-java-parser copied to clipboard
UnionTypeDeclaration of() method returning strange results
Suppose I have a property of type integer | string. I then execute
UnionTypeDeclaration utd = (UnionTypeDeclaration)td;
utd.of().forEach(oneOf -> System.out.println("Of: " + oneOf.name() + " " + oneOf.type()));
This displays
Of: integer | string null
Of: integer | string null
I was expecting two type declarations, one for each of the the two constituent types. So is the of() method broken, or is it returning what's expected? And if so how do I get the two constituent type declarations?
Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-69