Skip to content

Allow booleans in place of any top-level schema field - #2609

Merged
webron merged 2 commits into
OAI:v3.1.1-devfrom
MikeRalphson:boolean-schemas-3.1.1
Jun 10, 2021
Merged

Allow booleans in place of any top-level schema field#2609
webron merged 2 commits into
OAI:v3.1.1-devfrom
MikeRalphson:boolean-schemas-3.1.1

Conversation

@MikeRalphson

@MikeRalphsonMikeRalphson commented Jun 4, 2021

Copy link
Copy Markdown
Member

Replacement PR for #2598

This targets v3.1.1 as we have agreed this is a clarification. The change spells out that boolean values MAY be used wherever a schemaObject is allowed.

A separate PR (#2614) updates the tests folder with passing and failing cases for this issue.

Plus one bonus fix.

… version
Signed-off-by: Mike Ralphson <mike.ralphson@gmail.com>
Signed-off-by: Mike Ralphson <mike.ralphson@gmail.com>
@magicmatatjahu

Copy link
Copy Markdown

There can be also added some example with true/false schemas like in asyncapi/spec#550:

{
"type": "object",
"required": [
"anySchema"
],
"properties": {
"anySchema": true,
"cannotBeDefined": false
}
}
type: objectrequired:
- anySchemaproperties:
anySchema: truecannotBeDefined: false

@MikeRalphson

MikeRalphson commented Jun 10, 2021

Copy link
Copy Markdown
MemberAuthor

@magicmatatjahu rather than add examples to the spec, I have updated the tests folder with passing and failing examples in a separate PR. Still open to adding spec examples if people feel that is warranted.

@MikeRalphson
MikeRalphsonforce-pushed the boolean-schemas-3.1.1 branch from 252fdae to e4ddc4bCompareJune 10, 2021 10:17
@magicmatatjahu

Copy link
Copy Markdown

Good to know, let's wait for people's opinion. Feel free to use these examples anywhere you want.

@webron
webron merged commit 250d4ad into OAI:v3.1.1-devJun 10, 2021
charjr pushed a commit to charjr/OpenAPI-Specification that referenced this pull request Apr 27, 2023
* fix: erroneous reference to v3.0 of the spec as if it was the current version
Signed-off-by: Mike Ralphson <mike.ralphson@gmail.com>
* Allow boolean values for top level schemaObjects
Signed-off-by: Mike Ralphson <mike.ralphson@gmail.com>
charjr pushed a commit to charjr/OpenAPI-Specification that referenced this pull request Apr 27, 2023
* fix: erroneous reference to v3.0 of the spec as if it was the current version
Signed-off-by: Mike Ralphson <mike.ralphson@gmail.com>
* Allow boolean values for top level schemaObjects
Signed-off-by: Mike Ralphson <mike.ralphson@gmail.com>
@handrewshandrews added this to the v3.1.1 milestone May 17, 2024
@handrewshandrews added clarification requests to clarify, but not change, part of the spec schema-object labels May 17, 2024
@lornajanelornajane mentioned this pull request Aug 1, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clarificationrequests to clarify, but not change, part of the specschema-object

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@MikeRalphson@magicmatatjahu@darrelmiller@jdesrosiers@webron@handrews