Skip to content
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

[BUG] Top level properties cannot be outside a fixed set #2305

Closed
ravbhatnagar opened this issue May 26, 2017 · 2 comments
Closed

[BUG] Top level properties cannot be outside a fixed set #2305

ravbhatnagar opened this issue May 26, 2017 · 2 comments
Assignees

Comments

@ravbhatnagar
Copy link

Sample swagger in email.
lintertest->resource-> foo was added as a top level property. It was added to the "Resource" model which was inherited by other models. So, it should have been shown as violation in each model which did an allOf on Resource. It works and identifies the violation correctly when there is a disallowed top level property directly in the model which does an allOf on “resource” model.

@veronicagg
Copy link
Contributor

Swagger extract:
"Resource": {
"description": "The resource model definition.",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource ID."
},
"foo": {
"readOnly": true,
"type": "string",
"description": "Resource ID."
},
"name": {
"readOnly": true,
"type": "string",
"description": "Resource name."
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type."
},
"location": {
"type": "string",
"description": "Resource location."
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags."
}
},
"required": [
"location"
],
"x-ms-azure-resource": true
},

@sarangan12
Copy link
Member

Task completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants