raml-java-parser
raml-java-parser copied to clipboard
Parser reports strange error when using security scheme with '.' in the name
#%RAML 1.0
title: hello
securitySchemes:
oauth2.0:
type: OAuth 2.0
settings:
authorizationGrants: password
authorizationUri: http
accessTokenUri: http
scopes:
- a
- b
/persons:
get:
securedBy:
oauth2.0:
scopes:
- c
Thanks in advance, Pavel
Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-109
Using dots for constructs that could be imported from a library should be forbidden as it creates confusion regarding the intention of the dot and who should win in case of conflict, not sure the spec is clear about it.
This works fine in RAML 0.8 as well as in current JS parser to, I see no clarifications in spec saying that this is dissalowed.
@sichvoge , @usarid what is your opinion? Regards, Pavel
RAML 0.8 does not have the concept of libraries, so there's no ambiguity there regarding what a dot means.
We could avoid the ambiguity by stating that, in case of ambiguities, local names win -- so a.b
as a name is allowed and if there is such a name then it hides any a.b
library reference. Anyone see any issues with this suggestion?
Hi,
We've got the same issue on our side.
Any update ?