raml-java-parser icon indicating copy to clipboard operation
raml-java-parser copied to clipboard

UnionTypeDeclaration of() method returning strange results

Open KevinMitchell opened this issue 8 years ago • 0 comments

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

KevinMitchell avatar Jan 27 '18 20:01 KevinMitchell