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

I have themis failing some tests in the officila JSON-schema test suite #10

Open
ebdrup opened this issue Jan 31, 2015 · 2 comments
Open

Comments

@ebdrup
Copy link
Contributor

ebdrup commented Jan 31, 2015

You asked me to report any tests failing in pandastrike/jsck#81 (comment)
This discussion belongs here.
The tests that I find themis failing are listed here:
https://github.com/Muscula/json-schema-benchmark/blob/master/reports/themis.md

This may be due to the way themis is instantiated here:
https://github.com/Muscula/json-schema-benchmark/blob/master/index.js#L37

@Prestaul added the comment $refs only supported if they have id attributes and the test suite refs do not

What's needed to make themis pass the tests?

@atrniv
Copy link
Member

atrniv commented Jan 31, 2015

All these tests include remotely accessed references. Currently themis does not automatically fetch remote references. However if you have already fetched the remote references, you can inject them into themis while creating the validator by passing them all in an array. I've given an example of the same in the readme.

However themis expects the remote reference schema to contain an id which tells the location from where the schema was fetched. Otherwise it will assign an integer id to it and then the tests would fail.

I'm not sure what would be the best way to fix this issue. I'll have to think about it for a while.

@Prestaul
Copy link

Prestaul commented Feb 1, 2015

I honestly think this would require a change to the library so that we can provide a uri that is not specified in the document as an id. Probably not a huge update!

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

No branches or pull requests

4 participants