-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'type' facet allows nested 'type' #1085
Comments
Hi @deiteris, can you point out where in the spec it says this is not allowed? According to https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#type-declarations in the
|
Hi @tomsfernandez. Just to make sure we're on the same page (as my example may be unclear): I am considering as a bug the following construct that is allowed by AMF parser: types:
MyType:
type:
type:
# And many more nested 'type:' facets below until the actual type value. And according to your cite from the spec it accepts a value (that is one of the possible listed values), not the other facets. This may become especially confusing when deprecated types:
MyType:
schema:
type: object
properties: |
Hmm I interpret the word
As a YAML node value. In the possible values described in that phrase are a scalar (point a) and b)) or an object (point c)). If this is the case then that is allowed behaviour. |
I suggest you raise an issue in https://github.com/raml-org/raml-spec/issues to see if this example should be valid or not. |
Actually yeah, you are right and the spec means exactly that. But from the user's PoV it looks like a loophole in the spec (or I just don't see how it can be useful). I'll raise the issue in the spec repo. Thanks! |
Your issue may already be reported! Please search on Github issues before creating one.
I'm submitting a ...
What is the current behavior?
The following RAML is validated and parsed successfully:
If the current behavior is a bug, please provide the minimal steps to reproduce with AMF code. Please don't upload AMF code mixed with yours.
What is the expected behavior?
Such use of the facet doesn't seem to be correct as it is supposed to allow only data types.
Please tell us about your environment:
The text was updated successfully, but these errors were encountered: