Skip to content

improvement: adopt @webron's OpenAPI 3.0 schema#1984

Merged
shockey merged 3 commits intoswagger-api:masterfrom
shockey:svip-phase-1
Apr 12, 2019
Merged

improvement: adopt @webron's OpenAPI 3.0 schema#1984
shockey merged 3 commits intoswagger-api:masterfrom
shockey:svip-phase-1

Conversation

@shockey
Copy link

@shockey shockey commented Apr 12, 2019

this completes phase 1 of the Schema Validation Improvement Plan (the first half happened in #1982)

@shockey shockey changed the title adopt @webron's OpenAPI 3.0 schema improvement: adopt @webron's OpenAPI 3.0 schema Apr 12, 2019
$ref:
- "$ref"
patternProperties:
"^\\$ref$":
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be Reference.properties.$ref instead of Reference.patternProperties.^\\$ref$?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@shockey shockey merged commit 87ba243 into swagger-api:master Apr 12, 2019
shockey added a commit to shockey/swagger-editor that referenced this pull request May 23, 2019
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.

1 participant