FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

State explicitly: `additionalProperties : true` is the default by tedepstein · Pull Request #1548 · OAI/OpenAPI-Specification · GitHub

State explicitly: additionalProperties : true is the default - #1548

Merged
webron merged 3 commits into
OAI:v3.0.2-devfrom
RepreZen:additionalProperties-default
Apr 23, 2018
Merged

State explicitly: additionalProperties : true is the default#1548
webron merged 3 commits into
OAI:v3.0.2-devfrom
RepreZen:additionalProperties-default

Conversation

tedepstein commented Apr 17, 2018
edited
Loading

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Contributor Author

Thanks, @handrews . I made that change.

Updated suggested text to simplify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL