Open pierCo opened 4 years ago
This seems related to the way the underlying YAML parser handles keys in general. See this issue. Feel free to submit a PR with a few test cases if this is something you really need to be addressed.
Otherwise, note that this parser is deprecated in favor of webapi-parser
, which should behave as expected.
When I attempt to parse a RAML definition that contains a type where its name is an Integer it failed. A
ClassCastException
is thrown.I try to fix that by patch the source code of
TypeDeclaration.java
. It works but after a few search in the source code this error could be produced at many places.So my question is more: is it allowed to use Integer as key of a type (or another resource)? And if not, how to handle this error more cleanly? For example, to indicate that the RAML definition is invalid.
Attempt to fix the issue
I try to fix that by patch the source code of
TypeDeclaration.java
as below:Error information
RAML Content
Error stack trace