-
Notifications
You must be signed in to change notification settings - Fork 34
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
JSON-Schema-Validator Modul compatible at least with JSON-Schema v7 #443
Comments
Implementation should probably start in OERSI, following up on https://gitlab.com/oersi/oersi-etl/-/issues/96#note_679435293 and then moving the working implementation here. |
I'm trying to test this: https://github.com/TobiasNx/notWorkingFlux/blob/a59fa2193ca5045a8f5f50b1f47387e4d8ffcb39/jsonValidator Seems not to work yet, what did I do wrong? |
Ah, right, passing a URL as the main schema is not supported yet. When we talked about URLs in this context, I was thinking of sub-schemas referenced in the main schema, where URLs work (this is handled by the validator library). Supporting URLs for the main schema does make sense and from your test, seems to be the obvious use case. It's no problem to support in principle, but brings in some additional aspects to consider (like caching to avoid an HTTP request for every document, testing without introducing remote requests in the test). So I'm moving this to backlog for now. BTW this is a good example for the issue we recently discussed in a meeting, that moving a custom Metafacture module into core is much more than just moving it, and therefore should only happen if there is actual demand for the generic module (which is the case here, but maybe not for #469). |
Remove schemaRoot config, resolutionScope is now set to base path
I've added support for loading the main schema and relative refs from URLs and mocks for serving the test schemas. Instead of adding explicit caching, I've moved the loading of the schema into the constructor (was possible after removal of @TobiasNx Your validation test should now work. |
I tested it. Seems to run smoothly now! Great :) |
In context of OERSI we have a JSON-Schema-Validator but it only supports v4.
Will be needed in lobid and in RPB too.
Option/features should be:
The text was updated successfully, but these errors were encountered: