Skip to content

[BUGFIX] Apply defaults in $ref'ed property / item definitions #494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 13, 2018

Conversation

erayd
Copy link
Contributor

@erayd erayd commented Feb 13, 2018

What

Dereference property and array item definitions prior to checking for a default value. Fixes #473.

Why

Because the spec says:

  1. We should be ignoring siblings of $ref (so default isn't valid here anyway); and
  2. There might be a default defined in the reference target.

@erayd
Copy link
Contributor Author

erayd commented Feb 13, 2018

@shmax Any chance of a code review?

@erayd erayd changed the title [BUGFIX] Apply defaults in $ref'ed property definitions [BUGFIX] Apply defaults in $ref'ed property / item definitions Feb 13, 2018
@shmax
Copy link
Collaborator

shmax commented Feb 13, 2018

LGTM!

Copy link
Collaborator

@bighappyface bighappyface left a comment

Choose a reason for hiding this comment

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

+1 for 0bcf3eb
+1 for 91f5891
+1 for 8a5ac14

@bighappyface bighappyface merged commit dd084db into jsonrainbow:master Feb 13, 2018
@erayd erayd deleted the apply-ref-default branch February 14, 2018 01:10
erayd pushed a commit to erayd/json-schema that referenced this pull request Feb 14, 2018
[BUGFIX] Apply defaults in $ref'ed property / item definitions
@erayd erayd mentioned this pull request Feb 14, 2018
@erayd
Copy link
Contributor Author

erayd commented Feb 14, 2018

Thanks guys :-)

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