You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 3, 2023. It is now read-only.
As noted in json-schema-org/json-schema-spec#1097 - the docs should be updated to reflect the proper usage of $ref with #/$def/ JSON pointers (#/definitions/ in older spec drafts).
Right now, according to the Understanding JSON Schema site, only "complex schemas" use definitions for reuse, when in the real world I would suggest based on my own experience that most schemas are likely intended for re-use elsewhere in the system eventually.
we don't want to forbid $ref to properties, just like Python doesn't forbid calling leading single-leading-underscore names from outside of a class. It's not advised to do that, but sometimes you have to do ill-advised things. The spec shouldn't lock that down (but a linter should probably complain unless configured not to).
The documentation site should have a line something along the lines of:
While you can also $ref properties with a JSON pointer by doing "$ref": "otherSchema.json#/properties/link", you should avoid doing so and instead move the schema definition to the $defs reserved location to avoid issues with schema validation and references.
As noted in json-schema-org/json-schema-spec#1097 - the docs should be updated to reflect the proper usage of
$ref
with#/$def/
JSON pointers (#/definitions/
in older spec drafts).Right now, according to the Understanding JSON Schema site, only "complex schemas" use definitions for reuse, when in the real world I would suggest based on my own experience that most schemas are likely intended for re-use elsewhere in the system eventually.
The documentation site should have a line something along the lines of:
Before:
After:
A second example just for completions sake:
The text was updated successfully, but these errors were encountered: