Skip to content

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

Merged
merged 5 commits into from
Sep 15, 2023
Merged

Address normative references issues #216

merged 5 commits into from
Sep 15, 2023

Conversation

decentralgabe
Copy link
Collaborator

@decentralgabe decentralgabe commented Sep 13, 2023


Preview | Diff

Copy link
Member

@msporny msporny left a 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
Copy link
Member

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..."

Copy link
Collaborator Author

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.
Copy link
Member

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

Copy link
Collaborator Author

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
Comment on lines 620 to 622
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>.
Copy link
Member

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..."?

Copy link
Collaborator Author

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.
Copy link
Member

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).

Copy link
Collaborator Author

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 😄

Copy link
Collaborator

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

Copy link
Collaborator

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.

Copy link
Collaborator

@andresuribe87 andresuribe87 left a 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
Comment on lines 1293 to 1296
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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

@decentralgabe
Copy link
Collaborator Author

JSON-SCHEMA-2020-12

this is the one we want to normatively reference since it's required

@decentralgabe decentralgabe linked an issue Sep 14, 2023 that may be closed by this pull request
@decentralgabe
Copy link
Collaborator Author

Will merge tomorrow.

@iherman
Copy link
Member

iherman commented Sep 15, 2023

The issue was discussed in a meeting on 2023-09-14

  • no resolutions were taken
View the transcript

4.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.

Andres Uribe: manu: Went through the spec, looks good.

Andres Uribe: ... as to the changes suggested in the PR.

Andres Uribe: ... The goal here is to reduce the number of normative references to ease going into CR. Happy with it.

Gabe Cohen: Open to other questions on the spec, other than that, looking forward to proposal.

@decentralgabe decentralgabe merged commit b1e8cac into main Sep 15, 2023
@decentralgabe decentralgabe deleted the issue-210-take2 branch September 15, 2023 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-CR normative dependencies will trigger a 2nd CR
5 participants