From d22a11c17f7fce95ec02b1169de17f672ee21850 Mon Sep 17 00:00:00 2001 From: Ivan Herman Date: Thu, 25 Aug 2022 06:22:38 +0200 Subject: [PATCH 01/11] Update the formal vocabulary files --- vocab/credentials/v2/README.md | 3 + vocab/credentials/v2/credentials.html | 426 ++++++++++++++++++++++++ vocab/credentials/v2/credentials.jsonld | 351 +++++++++++++++++++ vocab/credentials/v2/credentials.ttl | 106 ++++++ vocab/credentials/v2/mk_vocab.rb | 361 ++++++++++++++++++++ vocab/credentials/v2/template.html | 241 ++++++++++++++ vocab/credentials/v2/vocab.csv | 23 ++ 7 files changed, 1511 insertions(+) create mode 100644 vocab/credentials/v2/README.md create mode 100644 vocab/credentials/v2/credentials.html create mode 100644 vocab/credentials/v2/credentials.jsonld create mode 100644 vocab/credentials/v2/credentials.ttl create mode 100755 vocab/credentials/v2/mk_vocab.rb create mode 100644 vocab/credentials/v2/template.html create mode 100644 vocab/credentials/v2/vocab.csv diff --git a/vocab/credentials/v2/README.md b/vocab/credentials/v2/README.md new file mode 100644 index 000000000..c2f41ab63 --- /dev/null +++ b/vocab/credentials/v2/README.md @@ -0,0 +1,3 @@ +# Updating vocabulary + +Vocabulary definitions are managed in vocab.csv. Add or change entries within this file. Regenerate `credentials.ttl`, `credentials.jsonld`, and `credentials.html` by running `mk_vocab.rb`. diff --git a/vocab/credentials/v2/credentials.html b/vocab/credentials/v2/credentials.html new file mode 100644 index 000000000..f65846fbf --- /dev/null +++ b/vocab/credentials/v2/credentials.html @@ -0,0 +1,426 @@ + + + + Verifiable Credentials Vocabulary v2.0 + + + + + + +
+

This document describes the + Verifiable Credentials Vocabulary v2.0 + and Term definitions used for describing Verifiable Credentials [[VC-DATA-MODEL]]. + This document provides the RDFS [[RDF-SCHEMA]] vocabulary definition. + +

+

Alternate versions of the vocabulary definition exist in + Turtle and + JSON-LD. + + +

+
+
Published:
+
Version Info:
+ +
2.0
+
See Also:
+
https://www.w3.org/TR/vc-data-model-2.0/
+
+
+
+

+ Comments regarding this document are welcome. Please file issues + directly on GitHub, or send them to + public-vc-comments@w3.org + (subscribe, + archives). +

+ +
+
+

Introduction

+

This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]].

+

This specification makes use of the following namespaces:

+
+
cred:
+
https://w3.org/2018/credentials#
+
dc:
+
http://purl.org/dc/terms/
+
odrl:
+
http://www.w3.org/ns/odrl/2/
+
xsd:
+
http://www.w3.org/2001/XMLSchema#
+
+
+
+

Class Definitions

+

The following are class definitions in the cred namespace:

+ + + + + + + + + + + + + + + + + + + +
JsonSchemaValidator2018 + Json Schema Validator 2018 +

A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language.

+ +
ManualRefreshService2018 + Manual Refresh Service 2018 +

A type of refresh service that must be interacted with in a manual fashion.

+ +
+
rdfs:subClassOf
+
cred:RefreshService
+
+
RefreshService + Refresh Service +

A refresh service is a mechanism that can be utilized by software agents to retrieve an updated copy of a `verifiable credential`.

+ +
VerifiableCredential + Verifiable Credential +

A `credential` is a set of one or more claims made by an issuer. A `verifiable credential` is a tamper-evident credential that has authorship that can be cryptographically verified. Verifiable credentials can be used to build `verifiable presentations`, which can also be cryptographically verified. The claims in a credential can be about different subjects.

+ +
VerifiableCredentialGraph + Verifiable Credential Graph +

Instances of this class identify RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`

+ +
VerifiablePresentation + Verifiable Presentation +

A `presentation` is data derived from one or more `credentials`, issued by one or more `issuers`, that is shared with a specific `verifier`. A `verifiable presentation` is a tamper-evident `presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs).

+ +
+
+
+

Property Definitions

+

The following are property definitions in the cred namespace:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
credentialSchema + Credential Schema +

The value of the `credentialSchema` property MUST be one or more data schemas that provide verifiers with enough information to determine if the provided data conforms to the provided schema.

+ +
+
rdfs:range
+
cred:CredentialSchema
+
rdfs:domain
+
cred:VerifiableCredential
+
+
credentialStatus + Credential Status +

The value of the `credentialStatus` property MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme), which MUST provide enough information to determine the current status of the credential (for example, suspended or revoked).

+ +
+
rdfs:range
+
cred:CredentialStatus
+
rdfs:domain
+
cred:VerifiableCredential
+
+
credentialSubject + Credential Subject +

An entity about which claims are made.

+ +
+
rdfs:domain
+
cred:VerifiableCredential
+
+
evidence + evidence +

The value of the `evidence` property MUST be one or more evidence schemes providing enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition.

+ +
+
rdfs:range
+
cred:CredentialEvidence
+
rdfs:domain
+
cred:VerifiableCredential
+
+
expirationDate + expiration date +

The value of the `expirationDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential ceases to be valid.

+ +
+
rdfs:range
+
xsd:dateTime
+
rdfs:domain
+
cred:VerifiableCredential
+
+
issuanceDate + issuance date +

The value of the `issuanceDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential was issued. Note that this date represents the earliest date when the information associated with the `credentialSubject` property became valid.

+ +
+
rdfs:range
+
xsd:dateTime
+
rdfs:domain
+
cred:VerifiableCredential
+
+
issuer + issuer +

The value of the `issuer` property MUST be a URI. It is RECOMMENDED that dereferencing the URI results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential.

+ +
+
rdfs:domain
+
cred:VerifiableCredential
+
+
refreshService + refresh service +

The value of the `refreshService` property MUST be one or more refresh services that provides enough information to the holder's software such that the holder can refresh the credential.

+ +
+
rdfs:range
+
cred:RefreshService
+
rdfs:domain
+
cred:VerifiableCredential
+
+
serviceEndpoint + service endpoint +

The value of the `serviceEndpoint` property MUST be a URL to the service endpoint associated with the subject.

+ +
+
rdfs:domain
+
cred:RefreshService
+
+
termsOfUse + terms of use +

If specified, the value of the `termsOfUse` property MUST specify one or more terms of use policies under which the creator issued the credential or presentation. If the recipient (a holder or verifier) is not willing to adhere to the specified terms of use, then they do so on their own responsibility and might incur legal liability if they violate the stated Terms of Use. Each `termsOfUse` MUST specify its type, for example, `IssuerPolicy`, and optionally, its instance `id`. The precise contents of each term of use is determined by the specific `TermsOfUse` type definition.

+ +
+
rdfs:range
+
odrl:Policy
+
rdfs:domain
+
cred:VerifiableCredential
+
+
verifiableCredential + verifiable credential +

The value of the `verifiableCredential` property MUST identify a `VerifiableCredentialGraph` (informally, it indirectly identifies a `VerifiableCredential` contained in a separate graph).

+ +
+
rdfs:range
+
cred:VerifiableCredentialGraph
+
rdfs:domain
+
cred:VerifiablePresentation
+
+
+
+
+

Term Definitions

