Skip to content

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

Merged
bighappyface merged 3 commits into
jsonrainbow:masterfrom
erayd:apply-ref-default
Feb 13, 2018
Merged

[BUGFIX] Apply defaults in $ref'ed property / item definitions#494
bighappyface merged 3 commits into
jsonrainbow:masterfrom
erayd:apply-ref-default

Conversation

@erayd

@erayd erayd commented Feb 13, 2018

Copy link
Copy Markdown
Contributor

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

erayd commented Feb 13, 2018

Copy link
Copy Markdown
Contributor Author

@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

shmax commented Feb 13, 2018

Copy link
Copy Markdown
Collaborator

LGTM!

@bighappyface bighappyface left a comment

Copy link
Copy Markdown
Collaborator

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

erayd commented Feb 14, 2018

Copy link
Copy Markdown
Contributor Author

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