Skip to content

Wrap '$ref's to prevent 'definitions' override - #628

Merged
webron merged 1 commit into
OAI:masterfrom
APIs-guru:master
Apr 8, 2016
Merged

Wrap '$ref's to prevent 'definitions' override#628
webron merged 1 commit into
OAI:masterfrom
APIs-guru:master

Conversation

@IvanGoncharov

Copy link
Copy Markdown
Contributor

From JSON Reference:

Any members other than "$ref" in a JSON Reference object SHALL be ignored.

Implementations MAY choose to replace the reference with the referenced value.

@whitlockjc

Copy link
Copy Markdown
Member

LGTM

@webron

webron commented Apr 7, 2016

Copy link
Copy Markdown
Member

I don't mind merging it, just not sure what it's meant to serve. The description is just a documentation tool to anyone who bothers reading the schema, what difference does it make if it's being ignored when processing?

@IvanGoncharov

Copy link
Copy Markdown
Contributor Author

@webron description used during validation to provide context for errors.

@webron
webron merged commit 49f4c8b into OAI:master Apr 8, 2016
@whitlockjc

Copy link
Copy Markdown
Member

@IvanGoncharov is right, most JSON Schema validators will use the description field when a rule fails validation to help relay extra information to the user.

AndersDJohnson pushed a commit to AndersDJohnson/OpenAPI-Specification that referenced this pull request Apr 8, 2019
Wrap '$ref's to prevent 'definitions' override
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.

3 participants