When I import a RAML with an attribute (uriParameter, data type, property, ...) name which only contains digits, parsing fails.
Stack trace
java.lang.ClassCastException: org.raml.yagi.framework.nodes.snakeyaml.SYIntegerNode cannot be cast to org.raml.yagi.framework.nodes.StringNode
at org.raml.v2.internal.impl.commons.nodes.PropertyUtils.getName(PropertyUtils.java:28)
at org.raml.v2.internal.impl.v10.nodes.PropertyNode.getName(PropertyNode.java:40)
at org.raml.v2.internal.impl.v10.type.ObjectResolvedType.overwriteFacets(ObjectResolvedType.java:143)
at org.raml.v2.internal.impl.commons.nodes.TypeDeclarationNode.resolveTypeDefinition(TypeDeclarationNode.java:99)
at org.raml.v2.internal.impl.commons.nodes.TypeDeclarationNode.getResolvedType(TypeDeclarationNode.java:85)
at org.raml.v2.internal.impl.v10.type.ObjectResolvedType.validateCanOverwriteWith(ObjectResolvedType.java:209)
at org.raml.v2.internal.impl.commons.nodes.TypeDeclarationNode.validateCanOverwrite(TypeDeclarationNode.java:143)
at org.raml.v2.internal.impl.commons.phase.TypeValidationPhase.apply(TypeValidationPhase.java:48)
at org.raml.v2.internal.impl.v10.Raml10Builder.runPhases(Raml10Builder.java:114)
at org.raml.v2.internal.impl.v10.Raml10Builder.build(Raml10Builder.java:93)
at org.raml.v2.internal.impl.RamlBuilder.build(RamlBuilder.java:117)
at org.raml.v2.internal.impl.RamlBuilder.build(RamlBuilder.java:99)
at org.raml.v2.api.RamlModelBuilder.buildApi(RamlModelBuilder.java:125)
at org.raml.v2.api.RamlModelBuilder.buildApi(RamlModelBuilder.java:104)
Example
Here's an example of a failing RAML (it contains a uriParameter with digits):
Issue
When I import a RAML with an attribute (uriParameter, data type, property, ...) name which only contains digits, parsing fails.
Stack trace
Example
Here's an example of a failing RAML (it contains a
uriParameter
with digits):To reproduce the issue, just run
new RamlModelBuilder().buildApi(ramlExampleFile);
Version used
We currently use version 1.0.13 of the
raml-java-parser
(but it seems that the bug has not been fixed between version 1.0.13 and version 1.0.15)Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-75