improvement: adopt @webron's OpenAPI 3.0 schema#1984
Merged
shockey merged 3 commits intoswagger-api:masterfrom Apr 12, 2019
Merged
improvement: adopt @webron's OpenAPI 3.0 schema#1984shockey merged 3 commits intoswagger-api:masterfrom
shockey merged 3 commits intoswagger-api:masterfrom
Conversation
shockey
commented
Apr 12, 2019
| $ref: | ||
| - "$ref" | ||
| patternProperties: | ||
| "^\\$ref$": |
Author
There was a problem hiding this comment.
should this be Reference.properties.$ref instead of Reference.patternProperties.^\\$ref$?
Author
There was a problem hiding this comment.
Yes.
Some JSON Schema draft-04 engines get tripped up on $ref as a property name, because draft-04 incorporated JSON Reference without adding any guards as to where $ref is semantically valid as a Reference vs it's a property name for an object.
AJV appears to handle this without any issues (while it did have issues with the regex workaround), so we're going to use Reference.properties.$ref here.
CC @webron!
17 tasks
shockey
added a commit
to shockey/swagger-editor
that referenced
this pull request
May 23, 2019
…ger-api#1984) * adopt @webron's OpenAPI 3.0 schema from OAI/OpenAPI-Specification#1270 permalink: https://github.com/OAI/OpenAPI-Specification/blob/92e15eba1d4591ebfe8c11898c48241e72854381/schemas/v3.0/schema.yaml * use literal `$ref` key in Reference Object schema * `"$ref"` -> `$ref`
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.
this completes phase 1 of the Schema Validation Improvement Plan (the first half happened in #1982)