-
-
Notifications
You must be signed in to change notification settings - Fork 593
Can YAML be used for schema while using CLI #315
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
Comments
The right way to do this is to just compose some external tool which
converts YAML to JSON. There are many of em, pick whichever one. Then just
`jsonschema validate -i <(yaml-to-json instance.yaml) <(yaml-to-json
schema.yaml)
…On Dec 23, 2016 13:18, "Amanjeev Sethi" ***@***.***> wrote:
Within my own app, I can always load YAML schema instead of JSON using
PyYAML etc. but I was wondering if there is a way to use the this via
command line as well? It seems like the entire package is pretty much
expecting JSON for schema. Like load_schema() looks for JSON only :
https://github.com/amanjeev/jsonschema/blob/master/
jsonschema/_utils.py#L51
Any suggestions to how I may approach this. I am willing to work on this
if you want and open a PR but I was wondering if I could get some input
from you regarding whether it is already done and also regarding portions
of the code (packaging, testing, cli etc.) that I may be missing. thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#315>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUIXpFJRYuOdzRGXiR1UU5ezU1VNEr0ks5rLBCFgaJpZM4LU_gG>
.
|
I see. Thank you! |
6c00de64 Run daily. 183d37fe Run on all branches. f865e88e Merge remote-tracking branch 'origin/Relequestual-fix-pr-ci' 777919bc Fix the contributor command info as well. e4e27709 Merge pull request #319 from json-schema-org/badge 5c7ac335 Fix the badge. 67f238bb Run CI for PRs bf2f2443 Merge pull request #315 from json-schema-org/gha 38c2e938 Travis CI -> GitHub Actions. git-subtree-dir: json git-subtree-split: 6c00de640246fc00f0e4f21330635aa72d6ac8d8
Given how popular YAML has become, perhaps it's worth revisiting this issue and considering adding 1st party support. Happy to help with implementing if interested. |
#582 is a follow up ticket, and yeah I'm more amenable to doing this at this point, but I don't want to do so too magically (meaning by guessing) -- but have a look at the follow up ticket and definitely a PR is welcome for what's mentioned there (ask if it's unclear!) |
Within my own app, I can always load YAML schema instead of JSON using PyYAML etc. but I was wondering if there is a way to use the this via command line as well? It seems like the entire package is pretty much expecting JSON for schema. Like
load_schema()
looks for JSON only : https://github.com/amanjeev/jsonschema/blob/master/jsonschema/_utils.py#L51Any suggestions to how I may approach this. I am willing to work on this if you want and open a PR but I was wondering if I could get some input from you regarding whether it is already done and also regarding portions of the code (packaging, testing, cli etc.) that I may be missing. thanks!
The text was updated successfully, but these errors were encountered: