-
Notifications
You must be signed in to change notification settings - Fork 115
Add "credential boilerplates" as examples #935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here is the minimal VCDM 1.1 boilerplate for the record: {
"@context": "https://www.w3.org/2018/credentials/v1",
"type": ["VerifiableCredential"],
"issuer": "did:example:123",
"issuanceDate": "2010-01-01T19:23:24Z",
"credentialSubject": {
"id": "did:example:456"
}
} |
Referring to my diagram in issue #982 , the first four are credential metadata properties and the last one is the credential. |
I believe this is now valid: {
"@context": [
"https://www.w3.org/ns/credentials/v2"
],
"id": "http://example.edu/credentials/1872",
"type": ["VerifiableCredential", "NewCredentialType"],
"issuer": {
"id": "did:example:123",
"type": ["Organization", "OrganizationType"]
},
"issuanceDate": "2010-01-01T19:23:24Z",
"credentialSubject": {
"id": "did:example:456",
"type": ["Person", "JobType"],
"claimName": "claimValue"
}
} |
According to our CVS log, this URL has never yet returned anything. If I'm wrong, then I'm missing something big time. I'm assuming the plan is to put there the content generated from https://github.com/w3c/vc-data-model/tree/main/vocab/credentials/v2, right? |
Before doing anything... I would like to be completely clear on what we plan to do.
Basically, we are not talking about a simple redirection in the |
Just looking at the original issue introduction, using
for this. (I know, long bike-shedding around the term |
@iherman the working group already merged a default vocab: https://github.com/w3c/vc-data-model/blob/main/contexts/credentials/v2#L4 Let's not rehash it on this issue, but I am happy to discuss elsewhere. The primary problem I am trying to address is that the examples in the current spec are broken (due to the 404). Lets start by just fixing that. https://www.w3.org/ns/credentials/v2 -> https://w3c.github.io/vc-data-model/contexts/credentials/v2 https://www.w3.org/ns/credentials/examples/v2 -> https://w3c.github.io/vc-data-model/contexts/credentials/examples/v1 ^ I am against including examples like this "everywhere"... since they tend to cause a lot of "context setup" when working with the data model. Because we have a built in vocab, I feel that this style of example is now "advanced example" where as this style example, is "simple / basic example": {
"@context": [
"https://www.w3.org/ns/credentials/v2"
],
"id": "http://example.edu/credentials/1872",
"type": ["VerifiableCredential", "NewCredentialType"],
"issuer": {
"id": "did:example:123",
"type": ["Organization", "OrganizationType"]
},
"issuanceDate": "2010-01-01T19:23:24Z",
"credentialSubject": {
"id": "did:example:456",
"type": ["Person", "JobType"],
"claimName": "claimValue"
}
} ^ The only thing preventing this minimal example from being valid is this link being 404: |
Ah. Indeed, the megrged new context says
which perfectly fine with me. But then what is the usage of Also: at this moment https://www.w3.org/ns/credentials/issuer-dependent also leads to a 404. We would need at least a short HTML file to explain what this is meant for. |
@iherman I edited the original example, which predated the vocab merge to make it clear, its not needed. https://www.w3.org/ns/credentials/issuer-dependent being 404 is less of an issue, its very common for RDF terms to not resolve to definitions... sadly. However, it should resolve to an html page where we can address the nature of the "term being not defined in a context". perhaps an html file in here: https://github.com/w3c/vc-data-model/tree/main/vocab/credentials "issuer-dependent.html" or "issuer-dependent/index.html" Again fixing this won't make the examples valid, but fixing the first 404 will.
Here is some boilerplate to start:
|
Ah. Our comments crossed. Perfect. What about the fact whether '/ns/credentials/'? Where would that go? To the vocabulary? Depending from the answers the way the redirection is set up (via a .htaccess or something else) is technically different, and I would prefer to have a clear picture before doing anything... |
@OR13 — In the last line of your boilerplate, I think — |
@TallTed thanks, I edited the suggested text. |
Please add a section called "How to get started with VCs as a Developer" and provide a simple starting template, then add JSON, then define a context and include it. |
The issue was discussed in a meeting on 2022-09-15
View the transcript5.6. Add "credential boilerplates" as examples (issue vc-data-model#935)See github issue vc-data-model#935. Orie Steele: Developers copy the examples and change them. Manu Sporny: We need to give people a nice gentle introduction.
Orie Steele: I agree with that statement. Manu Sporny: Our present examples try to exercise too many spec features. Orie Steele: The first example cannot have two contexts. Paul Dietrich: As a developer, I will search the examples for the features I want.
Paul Dietrich: I'm a fan of having numerous examples. Ted Thibodeau Jr.: We can include links to spec text that we want people to read in the examples. Manu Sporny: Let's use some real-world examples. Kristina Yasuda: I disagree with real-world examples in the core spec. But it's fine to have them in an annex..
Kristina Yasuda: We don't want to distract readers.
David Chadwick: I think I've now received conflicting instructions. Kristina Yasuda: I see them as being different.
Manu Sporny: If we have a section on "how to get started" that builds things up bit by bit it can be early. Orie Steele: I will do individual PRs for the examples. |
There is no action here, lets close it. |
The issue was discussed in a meeting on 2023-06-06
View the transcript1.8. Add "credential boilerplates" as examples (issue vc-data-model#935)See github issue vc-data-model#935. Brent Zundel: Add credential boilerplates as examples, ready for PR -- we could add he post-CR label because this has to do with examples, or it could be closed.
Orie Steele: I think it's been addressed by certain PRs, if it's my issue, I'm happy to close it. Brent Zundel: Ok, marking pending close and it'll get closed. |
No objections raised since marked |
Uh oh!
There was an error while loading. Please reload this page.
Developers copy spec examples, we should plan to have better boilerplates in v2, here is an example:
The text was updated successfully, but these errors were encountered: