-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow refs when finding default property values
This resolves any `ref_schema` keywords (`$ref`, `$dynamicRef`, `$recursiveRef`) when looking for `default` keywords for `insert_property_defaults`. It follows the keyword order defined in the vocabulary (`$ref` first, then `$dynamicRef`/`$recursiveRef` depending on the meta schema) and searches depth-first (ie, follows a `$ref` chain until a leaf schema before moving on to a sibling `$dynamicRef`). The first `default` keyword found is used, meaning a `$ref` default can be overwritten by the including schema, eg: ```json { "properties": { "example": { "$ref": "#/$defs/ref", "default": "override!" } }, "$defs": { "ref": { "default": "overridden" } } } ``` Closes: #173
- Loading branch information
1 parent
2eeef77
commit 6a4fe31
Showing
2 changed files
with
201 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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