Repository navigation
Support boolean schemas and missing OpenAPI 3.1 fields - #44
Merged
Merged
Conversation
Reading a valid 3.1 document with a boolean schema, such as "items: false", failed with a TypeErrorException. Keep these values as booleans, also when they are the target of a reference. Add jsonSchemaDialect, Info::$summary, License::$identifier, Components::$pathItems and the mutualTLS security scheme type. Read webhooks as a map, so that empty webhooks are written as an object. Validate the new tests/spec/data/openapi-3.1.yaml with the CLI too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
items: false,not: true,properties: {a: true}orcomponents.schemas.A: truefailed with aTypeErrorException. They are now kept as booleans, also when they are the target of a$ref.jsonSchemaDialect,Info::$summary,License::$identifier,Components::$pathItemsand themutualTLSsecurity scheme type.webhooks: read as a map, so empty webhooks are written as{}instead of[].identifierandurlis reported as an error.Behaviour changes
Schemaproperties can now returntrueorfalse. Code that expects onlySchemaorReferenceobjects there has to handle booleans.mutualTLSis accepted the same way.Test plan
make testruns the newtests/spec/data/openapi-3.1.yamlthroughbin/php-openapi validate.justinrainbow/json-schemadoes not support draft 2020-12, so this step may need adjusting.Part of the OpenAPI 3.1 work. #24, #25 and the validator replacement are not included.
🤖 Generated with Claude Code