-
Notifications
You must be signed in to change notification settings - Fork 23
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
Link's ref path needs an update for all the event schemas #211
Comments
Thanks, I also realised that while working on the golang SDK. |
I believe a reference |
According to the jsonschema docs, schema references are relative to the schema In our case, the schema I tried with ➜ check-jsonschema examples/artifact_deleted.json --schemafile schemas/artifactdeleted.json
ok -- validation done If I used the ➜ check-jsonschema examples/artifact_deleted.json --schemafile schemas/artifactdeleted.json --base-uri /git/github.com/cdevents/spec/
ok -- validation done In CI we need to use local files (not fetched from the internet) because the schemas from PRs have not been published yet. In the jsonschema docs it even says that the URIs do not necessarily need to be network addressable, they're only identifiers, and that typically the schemas are embedded in the tool that does the validation. I lean slightly towards having the internet based resolution working (i.e. using a |
Looking at how references are used for the meta schemas:
So one level is stripped from the root schema ID and then the relative path applied If we followed the same approach for CDEvents:
I think the relative references option would be better because, to use the absolute one, we would include the spec version in the reference, so every new release would require updating all references, even if it wasn't changed. |
As per the jsonschema docs, the
|
@rjalander what I found is that you need to load the schemas from the local disk into your validator, so that it will use its local database of schemas instead of going out to the internet. |
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: cdevents#208 Fixes: cdevents#211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: cdevents#208 Fixes: cdevents#211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: cdevents#208 Fixes: cdevents#211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: cdevents#208 Fixes: cdevents#211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: cdevents#208 Fixes: cdevents#211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: cdevents#208 Fixes: cdevents#211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: cdevents#208 Fixes: cdevents#211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: cdevents#208 Fixes: cdevents#211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: cdevents#208 Fixes: cdevents#211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: cdevents#208 Fixes: cdevents#211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: cdevents#208 Fixes: cdevents#211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: cdevents#208 Fixes: cdevents#211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass. Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas. ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas. Since ajv is javascript, update the GitHub action workflow to javascript. Fixes: #208 Fixes: #211 Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
The
ref
path needs to be updated with the correct path to refer links,From
To
The text was updated successfully, but these errors were encountered: