-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add test suite to readme; term definition for jsonschema #211
Conversation
@iherman please review |
index.html
Outdated
intended to be used with the <a href="#jsonschemacredential"></a> type. The value of | ||
the <code>jsonSchema</code> property MUST be a valid [[JSON-SCHEMA]]. |
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.
There are two related statements:
- §2.1 JsonSchema says that, w.r.t. the
JsonSchema
class, "When dereferencing theid
property associated with theJsonSchema
type value the result is a valid JSON Schema document according to its specification version.". - the statement above that I have just highlighted
There are two alternative interpretations of these two statements when put together.
-
The
jsonSchema
property could be seen as an alternative to the dereferencing process for aJsonSchema
class instance to get to a real Json Schema. In other words, the usage of thejsonSchema
property is not related to the notion ofJsonSchemaCredential
, and it would be perfectly fine to use ajsonSchema
property in the example 1, by simply "folding in" Example 2 into thecredentialSchema
construct. -
The usage of
jsonSchema
is restricted to the situation where theJsonSchema
class instance is the object of thecredentialSubject
property within aJsonSchemaCredential
instance.
I suspect that the intention of the spec is alternative (2). If so, this statement should be very explicitly added to the definition of the property in §2.1 (I know that it is between the lines in §2.2, but not really explicitly). Unfortunately, expressing that in the RDFS ontology is not really possible (or would require some complex OWL ontology construct that I do not think we should use), which means one more reason for this restrictions to appear very explicitly.
Note that, personally, I would not have any problems with alternative (1), which is simpler. But it is not my decision.
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.
Unfortunately, expressing that in the RDFS ontology is not really possible (or would require some complex OWL ontology construct that I do not think we should use), which means one more reason for this restrictions to appear very explicitly.
Actually, there would be one way of introducing this restriction into the vocabulary: define a subclass of JsonSchema
class, something like EmbeddedJsonSchema
, define jsonSchema
's domain as being EmbeddedJsonSchema
, and requiring that the object of a credentialSchema
property, when used in conjunction with JsonSchemaCredential
, would be of type EmbeddedJsonSchema
. A bit more complex, but it works. Not sure it is worth it, though...
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 intended for (2) and will firm up the language.
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.
@iherman please review the latest change, I've added a note with the text you've suggested in section 2.1
See w3c/vc-data-model#1268 for the corresponding PR for the vocabulary |
Co-authored-by: Ivan Herman <[email protected]>
Co-authored-by: Ivan Herman <[email protected]>
@@ -7,6 +7,10 @@ https://w3c.github.io/vc-json-schema/ | |||
We encourage contributions meeting the [Contribution Guidelines](CONTRIBUTING.md). While we prefer the creation of issues | |||
and Pull Requests in the GitHub repository, discussions may also occur on the [public-credentials](http://lists.w3.org/Archives/Public/public-credentials/) mailing list. | |||
|
|||
### Test Suite | |||
|
|||
A [docker](https://www.docker.com/)-based test suite for the specification can [be found here](https://github.com/w3c/vc-json-schema-test-suite). All impelementers are encouraged to add to the test suite. |
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.
The things that jump out after a PR is merged...
A [docker](https://www.docker.com/)-based test suite for the specification can [be found here](https://github.com/w3c/vc-json-schema-test-suite). All impelementers are encouraged to add to the test suite. | |
A [docker](https://www.docker.com/)-based test suite for the specification can [be found here](https://github.com/w3c/vc-json-schema-test-suite). All implementers are encouraged to add to the test suite. |
Add href-able term definition for
jsonSchema
Preview | Diff