Skip to content
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

Allow use of legacy names for schema validation #1194

Merged
merged 1 commit into from
Jan 8, 2018
Merged

Conversation

leebyron
Copy link
Contributor

@leebyron leebyron commented Jan 8, 2018

This offers an escape hatch for schema that are defined with legacy field names that were valid in older versions of the spec and no longer are via an explicit white-list.

Fixes #1184

This offers an escape hatch for schema that are defined with legacy field names that were valid in older versions of the spec and no longer are via an explicit white-list.

Fixes #1184
@leebyron
Copy link
Contributor Author

leebyron commented Jan 8, 2018

Curious for your thoughts on this approach, @alloy

Copy link
Contributor

@alloy alloy left a comment

Choose a reason for hiding this comment

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

Ah smart, I like it. Allows existing fields, yet ensures no new ones are added 👍

expect(validateSchema(schemaOk)).to.deep.equal([]);
});

it('throws with bad value for explicitly allowed legacy names', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thorough 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants