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

Fix schema validation #158

Merged
merged 4 commits into from
Feb 3, 2016
Merged

Fix schema validation #158

merged 4 commits into from
Feb 3, 2016

Conversation

BBB
Copy link
Contributor

@BBB BBB commented Feb 3, 2016

I noticed that the schema validation was not working in the example app, so I decided to investigate.

I found that the validator was not able to find the schemas on endpoint.schema, but that the schema was available on endpoint.config.schema. https://github.com/endpoints/endpoints/blob/69b359b/src/validate-json-schema/index.js#L13

I also found that the schemas in the integration test app did not match valid JSON API schemas.

This PR fixes both of these issues and adds an integration test to catch this error. As previously these issues were undiscovered as they were unit tested in isolation.

@tkellen Does this look correct to you? If this is all ok, I'll update the example app too (this would close endpoints/endpoints-example#6 I believe).

@tkellen
Copy link

tkellen commented Feb 3, 2016

👍 this looks good to me @BBB!

@BBB BBB force-pushed the bugfix/validation branch from b86d6bf to ecda102 Compare February 3, 2016 14:20
BBB added a commit that referenced this pull request Feb 3, 2016
@BBB BBB merged commit 9767514 into endpoints:master Feb 3, 2016
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.

update example to include validation
2 participants