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

State explicitly: additionalProperties : true is the default #1548

Merged
merged 3 commits into from
Apr 23, 2018

Conversation

tedepstein
Copy link
Contributor

@tedepstein tedepstein commented Apr 17, 2018

Address #715 - State (explicitly) whether Open API schema object definitions are open or closed for extension.

This was the topic of many discussions around OpenAPI 2.0 and earlier Swagger specifications. Here are some of them:

OpenAPI 2.0 assumed additionalProperties: false as the default, and disallowed explicit use of a boolean additionalProperties value. This was never fully documented, only stated in out-of-band comments. And those comments were never really reconciled with allOf semantics, which magically continued to work as though additionalProperties: true were the default.

I wasn't aware, and I'm guessing that some others also weren't aware, that this changed intentionally in the 3.0 spec. The current 3.0.1 spec explicitly states that boolean values are allowed, but doesn't explicitly state that the default is now additionalProperties: true.

I think it's worth making this explicit now, because anyone who got caught up in the 2.0 additionalProperties confusion is likely to need some assurance that this change is intentional, and not subject to informal amendments or clarifications made outside of the spec.

@handrews and I were both looking for that assurance, and couldn't find it. So I'm suggesting this small change.

Address OAI#715 - State (explicitly) whether Open API schema object definitions are open or closed for extension.
@handrews
Copy link
Member

Looks good to me. I'd probably say "or an empty schema" or "or the empty schema" rather than "or empty schema" but I'm not picky if this is consistent with usage elsewhere.

Address OAI#715 - State (explicitly) whether Open API schema object definitions are open or closed for extension. Add 'an' for readability.
@tedepstein
Copy link
Contributor Author

Thanks, @handrews . I made that change.

Updated suggested text to simplify
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

Successfully merging this pull request may close these issues.

4 participants