-
Notifications
You must be signed in to change notification settings - Fork 8
Address normative references issues #216
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits, otherwise LGTM, take or leave the comments. There's some errant ref to [JSON-SCHEMA-2020-12] somewhere in the text that you'll want to make into a non-normative reference.
index.html
Outdated
@@ -157,7 +157,7 @@ <h2>Data Model</h2> | |||
<a>verifiable credential</a>. | |||
</p> | |||
<p> | |||
Implementers may find use in packaging a JSON Schema as a verifiable credential when they wish to | |||
Implementers MAY find use in packaging a JSON Schema as a verifiable credential when they wish to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This normative language is strange, suggest changing it to "might".
Alternatively, you could say: "Implementers MAY package a JSON Schema as a verifiable credential when they..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, updating
index.html
Outdated
@@ -525,7 +525,7 @@ <h3>Reserved Keywords</h3> | |||
</p> | |||
<p> | |||
In the upcoming sections we list <i>some</i> keywords that possess unique significance and | |||
should not be used in conflicting ways. | |||
SHOULD NOT be used in conflicting ways. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear what "conflicting ways" means. Providing an example would help
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quite similar to your PR here will adjust the language w3c/vc-data-model#1271
index.html
Outdated
The credential containing a <a>credential schema</a> MAY include a proof, either | ||
embedded according to <a data-cite="VC-DATA-MODEL-2.0/#securing-verifiable-credentials"> | ||
Securing Verifiable Credentials</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You say "either embedded" but only provide one option, I would expect there to be two options to pick from. You might be saying "MAY be secured by using either an embedded proof or an external proof as defined in..."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks good find!
representation of a [[JSON-SCHEMA]], defined by [[[OPENAPIS-3.1.0]]], the types <code>application/openapi+yaml</code> | ||
or <code>application/yaml</code> may be used. | ||
representation of a [[JSON-SCHEMA]], defined by [[[OPENAPIS-3.1.0]]], the types | ||
<code>application/openapi+yaml</code> or <code>application/yaml</code> MAY be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect this to lead to interop challenges... this means that implementations would probably have to support both JSON and YAML schemas, and folks might complain. Just raising it as a concern -- I don't think it'll result in any issues in CR (just broader ecosystem issues when it's deployed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this is a risk. tagging @OR13 since he is the one that really cares about this 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msporny I think its fine to use yaml serialization for JSON Schema... https://github.com/transmute-industries/vc-json-schema
#!/bin/bash
JWT=$(cat ./example/vc.jwt)
jq -R 'split(".") | .[1] | @base64d | fromjson' <<< "$JWT" > ./example/vc.json
echo "🌴 Validation"
ajv --spec=draft2020 compile -c ./customKeywords.js -s ./example/NewCredentialType.yaml
ajv --spec=draft2020 validate -c ./customKeywords.js -s ./example/NewCredentialType.yaml -d ./example/vc.json
ajv --spec=draft2020 test -c ./customKeywords.js -s ./example/NewCredentialType.yaml -d ./example/vc.json --valid
curl -s https://transmute-industries.github.io/vc-json-schema/example/NewCredentialType.yaml > schema.yaml
curl -s https://transmute-industries.github.io/vc-json-schema/example/vc.jwt > vc.jwt
JWT=$(cat ./vc.jwt)
jq -R 'split(".") | .[1] | @base64d | fromjson' <<< "$JWT" > ./vc.json
ajv --spec=draft2020 test -c ./customKeywords.js -s ./schema.yaml -d ./vc.json --valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to write the tests for this, but they are not required because its not a MUST iirc.
Co-authored-by: Manu Sporny <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits that I believe make things more clear.
index.html
Outdated
When transmitting a [[JSON-SCHEMA]] represented as a <a>verifiable credential</a> with usage of | ||
the <a href="#jsonschema">JsonSchemaCredential</a> type, the media types <code>application/vc+ld+json</code>, | ||
<code>application/vc+ld+json+jwt</code>, and <code>application/vc+ld+json+sd-jwt</code> as defined | ||
in [[VC-DATA-MODEL-2.0]], [[VC-JOSE-COSE]], and [[SD-JWT]] specifications, respectively, SHOULD be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When transmitting a [[JSON-SCHEMA]] represented as a <a>verifiable credential</a> with usage of | |
the <a href="#jsonschema">JsonSchemaCredential</a> type, the media types <code>application/vc+ld+json</code>, | |
<code>application/vc+ld+json+jwt</code>, and <code>application/vc+ld+json+sd-jwt</code> as defined | |
in [[VC-DATA-MODEL-2.0]], [[VC-JOSE-COSE]], and [[SD-JWT]] specifications, respectively, SHOULD be used. | |
The media types <code>application/vc+ld+json</code>, | |
<code>application/vc+ld+json+jwt</code>, or <code>application/vc+ld+json+sd-jwt</code> as defined | |
in [[VC-DATA-MODEL-2.0]], [[VC-JOSE-COSE]], or [[SD-JWT]] specifications, respectively, SHOULD be used when transmitting a [[JSON-SCHEMA]] represented as a <a>verifiable credential</a> with usage of | |
the <a href="#jsonschema">JsonSchemaCredential</a> type |
this is the one we want to normatively reference since it's required |
Co-authored-by: Andres Uribe <[email protected]>
Will merge tomorrow. |
The issue was discussed in a meeting on 2023-09-14
View the transcript4.1. Address normative references issues (pr vc-json-schema#216)See github pull request vc-json-schema#216. Brent Zundel: PR 216 - can you walk us through this, Gabe? Gabe Cohen: Manu had gone through normative references, suggest reducing some JSON Schema references... we only want to normatively refer to the most recent one. Make other refs non-normative, cleans up some other language.
Gabe Cohen: Open to other questions on the spec, other than that, looking forward to proposal. |
Preview | Diff