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

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

Merged
merged 2 commits into from
Jun 10, 2021

Conversation

MikeRalphson
Copy link
Member

@MikeRalphson MikeRalphson commented Jun 4, 2021

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

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: object
required:
- anySchema
properties:
  anySchema: true
  cannotBeDefined: false

@MikeRalphson
Copy link
Member Author

MikeRalphson commented Jun 10, 2021

@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 MikeRalphson force-pushed the boolean-schemas-3.1.1 branch from 252fdae to e4ddc4b Compare June 10, 2021 10:17
@magicmatatjahu
Copy link

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-dev Jun 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>
@handrews handrews added this to the v3.1.1 milestone May 17, 2024
@handrews handrews added clarification requests to clarify, but not change, part of the spec schema-object labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification requests to clarify, but not change, part of the spec schema-object
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants