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

schemas embedded using $ref not being validated. #68

Open
evdb opened this issue Mar 19, 2013 · 1 comment
Open

schemas embedded using $ref not being validated. #68

evdb opened this issue Mar 19, 2013 · 1 comment

Comments

@evdb
Copy link

evdb commented Mar 19, 2013

Please see https://gist.github.com/evdb/5196782 for test script and the output I'm getting.

Problem is that the inner schema validation does not occur if it is included using $ref, but is if embedded directly.

The error is Unknown schema reference: http://json-schema.org/draft-03/schema# but that schema is found using env.findSchema("http://json-schema.org/draft-03/schema#");...

Apologies for not using the same test framework as you, this is extracted and simplified from my code. Apologies also if I'm doing something obviously wrong.

evdb pushed a commit to mysociety/popit-api that referenced this issue Mar 19, 2013
@jpmckinney
Copy link

I just hit this too. It looks like the only workaround is to replace every $ref with the schema it references? per https://github.com/mysociety/popit-api/blob/master/schemas/index.js#L51

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

No branches or pull requests

2 participants