+
+
JsonSchemaValidator2018
+
+ cred:JsonSchemaValidator2018 +
+
ManualRefreshService2018
+
+ cred:ManualRefreshService2018 +
+
RefreshService
+
+ cred:RefreshService +
+
VerifiableCredential
+
+ cred:VerifiableCredential +
+
VerifiableCredentialGraph
+
+ cred:VerifiableCredentialGraph +
+
VerifiablePresentation
+
+ cred:VerifiablePresentation +
+
credentialSchema
+
+ cred:credentialSchema + with string values interpreted as @id +
+
credentialStatus
+
+ cred:credentialStatus + with string values interpreted as @id +
+
credentialSubject
+
+ cred:credentialSubject + with string values interpreted as @id +
+
evidence
+
+ cred:evidence + with string values interpreted as @id +
+
expirationDate
+
+ cred:expirationDate + with string values interpreted as xsd:dateTime +
+
issuanceDate
+
+ cred:issuanceDate + with string values interpreted as xsd:dateTime +
+
issuer
+
+ cred:issuer + with string values interpreted as @id +
+
refreshService
+
+ cred:refreshService + with string values interpreted as @id +
+
serviceEndpoint
+
+ cred:serviceEndpoint + with string values interpreted as @id +
+
termsOfUse
+
+ cred:termsOfUse + with string values interpreted as @id +
+
verifiableCredential
+
+ cred:verifiableCredential + with string values interpreted as @id + with array values interpreted as @graph +
+
+
+ + diff --git a/vocab/credentials/v2/credentials.jsonld b/vocab/credentials/v2/credentials.jsonld new file mode 100644 index 000000000..d12213c60 --- /dev/null +++ b/vocab/credentials/v2/credentials.jsonld @@ -0,0 +1,351 @@ +{ + "@context": [ + { + "@version": 1.1 + }, + "https://w3id.org/security/v2", + { + "id": "@id", + "type": "@type", + "cred": "https://w3.org/2018/credentials#", + "odrl": "http://www.w3.org/ns/odrl/2/", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "JsonSchemaValidator2018": "cred:JsonSchemaValidator2018", + "ManualRefreshService2018": "cred:ManualRefreshService2018", + "RefreshService": "cred:RefreshService", + "VerifiableCredential": "cred:VerifiableCredential", + "VerifiableCredentialGraph": "cred:VerifiableCredentialGraph", + "VerifiablePresentation": "cred:VerifiablePresentation", + "credentialSchema": { + "@id": "cred:credentialSchema", + "@type": "@id" + }, + "credentialStatus": { + "@id": "cred:credentialStatus", + "@type": "@id" + }, + "credentialSubject": { + "@id": "cred:credentialSubject", + "@type": "@id" + }, + "evidence": { + "@id": "cred:evidence", + "@type": "@id" + }, + "expirationDate": { + "@id": "cred:expirationDate", + "@type": "xsd:dateTime" + }, + "issuanceDate": { + "@id": "cred:issuanceDate", + "@type": "xsd:dateTime" + }, + "issuer": { + "@id": "cred:issuer", + "@type": "@id" + }, + "refreshService": { + "@id": "cred:refreshService", + "@type": "@id" + }, + "serviceEndpoint": { + "@id": "cred:serviceEndpoint", + "@type": "@id" + }, + "termsOfUse": { + "@id": "cred:termsOfUse", + "@type": "@id" + }, + "verifiableCredential": { + "@id": "cred:verifiableCredential", + "@type": "@id", + "@container": "@graph" + } + } + ], + "@graph": { + "@context": { + "id": "@id", + "type": "@type", + "dc": "http://purl.org/dc/terms/", + "owl": "http://www.w3.org/2002/07/owl#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "dc:title": { + "@container": "@language" + }, + "dc:description": { + "@container": "@language" + }, + "dc:date": { + "@type": "xsd:date" + }, + "rdfs:comment": { + "@container": "@language" + }, + "rdfs:domain": { + "@type": "@id" + }, + "rdfs:label": { + "@container": "@language" + }, + "rdfs:range": { + "@type": "@id" + }, + "rdfs:seeAlso": { + "@type": "@id" + }, + "rdfs:subClassOf": { + "@type": "@id" + }, + "rdfs:subPropertyOf": { + "@type": "@id" + }, + "owl:equivalentClass": { + "@type": "@vocab" + }, + "owl:equivalentProperty": { + "@type": "@vocab" + }, + "owl:oneOf": { + "@container": "@list", + "@type": "@vocab" + }, + "owl:imports": { + "@type": "@id" + }, + "owl:versionInfo": { + "@type": "@id" + }, + "owl:inverseOf": { + "@type": "@vocab" + }, + "owl:unionOf": { + "@type": "@vocab", + "@container": "@list" + }, + "rdfs_classes": { + "@reverse": "rdfs:isDefinedBy", + "@type": "@id" + }, + "rdfs_properties": { + "@reverse": "rdfs:isDefinedBy", + "@type": "@id" + }, + "rdfs_datatypes": { + "@reverse": "rdfs:isDefinedBy", + "@type": "@id" + }, + "rdfs_instances": { + "@reverse": "rdfs:isDefinedBy", + "@type": "@id" + } + }, + "@id": "https://w3.org/2018/credentials#", + "@type": "owl:Ontology", + "dc:title": { + "en": "Verifiable Credentials Vocabulary v2.0" + }, + "dc:description": { + "en": "This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]]." + }, + "dc:date": "2022-08-25", + "rdfs:seeAlso": [ + "https://www.w3.org/TR/vc-data-model-2.0/" + ], + "rdfs_classes": [ + { + "@id": "cred:JsonSchemaValidator2018", + "@type": "rdfs:Class", + "rdfs:label": { + "en": " Json Schema Validator 2018" + }, + "rdfs:comment": { + "en": "A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language." + } + }, + { + "@id": "cred:ManualRefreshService2018", + "@type": "rdfs:Class", + "rdfs:label": { + "en": "Manual Refresh Service 2018" + }, + "rdfs:comment": { + "en": "A type of refresh service that must be interacted with in a manual fashion." + }, + "rdfs:subClassOf": "cred:RefreshService" + }, + { + "@id": "cred:RefreshService", + "@type": "rdfs:Class", + "rdfs:label": { + "en": "Refresh Service" + }, + "rdfs:comment": { + "en": "A refresh service is a mechanism that can be utilized by software agents to retrieve an updated copy of a `verifiable credential`." + } + }, + { + "@id": "cred:VerifiableCredential", + "@type": "rdfs:Class", + "rdfs:label": { + "en": "Verifiable Credential" + }, + "rdfs:comment": { + "en": "A `credential` is a set of one or more claims made by an issuer. A `verifiable credential` is a tamper-evident credential that has authorship that can be cryptographically verified. Verifiable credentials can be used to build `verifiable presentations`, which can also be cryptographically verified. The claims in a credential can be about different subjects." + } + }, + { + "@id": "cred:VerifiableCredentialGraph", + "@type": "rdfs:Class", + "rdfs:label": { + "en": "Verifiable Credential Graph" + }, + "rdfs:comment": { + "en": "Instances of this class identify RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`" + } + }, + { + "@id": "cred:VerifiablePresentation", + "@type": "rdfs:Class", + "rdfs:label": { + "en": "Verifiable Presentation" + }, + "rdfs:comment": { + "en": "A `presentation` is data derived from one or more `credentials`, issued by one or more `issuers`, that is shared with a specific `verifier`. A `verifiable presentation` is a tamper-evident `presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs)." + } + } + ], + "rdfs_properties": [ + { + "@id": "cred:credentialSchema", + "@type": "rdf:Property", + "rdfs:label": { + "en": "Credential Schema" + }, + "rdfs:comment": { + "en": "The value of the `credentialSchema` property MUST be one or more data schemas that provide verifiers with enough information to determine if the provided data conforms to the provided schema." + }, + "rdfs:domain": "cred:VerifiableCredential", + "rdfs:range": "cred:CredentialSchema" + }, + { + "@id": "cred:credentialStatus", + "@type": "rdf:Property", + "rdfs:label": { + "en": "Credential Status" + }, + "rdfs:comment": { + "en": "The value of the `credentialStatus` property MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme), which MUST provide enough information to determine the current status of the credential (for example, suspended or revoked)." + }, + "rdfs:domain": "cred:VerifiableCredential", + "rdfs:range": "cred:CredentialStatus" + }, + { + "@id": "cred:credentialSubject", + "@type": "rdf:Property", + "rdfs:label": { + "en": "Credential Subject" + }, + "rdfs:comment": { + "en": "An entity about which claims are made." + }, + "rdfs:domain": "cred:VerifiableCredential" + }, + { + "@id": "cred:evidence", + "@type": "rdf:Property", + "rdfs:label": { + "en": "evidence" + }, + "rdfs:comment": { + "en": "The value of the `evidence` property MUST be one or more evidence schemes providing enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition." + }, + "rdfs:domain": "cred:VerifiableCredential", + "rdfs:range": "cred:CredentialEvidence" + }, + { + "@id": "cred:expirationDate", + "@type": "rdf:Property", + "rdfs:label": { + "en": "expiration date" + }, + "rdfs:comment": { + "en": "The value of the `expirationDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential ceases to be valid." + }, + "rdfs:domain": "cred:VerifiableCredential", + "rdfs:range": "xsd:dateTime" + }, + { + "@id": "cred:issuanceDate", + "@type": "rdf:Property", + "rdfs:label": { + "en": "issuance date" + }, + "rdfs:comment": { + "en": "The value of the `issuanceDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential was issued. Note that this date represents the earliest date when the information associated with the `credentialSubject` property became valid." + }, + "rdfs:domain": "cred:VerifiableCredential", + "rdfs:range": "xsd:dateTime" + }, + { + "@id": "cred:issuer", + "@type": "rdf:Property", + "rdfs:label": { + "en": "issuer" + }, + "rdfs:comment": { + "en": "The value of the `issuer` property MUST be a URI. It is RECOMMENDED that dereferencing the URI results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential." + }, + "rdfs:domain": "cred:VerifiableCredential" + }, + { + "@id": "cred:refreshService", + "@type": "rdf:Property", + "rdfs:label": { + "en": "refresh service" + }, + "rdfs:comment": { + "en": "The value of the `refreshService` property MUST be one or more refresh services that provides enough information to the holder's software such that the holder can refresh the credential." + }, + "rdfs:domain": "cred:VerifiableCredential", + "rdfs:range": "cred:RefreshService" + }, + { + "@id": "cred:serviceEndpoint", + "@type": "rdf:Property", + "rdfs:label": { + "en": "service endpoint" + }, + "rdfs:comment": { + "en": "The value of the `serviceEndpoint` property MUST be a URL to the service endpoint associated with the subject." + }, + "rdfs:domain": "cred:RefreshService" + }, + { + "@id": "cred:termsOfUse", + "@type": "rdf:Property", + "rdfs:label": { + "en": "terms of use" + }, + "rdfs:comment": { + "en": "If specified, the value of the `termsOfUse` property MUST specify one or more terms of use policies under which the creator issued the credential or presentation. If the recipient (a holder or verifier) is not willing to adhere to the specified terms of use, then they do so on their own responsibility and might incur legal liability if they violate the stated Terms of Use. Each `termsOfUse` MUST specify its type, for example, `IssuerPolicy`, and optionally, its instance `id`. The precise contents of each term of use is determined by the specific `TermsOfUse` type definition." + }, + "rdfs:domain": "cred:VerifiableCredential", + "rdfs:range": "odrl:Policy" + }, + { + "@id": "cred:verifiableCredential", + "@type": "rdf:Property", + "rdfs:label": { + "en": "verifiable credential" + }, + "rdfs:comment": { + "en": "The value of the `verifiableCredential` property MUST identify a `VerifiableCredentialGraph` (informally, it indirectly identifies a `VerifiableCredential` contained in a separate graph)." + }, + "rdfs:domain": "cred:VerifiablePresentation", + "rdfs:range": "cred:VerifiableCredentialGraph" + } + ] + } +} diff --git a/vocab/credentials/v2/credentials.ttl b/vocab/credentials/v2/credentials.ttl new file mode 100644 index 000000000..fee452f11 --- /dev/null +++ b/vocab/credentials/v2/credentials.ttl @@ -0,0 +1,106 @@ +@prefix dc: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix cred: . +@prefix odrl: . +@prefix xsd: . + +# CSVM Ontology definition +cred: a owl:Ontology; + dc:title "Verifiable Credentials Vocabulary v2.0"@en; + dc:description """This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]]."""@en; + dc:date "2022-08-25"^^xsd:date; + rdfs:seeAlso ; + +# Class definitions +cred:JsonSchemaValidator2018 a rdfs:Class; + rdfs:label " Json Schema Validator 2018"@en; + rdfs:comment """A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language."""@en; + rdfs:isDefinedBy cred: . +cred:ManualRefreshService2018 a rdfs:Class; + rdfs:label "Manual Refresh Service 2018"@en; + rdfs:comment """A type of refresh service that must be interacted with in a manual fashion."""@en; + rdfs:subClassOf cred:RefreshService; + rdfs:isDefinedBy cred: . +cred:RefreshService a rdfs:Class; + rdfs:label "Refresh Service"@en; + rdfs:comment """A refresh service is a mechanism that can be utilized by software agents to retrieve an updated copy of a `verifiable credential`."""@en; + rdfs:isDefinedBy cred: . +cred:VerifiableCredential a rdfs:Class; + rdfs:label "Verifiable Credential"@en; + rdfs:comment """A `credential` is a set of one or more claims made by an issuer. A `verifiable credential` is a tamper-evident credential that has authorship that can be cryptographically verified. Verifiable credentials can be used to build `verifiable presentations`, which can also be cryptographically verified. The claims in a credential can be about different subjects."""@en; + rdfs:isDefinedBy cred: . +cred:VerifiableCredentialGraph a rdfs:Class; + rdfs:label "Verifiable Credential Graph"@en; + rdfs:comment """Instances of this class identify RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`"""@en; + rdfs:isDefinedBy cred: . +cred:VerifiablePresentation a rdfs:Class; + rdfs:label "Verifiable Presentation"@en; + rdfs:comment """A `presentation` is data derived from one or more `credentials`, issued by one or more `issuers`, that is shared with a specific `verifier`. A `verifiable presentation` is a tamper-evident `presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs)."""@en; + rdfs:isDefinedBy cred: . + +# Property definitions +cred:credentialSchema a rdf:Property; + rdfs:label "Credential Schema"@en; + rdfs:comment """The value of the `credentialSchema` property MUST be one or more data schemas that provide verifiers with enough information to determine if the provided data conforms to the provided schema."""@en; + rdfs:domain cred:VerifiableCredential; + rdfs:range cred:CredentialSchema; + rdfs:isDefinedBy cred: . +cred:credentialStatus a rdf:Property; + rdfs:label "Credential Status"@en; + rdfs:comment """The value of the `credentialStatus` property MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme), which MUST provide enough information to determine the current status of the credential (for example, suspended or revoked)."""@en; + rdfs:domain cred:VerifiableCredential; + rdfs:range cred:CredentialStatus; + rdfs:isDefinedBy cred: . +cred:credentialSubject a rdf:Property; + rdfs:label "Credential Subject"@en; + rdfs:comment """An entity about which claims are made."""@en; + rdfs:domain cred:VerifiableCredential; + rdfs:isDefinedBy cred: . +cred:evidence a rdf:Property; + rdfs:label "evidence"@en; + rdfs:comment """The value of the `evidence` property MUST be one or more evidence schemes providing enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition."""@en; + rdfs:domain cred:VerifiableCredential; + rdfs:range cred:CredentialEvidence; + rdfs:isDefinedBy cred: . +cred:expirationDate a rdf:Property; + rdfs:label "expiration date"@en; + rdfs:comment """The value of the `expirationDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential ceases to be valid."""@en; + rdfs:domain cred:VerifiableCredential; + rdfs:range xsd:dateTime; + rdfs:isDefinedBy cred: . +cred:issuanceDate a rdf:Property; + rdfs:label "issuance date"@en; + rdfs:comment """The value of the `issuanceDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential was issued. Note that this date represents the earliest date when the information associated with the `credentialSubject` property became valid."""@en; + rdfs:domain cred:VerifiableCredential; + rdfs:range xsd:dateTime; + rdfs:isDefinedBy cred: . +cred:issuer a rdf:Property; + rdfs:label "issuer"@en; + rdfs:comment """The value of the `issuer` property MUST be a URI. It is RECOMMENDED that dereferencing the URI results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential."""@en; + rdfs:domain cred:VerifiableCredential; + rdfs:isDefinedBy cred: . +cred:refreshService a rdf:Property; + rdfs:label "refresh service"@en; + rdfs:comment """The value of the `refreshService` property MUST be one or more refresh services that provides enough information to the holder's software such that the holder can refresh the credential."""@en; + rdfs:domain cred:VerifiableCredential; + rdfs:range cred:RefreshService; + rdfs:isDefinedBy cred: . +cred:serviceEndpoint a rdf:Property; + rdfs:label "service endpoint"@en; + rdfs:comment """The value of the `serviceEndpoint` property MUST be a URL to the service endpoint associated with the subject."""@en; + rdfs:domain cred:RefreshService; + rdfs:isDefinedBy cred: . +cred:termsOfUse a rdf:Property; + rdfs:label "terms of use"@en; + rdfs:comment """If specified, the value of the `termsOfUse` property MUST specify one or more terms of use policies under which the creator issued the credential or presentation. If the recipient (a holder or verifier) is not willing to adhere to the specified terms of use, then they do so on their own responsibility and might incur legal liability if they violate the stated Terms of Use. Each `termsOfUse` MUST specify its type, for example, `IssuerPolicy`, and optionally, its instance `id`. The precise contents of each term of use is determined by the specific `TermsOfUse` type definition."""@en; + rdfs:domain cred:VerifiableCredential; + rdfs:range odrl:Policy; + rdfs:isDefinedBy cred: . +cred:verifiableCredential a rdf:Property; + rdfs:label "verifiable credential"@en; + rdfs:comment """The value of the `verifiableCredential` property MUST identify a `VerifiableCredentialGraph` (informally, it indirectly identifies a `VerifiableCredential` contained in a separate graph)."""@en; + rdfs:domain cred:VerifiablePresentation; + rdfs:range cred:VerifiableCredentialGraph; + rdfs:isDefinedBy cred: . diff --git a/vocab/credentials/v2/mk_vocab.rb b/vocab/credentials/v2/mk_vocab.rb new file mode 100755 index 000000000..f681331ae --- /dev/null +++ b/vocab/credentials/v2/mk_vocab.rb @@ -0,0 +1,361 @@ +#! /usr/bin/env ruby +# Parse vocabulary definition in CSV to generate Context+Vocabulary in JSON-LD or Turtle + +require 'getoptlong' +require 'csv' +require 'json' +require 'erubis' + +class Vocab + JSON_STATE = JSON::State.new( + :indent => " ", + :space => " ", + :space_before => "", + :object_nl => "\n", + :array_nl => "\n" + ) + + TITLE = "Verifiable Credentials Vocabulary v2.0".freeze + DESCRIPTION = %(This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]].).freeze + attr_accessor :prefixes, :terms, :properties, :classes, :contexts, :instances, :datatypes, + :imports, :date, :commit, :seeAlso + + def initialize + path = File.expand_path("../vocab.csv", __FILE__) + csv = CSV.new(File.open(path)) + @prefixes, @terms, @properties, @classes, @datatypes, @instances = {}, {}, {}, {}, {}, {} + @contexts, @imports, @seeAlso = [{"@version": 1.1}], [], [] + #git_info = %x{git log -1 #{path}}.split("\n") + #@commit = "https://github.com/w3c/vc-vocab/commit/" + (git_info[0] || 'uncommitted').split.last + date_line = nil #git_info.detect {|l| l.start_with?("Date:")} + @date = Date.parse((date_line || Date.today.to_s).split(":",2).last).strftime("%Y-%m-%d") + + columns = [] + csv.shift.each_with_index {|c, i| columns[i] = c.to_sym if c} + + csv.sort_by(&:to_s).each do |line| + entry = {} + # Create entry as object indexed by symbolized column name + line.each_with_index {|v, i| entry[columns[i]] = v ? v.gsub("\r", "\n").gsub("\\", "\\\\") : nil} + + case entry[:type] + when '@context' then (@contexts ||= []) << entry[:subClassOf] + when 'prefix' then @prefixes[entry[:id]] = entry + when 'term' then @terms[entry[:id]] = entry + when 'rdf:Property' then @properties[entry[:id]] = entry + when 'rdfs:Class' then @classes[entry[:id]] = entry + when 'rdfs:Datatype' then @datatypes[entry[:id]] = entry + when 'owl:imports' then @imports << entry[:subClassOf] + when 'rdfs:seeAlso' then @seeAlso << entry[:subClassOf] + else @instances[entry[:id]] = entry + end + end + + end + + def namespaced(term) + term.include?(":") ? term : "cred:#{term}" + end + + # The full JSON-LD file without the RDFS parts + def to_context + ctx = JSON.parse(to_jsonld) + ctx.delete('@graph') + ctx.to_json(JSON_STATE) + end + + def to_jsonld + context = { + "id" => "@id", + "type" => "@type", + } + rdfs_context = ::JSON.parse %({ + "id": "@id", + "type": "@type", + "dc": "http://purl.org/dc/terms/", + "owl": "http://www.w3.org/2002/07/owl#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "dc:title": {"@container": "@language"}, + "dc:description": {"@container": "@language"}, + "dc:date": {"@type": "xsd:date"}, + "rdfs:comment": {"@container": "@language"}, + "rdfs:domain": {"@type": "@id"}, + "rdfs:label": {"@container": "@language"}, + "rdfs:range": {"@type": "@id"}, + "rdfs:seeAlso": {"@type": "@id"}, + "rdfs:subClassOf": {"@type": "@id"}, + "rdfs:subPropertyOf": {"@type": "@id"}, + "owl:equivalentClass": {"@type": "@vocab"}, + "owl:equivalentProperty": {"@type": "@vocab"}, + "owl:oneOf": {"@container": "@list", "@type": "@vocab"}, + "owl:imports": {"@type": "@id"}, + "owl:versionInfo": {"@type": "@id"}, + "owl:inverseOf": {"@type": "@vocab"}, + "owl:unionOf": {"@type": "@vocab", "@container": "@list"}, + "rdfs_classes": {"@reverse": "rdfs:isDefinedBy", "@type": "@id"}, + "rdfs_properties": {"@reverse": "rdfs:isDefinedBy", "@type": "@id"}, + "rdfs_datatypes": {"@reverse": "rdfs:isDefinedBy", "@type": "@id"}, + "rdfs_instances": {"@reverse": "rdfs:isDefinedBy", "@type": "@id"} + }) + rdfs_classes, rdfs_properties, rdfs_datatypes, rdfs_instances = [], [], [], [] + + prefixes.each do |id, entry| + context[id] = entry[:subClassOf] + end + + terms.each do |id, entry| + next if entry[:@type] == '@null' + context[id] = if [:@container, :@type].any? {|k| entry[k]} + {'@id' => entry[:subClassOf]}. + merge(entry[:@container] ? {'@container' => entry[:@container]} : {}). + merge(entry[:@type] ? {'@type' => entry[:@type]} : {}) + else + entry[:subClassOf] + end + end + + classes.each do |id, entry| + term = entry[:term] || id + context[term] = namespaced(id) unless entry[:@type] == '@null' + + # Class definition + node = { + '@id' => namespaced(id), + '@type' => 'rdfs:Class', + 'rdfs:label' => {"en" => entry[:label].to_s}, + 'rdfs:comment' => {"en" => entry[:comment].to_s}, + } + node['rdfs:subClassOf'] = namespaced(entry[:subClassOf]) if entry[:subClassOf] + rdfs_classes << node + end + + properties.each do |id, entry| + defn = {"@id" => namespaced(id)} + case entry[:range] + when "xsd:string" then defn['@language'] = nil + when /xsd:/ then defn['@type'] = entry[:range].split(',').first + when nil, + 'rdfs:Literal' then ; + else defn['@type'] = '@id' + end + + defn['@container'] = entry[:@container] if entry[:@container] + defn['@type'] = entry[:@type] if entry[:@type] + + term = entry[:term] || id + context[term] = defn unless entry[:@type] == '@null' + + # Property definition + node = { + '@id' => namespaced(id), + '@type' => 'rdf:Property', + 'rdfs:label' => {"en" => entry[:label].to_s}, + 'rdfs:comment' => {"en" => entry[:comment].to_s}, + } + node['rdfs:subPropertyOf'] = namespaced(entry[:subClassOf]) if entry[:subClassOf] + + domains = entry[:domain].to_s.split(',') + case domains.length + when 0 then ; + when 1 then node['rdfs:domain'] = namespaced(domains.first) + else node['rdfs:domain'] = {'owl:unionOf' => domains.map {|d| namespaced(d)}} + end + + ranges = entry[:range].to_s.split(',') + case ranges.length + when 0 then ; + when 1 then node['rdfs:range'] = namespaced(ranges.first) + else node['rdfs:range'] = {'owl:unionOf' => ranges.map {|r| namespaced(r)}} + end + + rdfs_properties << node + end + + datatypes.each do |id, entry| + context[id] = namespaced(id) unless entry[:@type] == '@null' + + # Datatype definition + node = { + '@id' => namespaced(id), + '@type' => 'rdfs:Datatype', + 'rdfs:label' => {"en" => entry[:label].to_s}, + 'rdfs:comment' => {"en" => entry[:comment].to_s}, + } + node['rdfs:subClassOf'] = namespaced(entry[:subClassOf]) if entry[:subClassOf] + rdfs_datatypes << node + end + + instances.each do |id, entry| + context[id] = namespaced(id) unless entry[:@type] == '@null' + # Instance definition + rdfs_instances << { + '@id' => namespaced(id), + '@type' => entry[:type], + 'rdfs:label' => {"en" => entry[:label].to_s}, + 'rdfs:comment' => {"en" => entry[:comment].to_s}, + } + end + + # Use separate rdfs context so as not to polute the context. + ontology = { + "@context" => rdfs_context, + "@id" => prefixes["cred"][:subClassOf], + "@type" => "owl:Ontology", + "dc:title" => {"en" => TITLE}, + "dc:description" => {"en" => DESCRIPTION}, + "dc:date" => date, + "owl:imports" => imports, + #"owl:versionInfo" => commit, + "rdfs:seeAlso" => seeAlso, + "rdfs_classes" => rdfs_classes, + "rdfs_properties" => rdfs_properties, + "rdfs_datatypes" => rdfs_datatypes, + "rdfs_instances" => rdfs_instances + }.delete_if {|k,v| Array(v).empty?} + + # Imported contexts + context = contexts + [context]unless contexts.empty? + + { + "@context" => context, + "@graph" => ontology + }.to_json(JSON_STATE) + end + + def to_html + json = JSON.parse(to_jsonld) + eruby = Erubis::Eruby.new(File.read("template.html")) + eruby.result(ont: json['@graph'], context: json['@context'].is_a?(Array) ? json['@context'].last : json['@context']) + end + + def to_ttl + output = [] + + prefixes = { + "dc" => {subClassOf: "http;//purl.org/dc/terms/"}, + "owl" => {subClassOf: "http://www.w3.org/2002/07/owl#"}, + "rdf" => {subClassOf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"}, + "rdfs" => {subClassOf: "http://www.w3.org/2000/01/rdf-schema#"}, + }.merge(@prefixes).dup + prefixes.each {|id, entry| output << "@prefix #{id}: <#{entry[:subClassOf]}> ."} + + output << "\n# CSVM Ontology definition" + output << "cred: a owl:Ontology;" + output << %( dc:title "#{TITLE}"@en;) + output << %( dc:description """#{DESCRIPTION}"""@en;) + output << %( dc:date "#{date}"^^xsd:date;) + #output << %( dc:imports #{imports.map {|i| '<' + i + '>'}.join(", ")};) + #output << %( owl:versionInfo <#{commit}>;) + output << %( rdfs:seeAlso #{seeAlso.map {|i| '<' + i + '>'}.join(", ")};) + + output << "\n# Class definitions" unless @classes.empty? + @classes.each do |id, entry| + output << "cred:#{id} a rdfs:Class;" + output << %( rdfs:label "#{entry[:label]}"@en;) + output << %( rdfs:comment """#{entry[:comment]}"""@en;) + output << %( rdfs:subClassOf #{namespaced(entry[:subClassOf])};) if entry[:subClassOf] + output << %( rdfs:isDefinedBy cred: .) + end + + output << "\n# Property definitions" unless @properties.empty? + @properties.each do |id, entry| + output << "cred:#{id} a rdf:Property;" + output << %( rdfs:label "#{entry[:label]}"@en;) + output << %( rdfs:comment """#{entry[:comment]}"""@en;) + output << %( rdfs:subPropertyOf #{namespaced(entry[:subClassOf])};) if entry[:subClassOf] + domains = entry[:domain].to_s.split(',') + case domains.length + when 0 then ; + when 1 then output << %( rdfs:domain #{namespaced(entry[:domain])};) + else + output << %( rdfs:domain [ owl:unionOf (#{domains.map {|d| namespaced(d)}.join(' ')})];) + end + + ranges = entry[:range].to_s.split(',') + case ranges.length + when 0 then ; + when 1 then output << %( rdfs:range #{namespaced(entry[:range])};) + else + output << %( rdfs:range [ owl:unionOf (#{ranges.map {|d| namespaced(d)}.join(' ')})];) + end + output << %( rdfs:isDefinedBy cred: .) + end + + output << "\n# Datatype definitions" unless @datatypes.empty? + @datatypes.each do |id, entry| + output << "cred:#{id} a rdfs:Datatype;" + output << %( rdfs:label "#{entry[:label]}"@en;) + output << %( rdfs:comment """#{entry[:comment]}"""@en;) + output << %( rdfs:subClassOf #{namespaced(entry[:subClassOf])};) if entry[:subClassOf] + output << %( rdfs:isDefinedBy cred: .) + end + + output << "\n# Instance definitions" unless @instances.empty? + @instances.each do |id, entry| + output << "cred:#{id} a #{namespaced(entry[:type])};" + output << %( rdfs:label "#{entry[:label]}"@en;) + output << %( rdfs:comment """#{entry[:comment]}"""@en;) + output << %( rdfs:isDefinedBy cred: .) + end + + output.join("\n") + end +end + +options = { + output: $stdout +} + +OPT_ARGS = [ + ["--format", "-f", GetoptLong::REQUIRED_ARGUMENT,"Output format, default #{options[:format].inspect}"], + ["--output", "-o", GetoptLong::REQUIRED_ARGUMENT,"Output to the specified file path"], + ["--quiet", GetoptLong::NO_ARGUMENT, "Supress most output other than progress indicators"], + ["--help", "-?", GetoptLong::NO_ARGUMENT, "This message"] +] +def usage + STDERR.puts %{Usage: #{$0} [options] URL ...} + width = OPT_ARGS.map do |o| + l = o.first.length + l += o[1].length + 2 if o[1].is_a?(String) + l + end.max + OPT_ARGS.each do |o| + s = " %-*s " % [width, (o[1].is_a?(String) ? "#{o[0,2].join(', ')}" : o[0])] + s += o.last + STDERR.puts s + end + exit(1) +end + +opts = GetoptLong.new(*OPT_ARGS.map {|o| o[0..-2]}) + +opts.each do |opt, arg| + case opt + when '--format' then options[:format] = arg.to_sym + when '--output' then options[:output] = File.open(arg, "w") + when '--quiet' then options[:quiet] = true + when '--help' then usage + end +end + +vocab = Vocab.new +case options[:format] +when :context then options[:output].puts(vocab.to_context) +when :jsonld then options[:output].puts(vocab.to_jsonld) +when :ttl then options[:output].puts(vocab.to_ttl) +when :html then options[:output].puts(vocab.to_html) +else + # [:jsonld, :context, :ttl, :html].each do |format| + # fn = {context: "context.jsonld", jsonld: "credentials.jsonld", ttl: "credentials.ttl", html: "credentials.html"}[format] + # File.open(fn, "w") do |output| + # output.puts(vocab.send("to_#{format}".to_sym)) + # end + # end + [:jsonld, :ttl, :html].each do |format| + fn = {jsonld: "credentials.jsonld", ttl: "credentials.ttl", html: "credentials.html"}[format] + File.open(fn, "w") do |output| + output.puts(vocab.send("to_#{format}".to_sym)) + end + end +end diff --git a/vocab/credentials/v2/template.html b/vocab/credentials/v2/template.html new file mode 100644 index 000000000..2ec6de819 --- /dev/null +++ b/vocab/credentials/v2/template.html @@ -0,0 +1,241 @@ + + + + <%= ont["dc:title"]["en"] %> + + + + + + +
+

This document describes the + <%= ont["dc:title"]["en"] %> + and Term definitions used for describing Verifiable Credentials [[VC-DATA-MODEL]]. + This document provides the RDFS [[RDF-SCHEMA]] vocabulary definition. + +

+

Alternate versions of the vocabulary definition exist in + Turtle and + JSON-LD. + + +

+
+
Published:
+ <%- unless Array(ont["owl:imports"]).empty?%> +
Imports:
+ <%- Array(ont["owl:imports"]).each do |ref| %> +
<%=ref%>
+ <% end -%> + <% end -%> +
Version Info:
+ +
2.0
+
See Also:
+ <% Array(ont["rdfs:seeAlso"]).each do |ref| %> +
<%=ref%>
+ <% end %> +
+
+
+

+ Comments regarding this document are welcome. Please file issues + directly on GitHub, or send them to + public-vc-comments@w3.org + (subscribe, + archives). +

+ +
+
+

Introduction

+

<%= ont["dc:description"]["en"] %>

+

This specification makes use of the following namespaces:

+
+
cred:
+
https://w3.org/2018/credentials#
+
dc:
+
http://purl.org/dc/terms/
+
odrl:
+
http://www.w3.org/ns/odrl/2/
+
xsd:
+
http://www.w3.org/2001/XMLSchema#
+
+
+ <% + [{ + heading: "Class Definitions", + key: "rdfs_classes" + }, { + heading: "Property Definitions", + key: "rdfs_properties" + }, { + heading: "Datatype Definitions", + key: "rdfs_datatypes" + }, { + heading: "Instance Definitions", + key: "rdfs_instances" + }].each do |sect| + %> + <% next if Array(ont[sect[:key]]).empty? %> +
+

<%= sect[:heading] %>

+

The following are <%= sect[:heading].downcase %> in the cred namespace:

+ + <% Array(ont[sect[:key]]).each do |defn| -%> + + + + <% end -%> +
<%= defn['@id'][5..-1] %>"> + <%= defn['rdfs:label']['en'] %> +

<%= defn['rdfs:comment']['en'] %>

+ + <% if %w(rdfs:subClassOf rdfs:subPropertyOf rdfs:range rdfs:domain).any? { |p| defn.has_key?(p)} %> +
+ <% %w(rdfs:subClassOf rdfs:subPropertyOf rdfs:range rdfs:domain).each do |p| %> + <% if defn.has_key?(p) %> +
<%= p %>
+ <% Array(defn[p]).each do |v| %> + <%if v.is_a?(Array) && v.first == 'owl:unionOf' %> +
+ Union of + <% v.last.each do |c| %> + <%= c %> + <% end%> +
+ <% else %> +
<%= v %>
+ <% end %> + <% end %> + <% end %> + <% end %> +
+ <% end %> +
+
+ <% end%> +
+

Term Definitions

+
+ <% context.keys.sort.each do |term|%> + <% defn = context[term] %> + <% if term != "xsd" && term != "cred" && term != "id" && term != "odrl" && term != "type" %> +
<%= term %>
+
+ <% if defn.is_a?(String) %> + <%= defn %> + <% elsif defn['@id'] %> + <%= defn['@id'] %> + <% elsif defn['@reverse'] %> + reverse of <%= defn['@reverse'] %> + <% else %> + <%= term %> + <% end %> + <% if defn.is_a?(Hash) && defn['@type'] %> + with string values interpreted as <%= defn['@type'] %> + <% end%> + <% if defn.is_a?(Hash) && defn['@container'] %> + <% if defn['@container'] == '@language' %> + with object values interpreted as language-specific, indexed by language + <% elsif defn['@container'] == '@index' %> + with object values interpreted indexed by index + <% else %> + with array values interpreted as <%= defn['@container'] %> + <% end %> + <% end%> +
+ <% end %> + <% end %> +
+
+ + diff --git a/vocab/credentials/v2/vocab.csv b/vocab/credentials/v2/vocab.csv new file mode 100644 index 000000000..2c93c7dbf --- /dev/null +++ b/vocab/credentials/v2/vocab.csv @@ -0,0 +1,23 @@ +id,type,label,subClassOf,domain,range,@type,@container,comment +,@context,,https://w3id.org/security/v2,,,,, +cred,prefix,,https://w3.org/2018/credentials#,,,,, +odrl,prefix,,http://www.w3.org/ns/odrl/2/,,,,, +xsd,prefix,,http://www.w3.org/2001/XMLSchema#,,,,, +,rdfs:seeAlso,,https://www.w3.org/TR/vc-data-model-2.0/,,,,, +JsonSchemaValidator2018,rdfs:Class, Json Schema Validator 2018,,,,,,A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language. +ManualRefreshService2018,rdfs:Class,Manual Refresh Service 2018,cred:RefreshService,,,,,A type of refresh service that must be interacted with in a manual fashion. +RefreshService,rdfs:Class,Refresh Service,,,,,,A refresh service is a mechanism that can be utilized by software agents to retrieve an updated copy of a `verifiable credential`. +VerifiableCredential,rdfs:Class,Verifiable Credential,,,,,,"A `credential` is a set of one or more claims made by an issuer. A `verifiable credential` is a tamper-evident credential that has authorship that can be cryptographically verified. Verifiable credentials can be used to build `verifiable presentations`, which can also be cryptographically verified. The claims in a credential can be about different subjects." +VerifiableCredentialGraph,rdfs:Class,Verifiable Credential Graph,,,,,,"Instances of this class identify RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`" +VerifiablePresentation,rdfs:Class,Verifiable Presentation,,,,,,"A `presentation` is data derived from one or more `credentials`, issued by one or more `issuers`, that is shared with a specific `verifier`. A `verifiable presentation` is a tamper-evident `presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs)." +credentialSchema,rdf:Property,Credential Schema,,VerifiableCredential,cred:CredentialSchema,@id,,The value of the `credentialSchema` property MUST be one or more data schemas that provide verifiers with enough information to determine if the provided data conforms to the provided schema. +credentialStatus,rdf:Property,Credential Status,,VerifiableCredential,cred:CredentialStatus,@id,,"The value of the `credentialStatus` property MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme), which MUST provide enough information to determine the current status of the credential (for example, suspended or revoked)." +credentialSubject,rdf:Property,Credential Subject,,VerifiableCredential,,@id,,An entity about which claims are made. +evidence,rdf:Property,evidence,,VerifiableCredential,cred:CredentialEvidence,,,The value of the `evidence` property MUST be one or more evidence schemes providing enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition. +expirationDate,rdf:Property,expiration date,,VerifiableCredential,xsd:dateTime,,,The value of the `expirationDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential ceases to be valid. +issuanceDate,rdf:Property,issuance date,,VerifiableCredential,xsd:dateTime,,,The value of the `issuanceDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential was issued. Note that this date represents the earliest date when the information associated with the `credentialSubject` property became valid. +issuer,rdf:Property,issuer,,VerifiableCredential,,@id,,The value of the `issuer` property MUST be a URI. It is RECOMMENDED that dereferencing the URI results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential. +refreshService,rdf:Property,refresh service,,VerifiableCredential,cred:RefreshService,@id,,The value of the `refreshService` property MUST be one or more refresh services that provides enough information to the holder's software such that the holder can refresh the credential. +serviceEndpoint,rdf:Property,service endpoint,,RefreshService,,@id,,The value of the `serviceEndpoint` property MUST be a URL to the service endpoint associated with the subject. +termsOfUse,rdf:Property,terms of use,,VerifiableCredential,odrl:Policy,@id,,"If specified, the value of the `termsOfUse` property MUST specify one or more terms of use policies under which the creator issued the credential or presentation. If the recipient (a holder or verifier) is not willing to adhere to the specified terms of use, then they do so on their own responsibility and might incur legal liability if they violate the stated Terms of Use. Each `termsOfUse` MUST specify its type, for example, `IssuerPolicy`, and optionally, its instance `id`. The precise contents of each term of use is determined by the specific `TermsOfUse` type definition." +verifiableCredential,rdf:Property,verifiable credential,,VerifiablePresentation,cred:VerifiableCredentialGraph,@id,@graph,"The value of the `verifiableCredential` property MUST identify a `VerifiableCredentialGraph` (informally, it indirectly identifies a `VerifiableCredential` contained in a separate graph)." From e33814f257e2c8323a4061329b8799efd116ce7e Mon Sep 17 00:00:00 2001 From: Ivan Herman Date: Thu, 25 Aug 2022 11:20:57 +0200 Subject: [PATCH 02/11] Bugs found by PA --- vocab/credentials/v2/credentials.html | 33 +++++++++++++++++++++++++ vocab/credentials/v2/credentials.jsonld | 33 +++++++++++++++++++++++++ vocab/credentials/v2/credentials.ttl | 15 ++++++++++- vocab/credentials/v2/mk_vocab.rb | 3 ++- vocab/credentials/v2/vocab.csv | 3 +++ 5 files changed, 85 insertions(+), 2 deletions(-) diff --git a/vocab/credentials/v2/credentials.html b/vocab/credentials/v2/credentials.html index f65846fbf..03f1df0f4 100644 --- a/vocab/credentials/v2/credentials.html +++ b/vocab/credentials/v2/credentials.html @@ -146,6 +146,27 @@

Introduction

Class Definitions

The following are class definitions in the cred namespace:

+ + + + + + + + + diff --git a/vocab/credentials/v2/credentials.jsonld b/vocab/credentials/v2/credentials.jsonld index 5f2e5d28e..1be8153f3 100644 --- a/vocab/credentials/v2/credentials.jsonld +++ b/vocab/credentials/v2/credentials.jsonld @@ -152,7 +152,7 @@ "dc:description": { "en": "This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]]." }, - "dc:date": "2022-08-25", + "dc:date": "2022-08-26", "rdfs:seeAlso": [ "https://www.w3.org/TR/vc-data-model-2.0/" ], @@ -235,7 +235,7 @@ "en": "Verifiable Credential Graph" }, "rdfs:comment": { - "en": "Instances of this class identify RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`" + "en": "Instances of this class are RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`" } }, { diff --git a/vocab/credentials/v2/credentials.ttl b/vocab/credentials/v2/credentials.ttl index d8f6fd057..b4e3b8946 100644 --- a/vocab/credentials/v2/credentials.ttl +++ b/vocab/credentials/v2/credentials.ttl @@ -10,7 +10,7 @@ cred: a owl:Ontology; dc:title "Verifiable Credentials Vocabulary v2.0"@en; dc:description """This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]]."""@en; - dc:date "2022-08-25"^^xsd:date; + dc:date "2022-08-26"^^xsd:date; rdfs:seeAlso ; . @@ -46,7 +46,7 @@ cred:VerifiableCredential a rdfs:Class; rdfs:isDefinedBy cred: . cred:VerifiableCredentialGraph a rdfs:Class; rdfs:label "Verifiable Credential Graph"@en; - rdfs:comment """Instances of this class identify RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`"""@en; + rdfs:comment """Instances of this class are RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`"""@en; rdfs:isDefinedBy cred: . cred:VerifiablePresentation a rdfs:Class; rdfs:label "Verifiable Presentation"@en; diff --git a/vocab/credentials/v2/vocab.csv b/vocab/credentials/v2/vocab.csv index d74aa056d..f67d860ca 100644 --- a/vocab/credentials/v2/vocab.csv +++ b/vocab/credentials/v2/vocab.csv @@ -11,7 +11,7 @@ CredentialSchema,rdfs:Class,Credential Schema,,,,,,T.B.D. CredentialStatus,rdfs:Class,Credential Status,,,,,,T.B.D. CredentialEvidence,rdfs:Class,Credential Evidence,,,,,,T.B.D. VerifiableCredential,rdfs:Class,Verifiable Credential,,,,,,"A `credential` is a set of one or more claims made by an issuer. A `verifiable credential` is a tamper-evident credential that has authorship that can be cryptographically verified. Verifiable credentials can be used to build `verifiable presentations`, which can also be cryptographically verified. The claims in a credential can be about different subjects." -VerifiableCredentialGraph,rdfs:Class,Verifiable Credential Graph,,,,,,"Instances of this class identify RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`" +VerifiableCredentialGraph,rdfs:Class,Verifiable Credential Graph,,,,,,"Instances of this class are RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`" VerifiablePresentation,rdfs:Class,Verifiable Presentation,,,,,,"A `presentation` is data derived from one or more `credentials`, issued by one or more `issuers`, that is shared with a specific `verifier`. A `verifiable presentation` is a tamper-evident `presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs)." credentialSchema,rdf:Property,Credential Schema,,VerifiableCredential,cred:CredentialSchema,@id,,The value of the `credentialSchema` property MUST be one or more data schemas that provide verifiers with enough information to determine if the provided data conforms to the provided schema. credentialStatus,rdf:Property,Credential Status,,VerifiableCredential,cred:CredentialStatus,@id,,"The value of the `credentialStatus` property MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme), which MUST provide enough information to determine the current status of the credential (for example, suspended or revoked)." From 5cd2253a70ff72d01edbb1aa5cb244fa44dc1ccf Mon Sep 17 00:00:00 2001 From: Ivan Herman Date: Fri, 26 Aug 2022 14:17:16 +0200 Subject: [PATCH 04/11] Updated the descriptions --- vocab/credentials/v2/credentials.html | 66 ++++++++++++------------- vocab/credentials/v2/credentials.jsonld | 26 +++++----- vocab/credentials/v2/credentials.ttl | 26 +++++----- vocab/credentials/v2/template.html | 2 +- vocab/credentials/v2/vocab.csv | 26 +++++----- 5 files changed, 73 insertions(+), 73 deletions(-) diff --git a/vocab/credentials/v2/credentials.html b/vocab/credentials/v2/credentials.html index d7f811434..baa7ee990 100644 --- a/vocab/credentials/v2/credentials.html +++ b/vocab/credentials/v2/credentials.html @@ -146,38 +146,38 @@

Introduction

Class Definitions

The following are class definitions in the cred namespace:

CredentialEvidence + Credential Evidence +

T.B.D.

+ +
CredentialSchema + Credential Schema +

T.B.D.

+ +
CredentialStatus + Credential Status +

T.B.D.

+ +
JsonSchemaValidator2018 Json Schema Validator 2018 @@ -340,6 +361,18 @@

Property Definitions

Term Definitions

+
CredentialEvidence
+
+ cred:CredentialEvidence +
+
CredentialSchema
+
+ cred:CredentialSchema +
+
CredentialStatus
+
+ cred:CredentialStatus +
JsonSchemaValidator2018
cred:JsonSchemaValidator2018 diff --git a/vocab/credentials/v2/credentials.jsonld b/vocab/credentials/v2/credentials.jsonld index d12213c60..5f2e5d28e 100644 --- a/vocab/credentials/v2/credentials.jsonld +++ b/vocab/credentials/v2/credentials.jsonld @@ -10,6 +10,9 @@ "cred": "https://w3.org/2018/credentials#", "odrl": "http://www.w3.org/ns/odrl/2/", "xsd": "http://www.w3.org/2001/XMLSchema#", + "CredentialEvidence": "cred:CredentialEvidence", + "CredentialSchema": "cred:CredentialSchema", + "CredentialStatus": "cred:CredentialStatus", "JsonSchemaValidator2018": "cred:JsonSchemaValidator2018", "ManualRefreshService2018": "cred:ManualRefreshService2018", "RefreshService": "cred:RefreshService", @@ -154,6 +157,36 @@ "https://www.w3.org/TR/vc-data-model-2.0/" ], "rdfs_classes": [ + { + "@id": "cred:CredentialEvidence", + "@type": "rdfs:Class", + "rdfs:label": { + "en": "Credential Evidence" + }, + "rdfs:comment": { + "en": "T.B.D." + } + }, + { + "@id": "cred:CredentialSchema", + "@type": "rdfs:Class", + "rdfs:label": { + "en": "Credential Schema" + }, + "rdfs:comment": { + "en": "T.B.D." + } + }, + { + "@id": "cred:CredentialStatus", + "@type": "rdfs:Class", + "rdfs:label": { + "en": "Credential Status" + }, + "rdfs:comment": { + "en": "T.B.D." + } + }, { "@id": "cred:JsonSchemaValidator2018", "@type": "rdfs:Class", diff --git a/vocab/credentials/v2/credentials.ttl b/vocab/credentials/v2/credentials.ttl index fee452f11..d8f6fd057 100644 --- a/vocab/credentials/v2/credentials.ttl +++ b/vocab/credentials/v2/credentials.ttl @@ -1,4 +1,4 @@ -@prefix dc: . +@prefix dc: . @prefix owl: . @prefix rdf: . @prefix rdfs: . @@ -12,8 +12,21 @@ cred: a owl:Ontology; dc:description """This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]]."""@en; dc:date "2022-08-25"^^xsd:date; rdfs:seeAlso ; +. # Class definitions +cred:CredentialEvidence a rdfs:Class; + rdfs:label "Credential Evidence"@en; + rdfs:comment """T.B.D."""@en; + rdfs:isDefinedBy cred: . +cred:CredentialSchema a rdfs:Class; + rdfs:label "Credential Schema"@en; + rdfs:comment """T.B.D."""@en; + rdfs:isDefinedBy cred: . +cred:CredentialStatus a rdfs:Class; + rdfs:label "Credential Status"@en; + rdfs:comment """T.B.D."""@en; + rdfs:isDefinedBy cred: . cred:JsonSchemaValidator2018 a rdfs:Class; rdfs:label " Json Schema Validator 2018"@en; rdfs:comment """A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language."""@en; diff --git a/vocab/credentials/v2/mk_vocab.rb b/vocab/credentials/v2/mk_vocab.rb index f681331ae..aca99bc55 100755 --- a/vocab/credentials/v2/mk_vocab.rb +++ b/vocab/credentials/v2/mk_vocab.rb @@ -233,7 +233,7 @@ def to_ttl output = [] prefixes = { - "dc" => {subClassOf: "http;//purl.org/dc/terms/"}, + "dc" => {subClassOf: "http://purl.org/dc/terms/"}, "owl" => {subClassOf: "http://www.w3.org/2002/07/owl#"}, "rdf" => {subClassOf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"}, "rdfs" => {subClassOf: "http://www.w3.org/2000/01/rdf-schema#"}, @@ -248,6 +248,7 @@ def to_ttl #output << %( dc:imports #{imports.map {|i| '<' + i + '>'}.join(", ")};) #output << %( owl:versionInfo <#{commit}>;) output << %( rdfs:seeAlso #{seeAlso.map {|i| '<' + i + '>'}.join(", ")};) + output << "." output << "\n# Class definitions" unless @classes.empty? @classes.each do |id, entry| diff --git a/vocab/credentials/v2/vocab.csv b/vocab/credentials/v2/vocab.csv index 2c93c7dbf..d74aa056d 100644 --- a/vocab/credentials/v2/vocab.csv +++ b/vocab/credentials/v2/vocab.csv @@ -7,6 +7,9 @@ xsd,prefix,,http://www.w3.org/2001/XMLSchema#,,,,, JsonSchemaValidator2018,rdfs:Class, Json Schema Validator 2018,,,,,,A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language. ManualRefreshService2018,rdfs:Class,Manual Refresh Service 2018,cred:RefreshService,,,,,A type of refresh service that must be interacted with in a manual fashion. RefreshService,rdfs:Class,Refresh Service,,,,,,A refresh service is a mechanism that can be utilized by software agents to retrieve an updated copy of a `verifiable credential`. +CredentialSchema,rdfs:Class,Credential Schema,,,,,,T.B.D. +CredentialStatus,rdfs:Class,Credential Status,,,,,,T.B.D. +CredentialEvidence,rdfs:Class,Credential Evidence,,,,,,T.B.D. VerifiableCredential,rdfs:Class,Verifiable Credential,,,,,,"A `credential` is a set of one or more claims made by an issuer. A `verifiable credential` is a tamper-evident credential that has authorship that can be cryptographically verified. Verifiable credentials can be used to build `verifiable presentations`, which can also be cryptographically verified. The claims in a credential can be about different subjects." VerifiableCredentialGraph,rdfs:Class,Verifiable Credential Graph,,,,,,"Instances of this class identify RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`" VerifiablePresentation,rdfs:Class,Verifiable Presentation,,,,,,"A `presentation` is data derived from one or more `credentials`, issued by one or more `issuers`, that is shared with a specific `verifier`. A `verifiable presentation` is a tamper-evident `presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs)." From c9139987eb3fea68269702a97810e044e3fbbba3 Mon Sep 17 00:00:00 2001 From: Ivan Herman Date: Fri, 26 Aug 2022 11:56:58 +0200 Subject: [PATCH 03/11] Updated the class description per @pchampin --- vocab/credentials/v2/credentials.html | 6 +++--- vocab/credentials/v2/credentials.jsonld | 4 ++-- vocab/credentials/v2/credentials.ttl | 4 ++-- vocab/credentials/v2/vocab.csv | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vocab/credentials/v2/credentials.html b/vocab/credentials/v2/credentials.html index 03f1df0f4..d7f811434 100644 --- a/vocab/credentials/v2/credentials.html +++ b/vocab/credentials/v2/credentials.html @@ -20,7 +20,7 @@ }, specStatus: "base", shortName: "2018/credentials/v2", - publishDate: "2022-08-25", + publishDate: "2022-08-26", thisVersion: "https://w3.org/2018/credentials/v2", doJsonLd: true, editors: [{ @@ -99,7 +99,7 @@

-
Published:
+
Published:
Version Info:
2.0
@@ -202,7 +202,7 @@

Class Definitions

VerifiableCredentialGraph Verifiable Credential Graph -

Instances of this class identify RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`

+

Instances of this class are RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`

- + - + - + - + - + - + - + - + - + @@ -219,10 +219,10 @@

Class Definitions

Property Definitions

The following are property definitions in the cred namespace:

CredentialEvidence
CredentialEvidence Credential Evidence -

T.B.D.

+

A `Credential Evidence` scheme provides enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition.

CredentialSchema
CredentialSchema Credential Schema -

T.B.D.

+

A `Credential Schema` provides verifiers with enough information to determine if the provided data conforms to the provided schema.

CredentialStatus
CredentialStatus Credential Status -

T.B.D.

+

A `Credential Status` provides enough information to determine the current status of the credential (for example, suspended or revoked). It MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme)

JsonSchemaValidator2018
JsonSchemaValidator2018 Json Schema Validator 2018

A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language.

ManualRefreshService2018
ManualRefreshService2018 Manual Refresh Service 2018 -

A type of refresh service that must be interacted with in a manual fashion.

+

A type of `Refresh Service` that must be interacted with in a manual fashion.

rdfs:subClassOf
@@ -185,31 +185,31 @@

Class Definitions

RefreshService
RefreshService Refresh Service -

A refresh service is a mechanism that can be utilized by software agents to retrieve an updated copy of a `verifiable credential`.

+

A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Dredential`.

VerifiableCredential
VerifiableCredential Verifiable Credential -

A `credential` is a set of one or more claims made by an issuer. A `verifiable credential` is a tamper-evident credential that has authorship that can be cryptographically verified. Verifiable credentials can be used to build `verifiable presentations`, which can also be cryptographically verified. The claims in a credential can be about different subjects.

+

A `Credential` is a set of one or more claims made by an issuer. A `Verifiable Credential` is a tamper-evident credential that has authorship that can be cryptographically verified. `Verifiable Credentials` can be used to build `Verifiable Presentations`, which can also be cryptographically verified.

VerifiableCredentialGraph
VerifiableCredentialGraph Verifiable Credential Graph -

Instances of this class are RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`

+

Instances of this class are RDF Graphs, where each of these graphs must include exactly one `Verifiable Credential`

VerifiablePresentation
VerifiablePresentation Verifiable Presentation -

A `presentation` is data derived from one or more `credentials`, issued by one or more `issuers`, that is shared with a specific `verifier`. A `verifiable presentation` is a tamper-evident `presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs).

+

A `Presentation` is data derived from one or more Credentials, issued by one or more `issuers`, that is shared with a specific `verifier`. A `Verifiable Presentation` is a tamper-evident `Presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs).

- + - + - + - + - + - + - + - + - + - + - +
credentialSchema
credentialSchema Credential Schema -

The value of the `credentialSchema` property MUST be one or more data schemas that provide verifiers with enough information to determine if the provided data conforms to the provided schema.

+

The value of the `credentialSchema` property MUST be one or more `Credential Schema` instances.

rdfs:range
@@ -232,10 +232,10 @@

Property Definitions

credentialStatus
credentialStatus Credential Status -

The value of the `credentialStatus` property MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme), which MUST provide enough information to determine the current status of the credential (for example, suspended or revoked).

+

The value of the `credentialStatus` property MUST be an instance of `Credential Status`.

rdfs:range
@@ -245,7 +245,7 @@

Property Definitions

credentialSubject
credentialSubject Credential Subject

An entity about which claims are made.

@@ -256,10 +256,10 @@

Property Definitions

evidence
evidence evidence -

The value of the `evidence` property MUST be one or more evidence schemes providing enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition.

+

The value of the `evidence` property MUST be one or more `Credential Evidence` instances.

rdfs:range
@@ -269,7 +269,7 @@

Property Definitions

expirationDate
expirationDate expiration date

The value of the `expirationDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential ceases to be valid.

@@ -282,7 +282,7 @@

Property Definitions

issuanceDate
issuanceDate issuance date

The value of the `issuanceDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential was issued. Note that this date represents the earliest date when the information associated with the `credentialSubject` property became valid.

@@ -295,7 +295,7 @@

Property Definitions

issuer
issuer issuer

The value of the `issuer` property MUST be a URI. It is RECOMMENDED that dereferencing the URI results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential.

@@ -306,10 +306,10 @@

Property Definitions

refreshService
refreshService refresh service -

The value of the `refreshService` property MUST be one or more refresh services that provides enough information to the holder's software such that the holder can refresh the credential.

+

The value of the `refreshService` property MUST be one or more `Refresh Service` instances such that the holder can refresh the credential.

rdfs:range
@@ -319,7 +319,7 @@

Property Definitions

serviceEndpoint
serviceEndpoint service endpoint

The value of the `serviceEndpoint` property MUST be a URL to the service endpoint associated with the subject.

@@ -330,7 +330,7 @@

Property Definitions

termsOfUse
termsOfUse terms of use

If specified, the value of the `termsOfUse` property MUST specify one or more terms of use policies under which the creator issued the credential or presentation. If the recipient (a holder or verifier) is not willing to adhere to the specified terms of use, then they do so on their own responsibility and might incur legal liability if they violate the stated Terms of Use. Each `termsOfUse` MUST specify its type, for example, `IssuerPolicy`, and optionally, its instance `id`. The precise contents of each term of use is determined by the specific `TermsOfUse` type definition.

@@ -343,10 +343,10 @@

Property Definitions

verifiableCredential
verifiableCredential verifiable credential -

The value of the `verifiableCredential` property MUST identify a `VerifiableCredentialGraph` (informally, it indirectly identifies a `VerifiableCredential` contained in a separate graph).

+

The value of the `verifiableCredential` property MUST identify a `Verifiable Credential Graph` (informally, it indirectly identifies a `Verifiable Credential` contained in a separate graph).

rdfs:range
diff --git a/vocab/credentials/v2/credentials.jsonld b/vocab/credentials/v2/credentials.jsonld index 1be8153f3..a9a062648 100644 --- a/vocab/credentials/v2/credentials.jsonld +++ b/vocab/credentials/v2/credentials.jsonld @@ -164,7 +164,7 @@ "en": "Credential Evidence" }, "rdfs:comment": { - "en": "T.B.D." + "en": "A `Credential Evidence` scheme provides enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition." } }, { @@ -174,7 +174,7 @@ "en": "Credential Schema" }, "rdfs:comment": { - "en": "T.B.D." + "en": "A `Credential Schema` provides verifiers with enough information to determine if the provided data conforms to the provided schema." } }, { @@ -184,7 +184,7 @@ "en": "Credential Status" }, "rdfs:comment": { - "en": "T.B.D." + "en": "A `Credential Status` provides enough information to determine the current status of the credential (for example, suspended or revoked). It MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme)" } }, { @@ -204,7 +204,7 @@ "en": "Manual Refresh Service 2018" }, "rdfs:comment": { - "en": "A type of refresh service that must be interacted with in a manual fashion." + "en": "A type of `Refresh Service` that must be interacted with in a manual fashion." }, "rdfs:subClassOf": "cred:RefreshService" }, @@ -215,7 +215,7 @@ "en": "Refresh Service" }, "rdfs:comment": { - "en": "A refresh service is a mechanism that can be utilized by software agents to retrieve an updated copy of a `verifiable credential`." + "en": "A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Dredential`." } }, { @@ -225,7 +225,7 @@ "en": "Verifiable Credential" }, "rdfs:comment": { - "en": "A `credential` is a set of one or more claims made by an issuer. A `verifiable credential` is a tamper-evident credential that has authorship that can be cryptographically verified. Verifiable credentials can be used to build `verifiable presentations`, which can also be cryptographically verified. The claims in a credential can be about different subjects." + "en": "A `Credential` is a set of one or more claims made by an issuer. A `Verifiable Credential` is a tamper-evident credential that has authorship that can be cryptographically verified. `Verifiable Credentials` can be used to build `Verifiable Presentations`, which can also be cryptographically verified." } }, { @@ -235,7 +235,7 @@ "en": "Verifiable Credential Graph" }, "rdfs:comment": { - "en": "Instances of this class are RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`" + "en": "Instances of this class are RDF Graphs, where each of these graphs must include exactly one `Verifiable Credential`" } }, { @@ -245,7 +245,7 @@ "en": "Verifiable Presentation" }, "rdfs:comment": { - "en": "A `presentation` is data derived from one or more `credentials`, issued by one or more `issuers`, that is shared with a specific `verifier`. A `verifiable presentation` is a tamper-evident `presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs)." + "en": "A `Presentation` is data derived from one or more Credentials, issued by one or more `issuers`, that is shared with a specific `verifier`. A `Verifiable Presentation` is a tamper-evident `Presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs)." } } ], @@ -257,7 +257,7 @@ "en": "Credential Schema" }, "rdfs:comment": { - "en": "The value of the `credentialSchema` property MUST be one or more data schemas that provide verifiers with enough information to determine if the provided data conforms to the provided schema." + "en": "The value of the `credentialSchema` property MUST be one or more `Credential Schema` instances." }, "rdfs:domain": "cred:VerifiableCredential", "rdfs:range": "cred:CredentialSchema" @@ -269,7 +269,7 @@ "en": "Credential Status" }, "rdfs:comment": { - "en": "The value of the `credentialStatus` property MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme), which MUST provide enough information to determine the current status of the credential (for example, suspended or revoked)." + "en": "The value of the `credentialStatus` property MUST be an instance of `Credential Status`." }, "rdfs:domain": "cred:VerifiableCredential", "rdfs:range": "cred:CredentialStatus" @@ -292,7 +292,7 @@ "en": "evidence" }, "rdfs:comment": { - "en": "The value of the `evidence` property MUST be one or more evidence schemes providing enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition." + "en": "The value of the `evidence` property MUST be one or more `Credential Evidence` instances." }, "rdfs:domain": "cred:VerifiableCredential", "rdfs:range": "cred:CredentialEvidence" @@ -339,7 +339,7 @@ "en": "refresh service" }, "rdfs:comment": { - "en": "The value of the `refreshService` property MUST be one or more refresh services that provides enough information to the holder's software such that the holder can refresh the credential." + "en": "The value of the `refreshService` property MUST be one or more `Refresh Service` instances such that the holder can refresh the credential." }, "rdfs:domain": "cred:VerifiableCredential", "rdfs:range": "cred:RefreshService" @@ -374,7 +374,7 @@ "en": "verifiable credential" }, "rdfs:comment": { - "en": "The value of the `verifiableCredential` property MUST identify a `VerifiableCredentialGraph` (informally, it indirectly identifies a `VerifiableCredential` contained in a separate graph)." + "en": "The value of the `verifiableCredential` property MUST identify a `Verifiable Credential Graph` (informally, it indirectly identifies a `Verifiable Credential` contained in a separate graph)." }, "rdfs:domain": "cred:VerifiablePresentation", "rdfs:range": "cred:VerifiableCredentialGraph" diff --git a/vocab/credentials/v2/credentials.ttl b/vocab/credentials/v2/credentials.ttl index b4e3b8946..5f2cb3d17 100644 --- a/vocab/credentials/v2/credentials.ttl +++ b/vocab/credentials/v2/credentials.ttl @@ -17,15 +17,15 @@ cred: a owl:Ontology; # Class definitions cred:CredentialEvidence a rdfs:Class; rdfs:label "Credential Evidence"@en; - rdfs:comment """T.B.D."""@en; + rdfs:comment """A `Credential Evidence` scheme provides enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition."""@en; rdfs:isDefinedBy cred: . cred:CredentialSchema a rdfs:Class; rdfs:label "Credential Schema"@en; - rdfs:comment """T.B.D."""@en; + rdfs:comment """A `Credential Schema` provides verifiers with enough information to determine if the provided data conforms to the provided schema."""@en; rdfs:isDefinedBy cred: . cred:CredentialStatus a rdfs:Class; rdfs:label "Credential Status"@en; - rdfs:comment """T.B.D."""@en; + rdfs:comment """A `Credential Status` provides enough information to determine the current status of the credential (for example, suspended or revoked). It MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme)"""@en; rdfs:isDefinedBy cred: . cred:JsonSchemaValidator2018 a rdfs:Class; rdfs:label " Json Schema Validator 2018"@en; @@ -33,36 +33,36 @@ cred:JsonSchemaValidator2018 a rdfs:Class; rdfs:isDefinedBy cred: . cred:ManualRefreshService2018 a rdfs:Class; rdfs:label "Manual Refresh Service 2018"@en; - rdfs:comment """A type of refresh service that must be interacted with in a manual fashion."""@en; + rdfs:comment """A type of `Refresh Service` that must be interacted with in a manual fashion."""@en; rdfs:subClassOf cred:RefreshService; rdfs:isDefinedBy cred: . cred:RefreshService a rdfs:Class; rdfs:label "Refresh Service"@en; - rdfs:comment """A refresh service is a mechanism that can be utilized by software agents to retrieve an updated copy of a `verifiable credential`."""@en; + rdfs:comment """A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Dredential`."""@en; rdfs:isDefinedBy cred: . cred:VerifiableCredential a rdfs:Class; rdfs:label "Verifiable Credential"@en; - rdfs:comment """A `credential` is a set of one or more claims made by an issuer. A `verifiable credential` is a tamper-evident credential that has authorship that can be cryptographically verified. Verifiable credentials can be used to build `verifiable presentations`, which can also be cryptographically verified. The claims in a credential can be about different subjects."""@en; + rdfs:comment """A `Credential` is a set of one or more claims made by an issuer. A `Verifiable Credential` is a tamper-evident credential that has authorship that can be cryptographically verified. `Verifiable Credentials` can be used to build `Verifiable Presentations`, which can also be cryptographically verified."""@en; rdfs:isDefinedBy cred: . cred:VerifiableCredentialGraph a rdfs:Class; rdfs:label "Verifiable Credential Graph"@en; - rdfs:comment """Instances of this class are RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`"""@en; + rdfs:comment """Instances of this class are RDF Graphs, where each of these graphs must include exactly one `Verifiable Credential`"""@en; rdfs:isDefinedBy cred: . cred:VerifiablePresentation a rdfs:Class; rdfs:label "Verifiable Presentation"@en; - rdfs:comment """A `presentation` is data derived from one or more `credentials`, issued by one or more `issuers`, that is shared with a specific `verifier`. A `verifiable presentation` is a tamper-evident `presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs)."""@en; + rdfs:comment """A `Presentation` is data derived from one or more Credentials, issued by one or more `issuers`, that is shared with a specific `verifier`. A `Verifiable Presentation` is a tamper-evident `Presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs)."""@en; rdfs:isDefinedBy cred: . # Property definitions cred:credentialSchema a rdf:Property; rdfs:label "Credential Schema"@en; - rdfs:comment """The value of the `credentialSchema` property MUST be one or more data schemas that provide verifiers with enough information to determine if the provided data conforms to the provided schema."""@en; + rdfs:comment """The value of the `credentialSchema` property MUST be one or more `Credential Schema` instances."""@en; rdfs:domain cred:VerifiableCredential; rdfs:range cred:CredentialSchema; rdfs:isDefinedBy cred: . cred:credentialStatus a rdf:Property; rdfs:label "Credential Status"@en; - rdfs:comment """The value of the `credentialStatus` property MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme), which MUST provide enough information to determine the current status of the credential (for example, suspended or revoked)."""@en; + rdfs:comment """The value of the `credentialStatus` property MUST be an instance of `Credential Status`."""@en; rdfs:domain cred:VerifiableCredential; rdfs:range cred:CredentialStatus; rdfs:isDefinedBy cred: . @@ -73,7 +73,7 @@ cred:credentialSubject a rdf:Property; rdfs:isDefinedBy cred: . cred:evidence a rdf:Property; rdfs:label "evidence"@en; - rdfs:comment """The value of the `evidence` property MUST be one or more evidence schemes providing enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition."""@en; + rdfs:comment """The value of the `evidence` property MUST be one or more `Credential Evidence` instances."""@en; rdfs:domain cred:VerifiableCredential; rdfs:range cred:CredentialEvidence; rdfs:isDefinedBy cred: . @@ -96,7 +96,7 @@ cred:issuer a rdf:Property; rdfs:isDefinedBy cred: . cred:refreshService a rdf:Property; rdfs:label "refresh service"@en; - rdfs:comment """The value of the `refreshService` property MUST be one or more refresh services that provides enough information to the holder's software such that the holder can refresh the credential."""@en; + rdfs:comment """The value of the `refreshService` property MUST be one or more `Refresh Service` instances such that the holder can refresh the credential."""@en; rdfs:domain cred:VerifiableCredential; rdfs:range cred:RefreshService; rdfs:isDefinedBy cred: . @@ -113,7 +113,7 @@ cred:termsOfUse a rdf:Property; rdfs:isDefinedBy cred: . cred:verifiableCredential a rdf:Property; rdfs:label "verifiable credential"@en; - rdfs:comment """The value of the `verifiableCredential` property MUST identify a `VerifiableCredentialGraph` (informally, it indirectly identifies a `VerifiableCredential` contained in a separate graph)."""@en; + rdfs:comment """The value of the `verifiableCredential` property MUST identify a `Verifiable Credential Graph` (informally, it indirectly identifies a `Verifiable Credential` contained in a separate graph)."""@en; rdfs:domain cred:VerifiablePresentation; rdfs:range cred:VerifiableCredentialGraph; rdfs:isDefinedBy cred: . diff --git a/vocab/credentials/v2/template.html b/vocab/credentials/v2/template.html index 2ec6de819..1195792d8 100644 --- a/vocab/credentials/v2/template.html +++ b/vocab/credentials/v2/template.html @@ -171,7 +171,7 @@

