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

Ensure $schema properties start with http not https #44

Closed
annakrystalli opened this issue Apr 19, 2023 · 3 comments · Fixed by #59
Closed

Ensure $schema properties start with http not https #44

annakrystalli opened this issue Apr 19, 2023 · 3 comments · Fixed by #59
Milestone

Comments

@annakrystalli
Copy link
Contributor

URLs which start with https are not recognised by ajv causing issues when using other validators like ajv-cli. So all URLs in $schema properties specified the json schema version should start with http.

See issues brought up in #42

@annakrystalli annakrystalli added this to the v1.0.0 milestone Apr 20, 2023
@elray1 elray1 mentioned this issue Jul 12, 2023
@annakrystalli
Copy link
Contributor Author

So I looked into this a bit.

Firstly, it already works for us through jsonvalidate R package and when I looked at the json-schema.org docs on declaring a JSON schema, the example uses https 🤷‍♀️
image

It looks like this is an ajv issue (e.g. see here which emanates from the fact that that ajv bundles the meta schema up, treats the $schema property an identifier to a bundled file (it is not retrieved from the net) and does not recognise https.

So I wasn't sure whether to bother with this as it doesn't affect our workflow. But given it may make the schema files more interoperable with other validation tools, I'll go ahead and implement it.

@annakrystalli annakrystalli modified the milestones: v1.0.0, v2.0.0 Jul 13, 2023
@annakrystalli
Copy link
Contributor Author

Oddly, shifting to http now causes the same error when using jsonvalidate in R 🤷‍♀️
image

https://github.com/Infectious-Disease-Modeling-Hubs/schemas/actions/runs/5540256450/jobs/10112113732?pr=59

@annakrystalli
Copy link
Contributor Author

Reverted. Not going to fix this because it breaks the jsonvalidate workflow

@annakrystalli annakrystalli linked a pull request Jul 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

1 participant