Skip to content

additionalProperties: true should be disallowed, flagged as a warning #252

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

Open
tedepstein opened this issue Dec 27, 2016 · 0 comments
Open

Comments

@tedepstein
Copy link
Collaborator

#174 has a somewhat broad-ranging discussion about various allOf and additionalProperties limitations that SwagEdit should be aware of, and should help with by adding validations and helpful messages.

One of these is simple, and should not get lost in the overall discussion, so I'm adding it here as a separate issue:

additionalProperties: true and false are meaningless in Swagger 2.0, and should not be allowed.

Note that this is allowed, according to the Swagger specification, and according to the standard JSON Schema for Swagger. Ron Ratovsky says here that this was an oversight in the specification. It wasn't supposed to have been supported. But I think we have to go by the spec, not by after-the-fact comments.

The reason for the warning is because it's totally ignored by the Swagger core libraries. There's nothing downstream of the editor that will recognize a value of true.

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

1 participant