w3c-ccg / vc-render-method

Rendering methods for Verifiable Credentials
https://w3c-ccg.github.io/vc-render-method/
Other
3 stars 2 forks source link

publish context file for renderMethod #16

Open jchartrand opened 1 month ago

jchartrand commented 1 month ago

At the moment we can use the renderMethod like so in a Verifiable Credential version 2:

"@context": [
        "https://www.w3.org/ns/credentials/v2",
        "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json",
        "https://w3id.org/security/suites/ed25519-2020/v1"
        {
            "css3MediaQuery": "urn:uuid:c4c53282-e8e2-4914-83d8-566e25d2f899",
            "HTMLRenderingTemplate": "urn:uuid:925d00aa-ae94-4278-89d5-1cb59a8025e8"
        }
    ],
"renderMethod": [
        {
            "id": "https://raw.githubusercontent.com/digitalcredentials/test-files/main/html-templates/mock-MIT-bachelors-template.html",
            "type": "HTMLRenderingTemplate",
            "name": "PDF Display",
            "css3MediaQuery": "@media (orientation: portrait)"
        }
    ]

It would be nice to instead have a context something like:

"@context": [
        "https://www.w3.org/ns/credentials/v2",
        "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json",
        "https://w3id.org/security/suites/ed25519-2020/v1",
        "https://w3id.org/ns/credentials/render/v1"         <======= NEW 
    ],
"renderMethod": [
        {
            "id": "https://raw.githubusercontent.com/digitalcredentials/test-files/main/html-templates/mock-MIT-bachelors-template.html",
            "type": "HTMLRenderingTemplate",
            "name": "PDF Display",
            "css3MediaQuery": "@media (orientation: portrait)"
        }
    ]

where the https://w3id.org/render/v1 defines the template types and anything else needed for the renderMethod.

@dmitrizagidulin

davidlehn commented 1 month ago