<%= sect[:heading] %>

The following are <%= sect[:heading].downcase %> in the cred namespace:

<% Array(ont[sect[:key]]).each do |defn| -%> - + diff --git a/vocab/credentials/v2/credentials.jsonld b/vocab/credentials/v2/credentials.jsonld index a9a062648..be58c7445 100644 --- a/vocab/credentials/v2/credentials.jsonld +++ b/vocab/credentials/v2/credentials.jsonld @@ -215,7 +215,7 @@ "en": "Refresh Service" }, "rdfs:comment": { - "en": "A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Dredential`." + "en": "A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Credential`." } }, { diff --git a/vocab/credentials/v2/credentials.ttl b/vocab/credentials/v2/credentials.ttl index 5f2cb3d17..9b67ed6ef 100644 --- a/vocab/credentials/v2/credentials.ttl +++ b/vocab/credentials/v2/credentials.ttl @@ -38,7 +38,7 @@ cred:ManualRefreshService2018 a rdfs:Class; rdfs:isDefinedBy cred: . cred:RefreshService a rdfs:Class; rdfs:label "Refresh Service"@en; - rdfs:comment """A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Dredential`."""@en; + rdfs:comment """A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Credential`."""@en; rdfs:isDefinedBy cred: . cred:VerifiableCredential a rdfs:Class; rdfs:label "Verifiable Credential"@en; diff --git a/vocab/credentials/v2/vocab.csv b/vocab/credentials/v2/vocab.csv index c7588d529..07a5e0eac 100644 --- a/vocab/credentials/v2/vocab.csv +++ b/vocab/credentials/v2/vocab.csv @@ -6,7 +6,7 @@ xsd,prefix,,http://www.w3.org/2001/XMLSchema#,,,,, ,rdfs:seeAlso,,https://www.w3.org/TR/vc-data-model-2.0/,,,,, JsonSchemaValidator2018,rdfs:Class, Json Schema Validator 2018,,,,,,A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language. ManualRefreshService2018,rdfs:Class,Manual Refresh Service 2018,cred:RefreshService,,,,,A type of `Refresh Service` that must be interacted with in a manual fashion. -RefreshService,rdfs:Class,Refresh Service,,,,,,A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Dredential`. +RefreshService,rdfs:Class,Refresh Service,,,,,,A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Credential`. CredentialSchema,rdfs:Class,Credential Schema,,,,,,A `Credential Schema` provides verifiers with enough information to determine if the provided data conforms to the provided schema. CredentialStatus,rdfs:Class,Credential Status,,,,,,"A `Credential Status` provides enough information to determine the current status of the credential (for example, suspended or revoked). It MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme)" CredentialEvidence,rdfs:Class,Credential Evidence,,,,,,A `Credential Evidence` scheme provides enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition. From 03ce916adfdd483f1eb751929b98c03b91fb30a3 Mon Sep 17 00:00:00 2001 From: Ivan Herman Date: Fri, 26 Aug 2022 15:03:59 +0200 Subject: [PATCH 06/11] Pere spec JsonSchemaValidator2018 is a subclass of CredentialSchema... --- vocab/credentials/v2/credentials.html | 12 ++++++++---- vocab/credentials/v2/credentials.jsonld | 11 ++++++----- vocab/credentials/v2/credentials.ttl | 9 +++++---- vocab/credentials/v2/vocab.csv | 8 ++++---- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/vocab/credentials/v2/credentials.html b/vocab/credentials/v2/credentials.html index 5817850c3..440384d0e 100644 --- a/vocab/credentials/v2/credentials.html +++ b/vocab/credentials/v2/credentials.html @@ -169,9 +169,13 @@

Class Definitions

@@ -221,7 +225,7 @@

Property Definitions

<%= defn['@id'][5..-1] %>
<%= defn['@id'][5..-1] %> "> <%= defn['rdfs:label']['en'] %>

<%= defn['rdfs:comment']['en'] %>

diff --git a/vocab/credentials/v2/vocab.csv b/vocab/credentials/v2/vocab.csv index f67d860ca..c7588d529 100644 --- a/vocab/credentials/v2/vocab.csv +++ b/vocab/credentials/v2/vocab.csv @@ -5,22 +5,22 @@ odrl,prefix,,http://www.w3.org/ns/odrl/2/,,,,, xsd,prefix,,http://www.w3.org/2001/XMLSchema#,,,,, ,rdfs:seeAlso,,https://www.w3.org/TR/vc-data-model-2.0/,,,,, JsonSchemaValidator2018,rdfs:Class, Json Schema Validator 2018,,,,,,A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language. -ManualRefreshService2018,rdfs:Class,Manual Refresh Service 2018,cred:RefreshService,,,,,A type of refresh service that must be interacted with in a manual fashion. -RefreshService,rdfs:Class,Refresh Service,,,,,,A refresh service is a mechanism that can be utilized by software agents to retrieve an updated copy of a `verifiable credential`. -CredentialSchema,rdfs:Class,Credential Schema,,,,,,T.B.D. -CredentialStatus,rdfs:Class,Credential Status,,,,,,T.B.D. -CredentialEvidence,rdfs:Class,Credential Evidence,,,,,,T.B.D. -VerifiableCredential,rdfs:Class,Verifiable Credential,,,,,,"A `credential` is a set of one or more claims made by an issuer. A `verifiable credential` is a tamper-evident credential that has authorship that can be cryptographically verified. Verifiable credentials can be used to build `verifiable presentations`, which can also be cryptographically verified. The claims in a credential can be about different subjects." -VerifiableCredentialGraph,rdfs:Class,Verifiable Credential Graph,,,,,,"Instances of this class are RDF Graphs, where each of these graphs must include exactly one Resource of type `VerifiableCredential`" -VerifiablePresentation,rdfs:Class,Verifiable Presentation,,,,,,"A `presentation` is data derived from one or more `credentials`, issued by one or more `issuers`, that is shared with a specific `verifier`. A `verifiable presentation` is a tamper-evident `presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs)." -credentialSchema,rdf:Property,Credential Schema,,VerifiableCredential,cred:CredentialSchema,@id,,The value of the `credentialSchema` property MUST be one or more data schemas that provide verifiers with enough information to determine if the provided data conforms to the provided schema. -credentialStatus,rdf:Property,Credential Status,,VerifiableCredential,cred:CredentialStatus,@id,,"The value of the `credentialStatus` property MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme), which MUST provide enough information to determine the current status of the credential (for example, suspended or revoked)." +ManualRefreshService2018,rdfs:Class,Manual Refresh Service 2018,cred:RefreshService,,,,,A type of `Refresh Service` that must be interacted with in a manual fashion. +RefreshService,rdfs:Class,Refresh Service,,,,,,A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Dredential`. +CredentialSchema,rdfs:Class,Credential Schema,,,,,,A `Credential Schema` provides verifiers with enough information to determine if the provided data conforms to the provided schema. +CredentialStatus,rdfs:Class,Credential Status,,,,,,"A `Credential Status` provides enough information to determine the current status of the credential (for example, suspended or revoked). It MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme)" +CredentialEvidence,rdfs:Class,Credential Evidence,,,,,,A `Credential Evidence` scheme provides enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition. +VerifiableCredential,rdfs:Class,Verifiable Credential,,,,,,"A `Credential` is a set of one or more claims made by an issuer. A `Verifiable Credential` is a tamper-evident credential that has authorship that can be cryptographically verified. `Verifiable Credentials` can be used to build `Verifiable Presentations`, which can also be cryptographically verified." +VerifiableCredentialGraph,rdfs:Class,Verifiable Credential Graph,,,,,,"Instances of this class are RDF Graphs, where each of these graphs must include exactly one `Verifiable Credential`" +VerifiablePresentation,rdfs:Class,Verifiable Presentation,,,,,,"A `Presentation` is data derived from one or more Credentials, issued by one or more `issuers`, that is shared with a specific `verifier`. A `Verifiable Presentation` is a tamper-evident `Presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs)." +credentialSchema,rdf:Property,Credential Schema,,VerifiableCredential,cred:CredentialSchema,@id,,The value of the `credentialSchema` property MUST be one or more `Credential Schema` instances. +credentialStatus,rdf:Property,Credential Status,,VerifiableCredential,cred:CredentialStatus,@id,,"The value of the `credentialStatus` property MUST be an instance of `Credential Status`." credentialSubject,rdf:Property,Credential Subject,,VerifiableCredential,,@id,,An entity about which claims are made. -evidence,rdf:Property,evidence,,VerifiableCredential,cred:CredentialEvidence,,,The value of the `evidence` property MUST be one or more evidence schemes providing enough information to a verifier to determine whether the evidence gathered meets their requirements for issuing a credential. The precise content of each evidence scheme is determined by the specific evidence type definition. +evidence,rdf:Property,evidence,,VerifiableCredential,cred:CredentialEvidence,,,The value of the `evidence` property MUST be one or more `Credential Evidence` instances. expirationDate,rdf:Property,expiration date,,VerifiableCredential,xsd:dateTime,,,The value of the `expirationDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential ceases to be valid. issuanceDate,rdf:Property,issuance date,,VerifiableCredential,xsd:dateTime,,,The value of the `issuanceDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential was issued. Note that this date represents the earliest date when the information associated with the `credentialSubject` property became valid. issuer,rdf:Property,issuer,,VerifiableCredential,,@id,,The value of the `issuer` property MUST be a URI. It is RECOMMENDED that dereferencing the URI results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential. -refreshService,rdf:Property,refresh service,,VerifiableCredential,cred:RefreshService,@id,,The value of the `refreshService` property MUST be one or more refresh services that provides enough information to the holder's software such that the holder can refresh the credential. +refreshService,rdf:Property,refresh service,,VerifiableCredential,cred:RefreshService,@id,,The value of the `refreshService` property MUST be one or more `Refresh Service` instances such that the holder can refresh the credential. serviceEndpoint,rdf:Property,service endpoint,,RefreshService,,@id,,The value of the `serviceEndpoint` property MUST be a URL to the service endpoint associated with the subject. termsOfUse,rdf:Property,terms of use,,VerifiableCredential,odrl:Policy,@id,,"If specified, the value of the `termsOfUse` property MUST specify one or more terms of use policies under which the creator issued the credential or presentation. If the recipient (a holder or verifier) is not willing to adhere to the specified terms of use, then they do so on their own responsibility and might incur legal liability if they violate the stated Terms of Use. Each `termsOfUse` MUST specify its type, for example, `IssuerPolicy`, and optionally, its instance `id`. The precise contents of each term of use is determined by the specific `TermsOfUse` type definition." -verifiableCredential,rdf:Property,verifiable credential,,VerifiablePresentation,cred:VerifiableCredentialGraph,@id,@graph,"The value of the `verifiableCredential` property MUST identify a `VerifiableCredentialGraph` (informally, it indirectly identifies a `VerifiableCredential` contained in a separate graph)." +verifiableCredential,rdf:Property,verifiable credential,,VerifiablePresentation,cred:VerifiableCredentialGraph,@id,@graph,"The value of the `verifiableCredential` property MUST identify a `Verifiable Credential Graph` (informally, it indirectly identifies a `Verifiable Credential` contained in a separate graph)." From 2ff5fd2accf31dde88424f20b4c41f7d31de7228 Mon Sep 17 00:00:00 2001 From: Ivan Herman Date: Fri, 26 Aug 2022 14:48:16 +0200 Subject: [PATCH 05/11] (spelling mistake) --- vocab/credentials/v2/credentials.html | 2 +- vocab/credentials/v2/credentials.jsonld | 2 +- vocab/credentials/v2/credentials.ttl | 2 +- vocab/credentials/v2/vocab.csv | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vocab/credentials/v2/credentials.html b/vocab/credentials/v2/credentials.html index baa7ee990..5817850c3 100644 --- a/vocab/credentials/v2/credentials.html +++ b/vocab/credentials/v2/credentials.html @@ -188,7 +188,7 @@

Class Definitions

RefreshService Refresh Service -

A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Dredential`.

+

A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Credential`.

JsonSchemaValidator2018 - Json Schema Validator 2018 + Json Schema Validator 2018

A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language.

+
+
rdfs:subClassOf
+
cred:CredentialSchema
+
ManualRefreshService2018
credentialSchema - Credential Schema + credential schema

The value of the `credentialSchema` property MUST be one or more `Credential Schema` instances.

@@ -234,7 +238,7 @@

Property Definitions

credentialStatus - Credential Status + credential status

The value of the `credentialStatus` property MUST be an instance of `Credential Status`.

@@ -247,7 +251,7 @@

Property Definitions

credentialSubject - Credential Subject + credential subject

An entity about which claims are made.

diff --git a/vocab/credentials/v2/credentials.jsonld b/vocab/credentials/v2/credentials.jsonld index be58c7445..5d7a9027f 100644 --- a/vocab/credentials/v2/credentials.jsonld +++ b/vocab/credentials/v2/credentials.jsonld @@ -191,11 +191,12 @@ "@id": "cred:JsonSchemaValidator2018", "@type": "rdfs:Class", "rdfs:label": { - "en": " Json Schema Validator 2018" + "en": "Json Schema Validator 2018" }, "rdfs:comment": { "en": "A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language." - } + }, + "rdfs:subClassOf": "cred:CredentialSchema" }, { "@id": "cred:ManualRefreshService2018", @@ -254,7 +255,7 @@ "@id": "cred:credentialSchema", "@type": "rdf:Property", "rdfs:label": { - "en": "Credential Schema" + "en": "credential schema" }, "rdfs:comment": { "en": "The value of the `credentialSchema` property MUST be one or more `Credential Schema` instances." @@ -266,7 +267,7 @@ "@id": "cred:credentialStatus", "@type": "rdf:Property", "rdfs:label": { - "en": "Credential Status" + "en": "credential status" }, "rdfs:comment": { "en": "The value of the `credentialStatus` property MUST be an instance of `Credential Status`." @@ -278,7 +279,7 @@ "@id": "cred:credentialSubject", "@type": "rdf:Property", "rdfs:label": { - "en": "Credential Subject" + "en": "credential subject" }, "rdfs:comment": { "en": "An entity about which claims are made." diff --git a/vocab/credentials/v2/credentials.ttl b/vocab/credentials/v2/credentials.ttl index 9b67ed6ef..8a3636329 100644 --- a/vocab/credentials/v2/credentials.ttl +++ b/vocab/credentials/v2/credentials.ttl @@ -28,8 +28,9 @@ cred:CredentialStatus a rdfs:Class; rdfs:comment """A `Credential Status` provides enough information to determine the current status of the credential (for example, suspended or revoked). It MUST include the `id` property, which MUST be a URL, and the `type` property, which expresses the credential status type (also referred to as the credential status scheme)"""@en; rdfs:isDefinedBy cred: . cred:JsonSchemaValidator2018 a rdfs:Class; - rdfs:label " Json Schema Validator 2018"@en; + rdfs:label "Json Schema Validator 2018"@en; rdfs:comment """A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language."""@en; + rdfs:subClassOf cred:CredentialSchema; rdfs:isDefinedBy cred: . cred:ManualRefreshService2018 a rdfs:Class; rdfs:label "Manual Refresh Service 2018"@en; @@ -55,19 +56,19 @@ cred:VerifiablePresentation a rdfs:Class; # Property definitions cred:credentialSchema a rdf:Property; - rdfs:label "Credential Schema"@en; + rdfs:label "credential schema"@en; rdfs:comment """The value of the `credentialSchema` property MUST be one or more `Credential Schema` instances."""@en; rdfs:domain cred:VerifiableCredential; rdfs:range cred:CredentialSchema; rdfs:isDefinedBy cred: . cred:credentialStatus a rdf:Property; - rdfs:label "Credential Status"@en; + rdfs:label "credential status"@en; rdfs:comment """The value of the `credentialStatus` property MUST be an instance of `Credential Status`."""@en; rdfs:domain cred:VerifiableCredential; rdfs:range cred:CredentialStatus; rdfs:isDefinedBy cred: . cred:credentialSubject a rdf:Property; - rdfs:label "Credential Subject"@en; + rdfs:label "credential subject"@en; rdfs:comment """An entity about which claims are made."""@en; rdfs:domain cred:VerifiableCredential; rdfs:isDefinedBy cred: . diff --git a/vocab/credentials/v2/vocab.csv b/vocab/credentials/v2/vocab.csv index 07a5e0eac..588b051a6 100644 --- a/vocab/credentials/v2/vocab.csv +++ b/vocab/credentials/v2/vocab.csv @@ -4,7 +4,7 @@ cred,prefix,,https://w3.org/2018/credentials#,,,,, odrl,prefix,,http://www.w3.org/ns/odrl/2/,,,,, xsd,prefix,,http://www.w3.org/2001/XMLSchema#,,,,, ,rdfs:seeAlso,,https://www.w3.org/TR/vc-data-model-2.0/,,,,, -JsonSchemaValidator2018,rdfs:Class, Json Schema Validator 2018,,,,,,A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language. +JsonSchemaValidator2018,rdfs:Class,Json Schema Validator 2018,cred:CredentialSchema,,,,,A type of validator that can be used to syntactically validate JSON documents using the JSON Schema language. ManualRefreshService2018,rdfs:Class,Manual Refresh Service 2018,cred:RefreshService,,,,,A type of `Refresh Service` that must be interacted with in a manual fashion. RefreshService,rdfs:Class,Refresh Service,,,,,,A `Refresh Service` is a mechanism that can be utilized by software agents to retrieve an updated copy of a `Verifiable Credential`. CredentialSchema,rdfs:Class,Credential Schema,,,,,,A `Credential Schema` provides verifiers with enough information to determine if the provided data conforms to the provided schema. @@ -13,9 +13,9 @@ CredentialEvidence,rdfs:Class,Credential Evidence,,,,,,A `Credential Evidence` s VerifiableCredential,rdfs:Class,Verifiable Credential,,,,,,"A `Credential` is a set of one or more claims made by an issuer. A `Verifiable Credential` is a tamper-evident credential that has authorship that can be cryptographically verified. `Verifiable Credentials` can be used to build `Verifiable Presentations`, which can also be cryptographically verified." VerifiableCredentialGraph,rdfs:Class,Verifiable Credential Graph,,,,,,"Instances of this class are RDF Graphs, where each of these graphs must include exactly one `Verifiable Credential`" VerifiablePresentation,rdfs:Class,Verifiable Presentation,,,,,,"A `Presentation` is data derived from one or more Credentials, issued by one or more `issuers`, that is shared with a specific `verifier`. A `Verifiable Presentation` is a tamper-evident `Presentation` encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs)." -credentialSchema,rdf:Property,Credential Schema,,VerifiableCredential,cred:CredentialSchema,@id,,The value of the `credentialSchema` property MUST be one or more `Credential Schema` instances. -credentialStatus,rdf:Property,Credential Status,,VerifiableCredential,cred:CredentialStatus,@id,,"The value of the `credentialStatus` property MUST be an instance of `Credential Status`." -credentialSubject,rdf:Property,Credential Subject,,VerifiableCredential,,@id,,An entity about which claims are made. +credentialSchema,rdf:Property,credential schema,,VerifiableCredential,cred:CredentialSchema,@id,,The value of the `credentialSchema` property MUST be one or more `Credential Schema` instances. +credentialStatus,rdf:Property,credential status,,VerifiableCredential,cred:CredentialStatus,@id,,"The value of the `credentialStatus` property MUST be an instance of `Credential Status`." +credentialSubject,rdf:Property,credential subject,,VerifiableCredential,,@id,,An entity about which claims are made. evidence,rdf:Property,evidence,,VerifiableCredential,cred:CredentialEvidence,,,The value of the `evidence` property MUST be one or more `Credential Evidence` instances. expirationDate,rdf:Property,expiration date,,VerifiableCredential,xsd:dateTime,,,The value of the `expirationDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential ceases to be valid. issuanceDate,rdf:Property,issuance date,,VerifiableCredential,xsd:dateTime,,,The value of the `issuanceDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential was issued. Note that this date represents the earliest date when the information associated with the `credentialSubject` property became valid. From e816807a49b6054be1e8bb91166f1de9c82359f4 Mon Sep 17 00:00:00 2001 From: Ivan Herman Date: Fri, 26 Aug 2022 17:06:07 +0200 Subject: [PATCH 07/11] Update vocab/credentials/v2/README.md Co-authored-by: Ted Thibodeau Jr --- vocab/credentials/v2/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vocab/credentials/v2/README.md b/vocab/credentials/v2/README.md index c2f41ab63..39d3f860c 100644 --- a/vocab/credentials/v2/README.md +++ b/vocab/credentials/v2/README.md @@ -1,3 +1,3 @@ # Updating vocabulary -Vocabulary definitions are managed in vocab.csv. Add or change entries within this file. Regenerate `credentials.ttl`, `credentials.jsonld`, and `credentials.html` by running `mk_vocab.rb`. +Vocabulary definitions are managed in `vocab.csv`. Add or change entries within this file. Regenerate `credentials.ttl`, `credentials.jsonld`, and `credentials.html` by running `mk_vocab.rb`. From 60dc692e60095eb34cc0f6747e02cfec20f8f1b0 Mon Sep 17 00:00:00 2001 From: Ivan Herman Date: Tue, 30 Aug 2022 09:35:51 +0200 Subject: [PATCH 08/11] Removed the version entry from json --- vocab/credentials/v2/credentials.html | 4 ++-- vocab/credentials/v2/credentials.jsonld | 5 +---- vocab/credentials/v2/credentials.ttl | 2 +- vocab/credentials/v2/mk_vocab.rb | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/vocab/credentials/v2/credentials.html b/vocab/credentials/v2/credentials.html index 440384d0e..9db5a7e65 100644 --- a/vocab/credentials/v2/credentials.html +++ b/vocab/credentials/v2/credentials.html @@ -20,7 +20,7 @@ }, specStatus: "base", shortName: "2018/credentials/v2", - publishDate: "2022-08-26", + publishDate: "2022-08-30", thisVersion: "https://w3.org/2018/credentials/v2", doJsonLd: true, editors: [{ @@ -99,7 +99,7 @@

-
Published:
+
Published:
Version Info:
2.0
diff --git a/vocab/credentials/v2/credentials.jsonld b/vocab/credentials/v2/credentials.jsonld index 5d7a9027f..68ade970c 100644 --- a/vocab/credentials/v2/credentials.jsonld +++ b/vocab/credentials/v2/credentials.jsonld @@ -1,8 +1,5 @@ { "@context": [ - { - "@version": 1.1 - }, "https://w3id.org/security/v2", { "id": "@id", @@ -152,7 +149,7 @@ "dc:description": { "en": "This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]]." }, - "dc:date": "2022-08-26", + "dc:date": "2022-08-30", "rdfs:seeAlso": [ "https://www.w3.org/TR/vc-data-model-2.0/" ], diff --git a/vocab/credentials/v2/credentials.ttl b/vocab/credentials/v2/credentials.ttl index 8a3636329..986bf39c1 100644 --- a/vocab/credentials/v2/credentials.ttl +++ b/vocab/credentials/v2/credentials.ttl @@ -10,7 +10,7 @@ cred: a owl:Ontology; dc:title "Verifiable Credentials Vocabulary v2.0"@en; dc:description """This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]]."""@en; - dc:date "2022-08-26"^^xsd:date; + dc:date "2022-08-30"^^xsd:date; rdfs:seeAlso ; . diff --git a/vocab/credentials/v2/mk_vocab.rb b/vocab/credentials/v2/mk_vocab.rb index aca99bc55..051ab9446 100755 --- a/vocab/credentials/v2/mk_vocab.rb +++ b/vocab/credentials/v2/mk_vocab.rb @@ -24,7 +24,7 @@ def initialize path = File.expand_path("../vocab.csv", __FILE__) csv = CSV.new(File.open(path)) @prefixes, @terms, @properties, @classes, @datatypes, @instances = {}, {}, {}, {}, {}, {} - @contexts, @imports, @seeAlso = [{"@version": 1.1}], [], [] + @contexts, @imports, @seeAlso = [], [], [] #git_info = %x{git log -1 #{path}}.split("\n") #@commit = "https://github.com/w3c/vc-vocab/commit/" + (git_info[0] || 'uncommitted').split.last date_line = nil #git_info.detect {|l| l.start_with?("Date:")} From 4d811995916c6f49c6a24a3954ad2d01ce114876 Mon Sep 17 00:00:00 2001 From: Ivan Herman Date: Tue, 30 Aug 2022 10:30:18 +0200 Subject: [PATCH 09/11] Removed the leftovers of context from the vocabulary --- .vscode/bookmarks.json | 39 +++++ vocab/credentials/v2/credentials.html | 123 ++++++++----- vocab/credentials/v2/credentials.jsonld | 219 +++++++++--------------- vocab/credentials/v2/mk_vocab.rb | 17 +- vocab/credentials/v2/template.html | 4 +- vocab/credentials/v2/vocab.csv | 1 - 6 files changed, 202 insertions(+), 201 deletions(-) create mode 100644 .vscode/bookmarks.json diff --git a/.vscode/bookmarks.json b/.vscode/bookmarks.json new file mode 100644 index 000000000..c128690c9 --- /dev/null +++ b/.vscode/bookmarks.json @@ -0,0 +1,39 @@ +{ + "files": [ + { + "path": "vocab/credentials/v2/mk_vocab.rb", + "bookmarks": [ + { + "line": 119, + "column": 22, + "label": "" + }, + { + "line": 146, + "column": 10, + "label": "" + }, + { + "line": 175, + "column": 21, + "label": "" + }, + { + "line": 189, + "column": 19, + "label": "" + }, + { + "line": 217, + "column": 7, + "label": "" + }, + { + "line": 220, + "column": 9, + "label": "" + } + ] + } + ] +} \ No newline at end of file diff --git a/vocab/credentials/v2/credentials.html b/vocab/credentials/v2/credentials.html index 9db5a7e65..d35e702c3 100644 --- a/vocab/credentials/v2/credentials.html +++ b/vocab/credentials/v2/credentials.html @@ -362,102 +362,133 @@

Property Definitions

-
+ diff --git a/vocab/credentials/v2/credentials.jsonld b/vocab/credentials/v2/credentials.jsonld index 68ade970c..df83bf7a3 100644 --- a/vocab/credentials/v2/credentials.jsonld +++ b/vocab/credentials/v2/credentials.jsonld @@ -1,146 +1,83 @@ { - "@context": [ - "https://w3id.org/security/v2", - { - "id": "@id", - "type": "@type", - "cred": "https://w3.org/2018/credentials#", - "odrl": "http://www.w3.org/ns/odrl/2/", - "xsd": "http://www.w3.org/2001/XMLSchema#", - "CredentialEvidence": "cred:CredentialEvidence", - "CredentialSchema": "cred:CredentialSchema", - "CredentialStatus": "cred:CredentialStatus", - "JsonSchemaValidator2018": "cred:JsonSchemaValidator2018", - "ManualRefreshService2018": "cred:ManualRefreshService2018", - "RefreshService": "cred:RefreshService", - "VerifiableCredential": "cred:VerifiableCredential", - "VerifiableCredentialGraph": "cred:VerifiableCredentialGraph", - "VerifiablePresentation": "cred:VerifiablePresentation", - "credentialSchema": { - "@id": "cred:credentialSchema", - "@type": "@id" - }, - "credentialStatus": { - "@id": "cred:credentialStatus", - "@type": "@id" - }, - "credentialSubject": { - "@id": "cred:credentialSubject", - "@type": "@id" - }, - "evidence": { - "@id": "cred:evidence", - "@type": "@id" - }, - "expirationDate": { - "@id": "cred:expirationDate", - "@type": "xsd:dateTime" - }, - "issuanceDate": { - "@id": "cred:issuanceDate", - "@type": "xsd:dateTime" - }, - "issuer": { - "@id": "cred:issuer", - "@type": "@id" - }, - "refreshService": { - "@id": "cred:refreshService", - "@type": "@id" - }, - "serviceEndpoint": { - "@id": "cred:serviceEndpoint", - "@type": "@id" - }, - "termsOfUse": { - "@id": "cred:termsOfUse", - "@type": "@id" - }, - "verifiableCredential": { - "@id": "cred:verifiableCredential", - "@type": "@id", - "@container": "@graph" - } - } - ], - "@graph": { - "@context": { - "id": "@id", - "type": "@type", - "dc": "http://purl.org/dc/terms/", - "owl": "http://www.w3.org/2002/07/owl#", - "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - "rdfs": "http://www.w3.org/2000/01/rdf-schema#", - "dc:title": { - "@container": "@language" - }, - "dc:description": { - "@container": "@language" - }, - "dc:date": { - "@type": "xsd:date" - }, - "rdfs:comment": { - "@container": "@language" - }, - "rdfs:domain": { - "@type": "@id" - }, - "rdfs:label": { - "@container": "@language" - }, - "rdfs:range": { - "@type": "@id" - }, - "rdfs:seeAlso": { - "@type": "@id" - }, - "rdfs:subClassOf": { - "@type": "@id" - }, - "rdfs:subPropertyOf": { - "@type": "@id" - }, - "owl:equivalentClass": { - "@type": "@vocab" - }, - "owl:equivalentProperty": { - "@type": "@vocab" - }, - "owl:oneOf": { - "@container": "@list", - "@type": "@vocab" - }, - "owl:imports": { - "@type": "@id" - }, - "owl:versionInfo": { - "@type": "@id" - }, - "owl:inverseOf": { - "@type": "@vocab" - }, - "owl:unionOf": { - "@type": "@vocab", - "@container": "@list" - }, - "rdfs_classes": { - "@reverse": "rdfs:isDefinedBy", - "@type": "@id" - }, - "rdfs_properties": { - "@reverse": "rdfs:isDefinedBy", - "@type": "@id" - }, - "rdfs_datatypes": { - "@reverse": "rdfs:isDefinedBy", - "@type": "@id" - }, - "rdfs_instances": { - "@reverse": "rdfs:isDefinedBy", - "@type": "@id" - } + "@context": { + "dc": "http://purl.org/dc/terms/", + "owl": "http://www.w3.org/2002/07/owl#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "dc:title": { + "@container": "@language" + }, + "dc:description": { + "@container": "@language" + }, + "dc:date": { + "@type": "xsd:date" + }, + "rdfs:comment": { + "@container": "@language" + }, + "rdfs:domain": { + "@type": "@id" + }, + "rdfs:label": { + "@container": "@language" }, + "rdfs:range": { + "@type": "@id" + }, + "rdfs:seeAlso": { + "@type": "@id" + }, + "rdfs:subClassOf": { + "@type": "@id" + }, + "rdfs:subPropertyOf": { + "@type": "@id" + }, + "owl:equivalentClass": { + "@type": "@vocab" + }, + "owl:equivalentProperty": { + "@type": "@vocab" + }, + "owl:oneOf": { + "@container": "@list", + "@type": "@vocab" + }, + "owl:imports": { + "@type": "@id" + }, + "owl:versionInfo": { + "@type": "@id" + }, + "owl:inverseOf": { + "@type": "@vocab" + }, + "owl:unionOf": { + "@type": "@vocab", + "@container": "@list" + }, + "rdfs_classes": { + "@reverse": "rdfs:isDefinedBy", + "@type": "@id" + }, + "rdfs_properties": { + "@reverse": "rdfs:isDefinedBy", + "@type": "@id" + }, + "rdfs_datatypes": { + "@reverse": "rdfs:isDefinedBy", + "@type": "@id" + }, + "rdfs_instances": { + "@reverse": "rdfs:isDefinedBy", + "@type": "@id" + }, + "cred": "https://w3.org/2018/credentials#", + "odrl": "http://www.w3.org/ns/odrl/2/", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": { "@id": "https://w3.org/2018/credentials#", "@type": "owl:Ontology", "dc:title": { diff --git a/vocab/credentials/v2/mk_vocab.rb b/vocab/credentials/v2/mk_vocab.rb index 051ab9446..1b40982b5 100755 --- a/vocab/credentials/v2/mk_vocab.rb +++ b/vocab/credentials/v2/mk_vocab.rb @@ -65,13 +65,8 @@ def to_context end def to_jsonld - context = { - "id" => "@id", - "type" => "@type", - } - rdfs_context = ::JSON.parse %({ - "id": "@id", - "type": "@type", + rdfs_context = {} + context = ::JSON.parse %({ "dc": "http://purl.org/dc/terms/", "owl": "http://www.w3.org/2002/07/owl#", "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", @@ -117,7 +112,7 @@ def to_jsonld classes.each do |id, entry| term = entry[:term] || id - context[term] = namespaced(id) unless entry[:@type] == '@null' + # context[term] = namespaced(id) unless entry[:@type] == '@null' # Class definition node = { @@ -144,7 +139,7 @@ def to_jsonld defn['@type'] = entry[:@type] if entry[:@type] term = entry[:term] || id - context[term] = defn unless entry[:@type] == '@null' + # context[term] = defn unless entry[:@type] == '@null' # Property definition node = { @@ -173,7 +168,7 @@ def to_jsonld end datatypes.each do |id, entry| - context[id] = namespaced(id) unless entry[:@type] == '@null' + # context[id] = namespaced(id) unless entry[:@type] == '@null' # Datatype definition node = { @@ -187,7 +182,7 @@ def to_jsonld end instances.each do |id, entry| - context[id] = namespaced(id) unless entry[:@type] == '@null' + # context[id] = namespaced(id) unless entry[:@type] == '@null' # Instance definition rdfs_instances << { '@id' => namespaced(id), diff --git a/vocab/credentials/v2/template.html b/vocab/credentials/v2/template.html index 1195792d8..21d2fa72b 100644 --- a/vocab/credentials/v2/template.html +++ b/vocab/credentials/v2/template.html @@ -203,7 +203,7 @@

<%= sect[:heading] %>

<% end%> -
+ diff --git a/vocab/credentials/v2/vocab.csv b/vocab/credentials/v2/vocab.csv index 588b051a6..fd86ad564 100644 --- a/vocab/credentials/v2/vocab.csv +++ b/vocab/credentials/v2/vocab.csv @@ -1,5 +1,4 @@ id,type,label,subClassOf,domain,range,@type,@container,comment -,@context,,https://w3id.org/security/v2,,,,, cred,prefix,,https://w3.org/2018/credentials#,,,,, odrl,prefix,,http://www.w3.org/ns/odrl/2/,,,,, xsd,prefix,,http://www.w3.org/2001/XMLSchema#,,,,, From 3411b4c1c8c7704a517ff0fe444b4dcc2471c1f3 Mon Sep 17 00:00:00 2001 From: Ivan Herman Date: Fri, 2 Sep 2022 06:07:45 +0200 Subject: [PATCH 10/11] removed external context and renamed the files --- vocab/credentials/v2/README.md | 2 +- vocab/credentials/v2/mk_vocab.rb | 8 +----- vocab/credentials/v2/template.html | 22 +++------------- .../v2/{credentials.html => vocabulary.html} | 26 +++++-------------- .../{credentials.jsonld => vocabulary.jsonld} | 2 +- .../v2/{credentials.ttl => vocabulary.ttl} | 2 +- 6 files changed, 14 insertions(+), 48 deletions(-) rename vocab/credentials/v2/{credentials.html => vocabulary.html} (94%) rename vocab/credentials/v2/{credentials.jsonld => vocabulary.jsonld} (99%) rename vocab/credentials/v2/{credentials.ttl => vocabulary.ttl} (99%) diff --git a/vocab/credentials/v2/README.md b/vocab/credentials/v2/README.md index 39d3f860c..66df198e2 100644 --- a/vocab/credentials/v2/README.md +++ b/vocab/credentials/v2/README.md @@ -1,3 +1,3 @@ # Updating vocabulary -Vocabulary definitions are managed in `vocab.csv`. Add or change entries within this file. Regenerate `credentials.ttl`, `credentials.jsonld`, and `credentials.html` by running `mk_vocab.rb`. +Vocabulary definitions are managed in `vocab.csv`. Add or change entries within this file. Regenerate `vocabulary.ttl`, `vocabulary.jsonld`, and `vocabulary.html` by running `mk_vocab.rb`. diff --git a/vocab/credentials/v2/mk_vocab.rb b/vocab/credentials/v2/mk_vocab.rb index 1b40982b5..b4c1d851a 100755 --- a/vocab/credentials/v2/mk_vocab.rb +++ b/vocab/credentials/v2/mk_vocab.rb @@ -342,14 +342,8 @@ def usage when :ttl then options[:output].puts(vocab.to_ttl) when :html then options[:output].puts(vocab.to_html) else - # [:jsonld, :context, :ttl, :html].each do |format| - # fn = {context: "context.jsonld", jsonld: "credentials.jsonld", ttl: "credentials.ttl", html: "credentials.html"}[format] - # File.open(fn, "w") do |output| - # output.puts(vocab.send("to_#{format}".to_sym)) - # end - # end [:jsonld, :ttl, :html].each do |format| - fn = {jsonld: "credentials.jsonld", ttl: "credentials.ttl", html: "credentials.html"}[format] + fn = {jsonld: "vocabulary.jsonld", ttl: "vocabulary.ttl", html: "vocabulary.html"}[format] File.open(fn, "w") do |output| output.puts(vocab.send("to_#{format}".to_sym)) end diff --git a/vocab/credentials/v2/template.html b/vocab/credentials/v2/template.html index 21d2fa72b..7dd211897 100644 --- a/vocab/credentials/v2/template.html +++ b/vocab/credentials/v2/template.html @@ -51,8 +51,8 @@ // branch: "main" // }, alternateFormats: [ - {uri: "credentials.ttl", label: "Turtle"}, - {uri: "credentials.jsonld", label: "JSON-LD"} + {uri: "vocabulary.ttl", label: "Turtle"}, + {uri: "vocabulary.jsonld", label: "JSON-LD"} ], inlineCSS: true, doRDFa: false, @@ -90,13 +90,10 @@ <%= ont["dc:title"]["en"] %> and Term definitions used for describing Verifiable Credentials [[VC-DATA-MODEL]]. This document provides the RDFS [[RDF-SCHEMA]] vocabulary definition. -

Alternate versions of the vocabulary definition exist in - Turtle and - JSON-LD. - - + Turtle and + JSON-LD.

Published:
@@ -123,17 +120,6 @@ (subscribe, archives).

-

Introduction

diff --git a/vocab/credentials/v2/credentials.html b/vocab/credentials/v2/vocabulary.html similarity index 94% rename from vocab/credentials/v2/credentials.html rename to vocab/credentials/v2/vocabulary.html index d35e702c3..dcea23871 100644 --- a/vocab/credentials/v2/credentials.html +++ b/vocab/credentials/v2/vocabulary.html @@ -20,7 +20,7 @@ }, specStatus: "base", shortName: "2018/credentials/v2", - publishDate: "2022-08-30", + publishDate: "2022-09-02", thisVersion: "https://w3.org/2018/credentials/v2", doJsonLd: true, editors: [{ @@ -51,8 +51,8 @@ // branch: "main" // }, alternateFormats: [ - {uri: "credentials.ttl", label: "Turtle"}, - {uri: "credentials.jsonld", label: "JSON-LD"} + {uri: "vocabulary.ttl", label: "Turtle"}, + {uri: "vocabulary.jsonld", label: "JSON-LD"} ], inlineCSS: true, doRDFa: false, @@ -90,16 +90,13 @@ Verifiable Credentials Vocabulary v2.0 and Term definitions used for describing Verifiable Credentials [[VC-DATA-MODEL]]. This document provides the RDFS [[RDF-SCHEMA]] vocabulary definition. -

Alternate versions of the vocabulary definition exist in - Turtle and - JSON-LD. - - + Turtle and + JSON-LD.

-
Published:
+
Published:
Version Info:
2.0
@@ -115,17 +112,6 @@ (subscribe, archives).

-

Introduction

diff --git a/vocab/credentials/v2/credentials.jsonld b/vocab/credentials/v2/vocabulary.jsonld similarity index 99% rename from vocab/credentials/v2/credentials.jsonld rename to vocab/credentials/v2/vocabulary.jsonld index df83bf7a3..c57ca8c8a 100644 --- a/vocab/credentials/v2/credentials.jsonld +++ b/vocab/credentials/v2/vocabulary.jsonld @@ -86,7 +86,7 @@ "dc:description": { "en": "This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]]." }, - "dc:date": "2022-08-30", + "dc:date": "2022-09-02", "rdfs:seeAlso": [ "https://www.w3.org/TR/vc-data-model-2.0/" ], diff --git a/vocab/credentials/v2/credentials.ttl b/vocab/credentials/v2/vocabulary.ttl similarity index 99% rename from vocab/credentials/v2/credentials.ttl rename to vocab/credentials/v2/vocabulary.ttl index 986bf39c1..df5cd08d8 100644 --- a/vocab/credentials/v2/credentials.ttl +++ b/vocab/credentials/v2/vocabulary.ttl @@ -10,7 +10,7 @@ cred: a owl:Ontology; dc:title "Verifiable Credentials Vocabulary v2.0"@en; dc:description """This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]]."""@en; - dc:date "2022-08-30"^^xsd:date; + dc:date "2022-09-02"^^xsd:date; rdfs:seeAlso ; . From 79b9f88c2678e2176c151c4de26ec5414a924952 Mon Sep 17 00:00:00 2001 From: Ivan Herman Date: Fri, 2 Sep 2022 15:52:53 +0200 Subject: [PATCH 11/11] remove .vscode --- .gitignore | 1 + .vscode/bookmarks.json | 39 --------------------------------------- 2 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 .vscode/bookmarks.json diff --git a/.gitignore b/.gitignore index bf818f778..80cdf2886 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ .idea/vc-data-model.iml .idea/vcs.xml .idea/workspace.xml +.vscode diff --git a/.vscode/bookmarks.json b/.vscode/bookmarks.json deleted file mode 100644 index c128690c9..000000000 --- a/.vscode/bookmarks.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "files": [ - { - "path": "vocab/credentials/v2/mk_vocab.rb", - "bookmarks": [ - { - "line": 119, - "column": 22, - "label": "" - }, - { - "line": 146, - "column": 10, - "label": "" - }, - { - "line": 175, - "column": 21, - "label": "" - }, - { - "line": 189, - "column": 19, - "label": "" - }, - { - "line": 217, - "column": 7, - "label": "" - }, - { - "line": 220, - "column": 9, - "label": "" - } - ] - } - ] -} \ No newline at end of file