w3c-ccg / traceability-vocab

A traceability vocabulary for describing relevant Verifiable Credentials and their contents.

Home Page:https://w3id.org/traceability

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Traceability Vocabulary Specification

CI CD

About

This specification describes a Linked Data vocabulary for asserting Verifiable Credentials related to traceability information, such as chemical properties, mechanical properties, country of origin, and other attributes used to determine the status of products and materials in a supply chain.

We encourage contributions meeting the Contribution Guidelines. While we prefer the creation of Issues and Pull Requests in the GitHub repository, discussions often occur on the public-credentials mailing list as well, and at regular public meetings (see below).

Latest Spec

https://w3id.org/traceability

Meetings and Hosting

Meetings and hosting instructions are in traceability-interop/MEETINGS.md

Development

See DEVELOPMENT.md. The basics are as follow:

npm i
npm run lint
npm run test
npm run build
npm run serve

Adding HTML to a Credential Definition

Add a tag to your schema:

title: Mill Test Report Credential
tags:
  - Steel
  - CATAIR // <-- your new tag

Update the section rendering logic to use that tag:

const htmlSectionSchemaTags = 'CATAIR';

...

let catair = ``;
    const {$id} = schema;
    if (schema.tags && schema.tags.includes(htmlSectionSchemaTags) ) {
      const htmlExtension = $id.split('/').pop().replace('.yml', '.html');
      catair = fs.readFileSync(path.resolve(
        __dirname,
        `../../../docs/sections/catair/${htmlExtension}`
      )).toString();
    }
  const section = `
    <section id="${schema.$linkedData.term}">
      <h2>${schema.title}</h2>
      <p>${schema.description}</p>
      ${table}
      ${catair && `<section><h2>Table View</h2>${catair}</section>`}
      <pre class="example">${schema.example}</pre>
      ${depList}
    </section>
  `;

Any credentials with this tag MUST have an html section defined and named according to the example above.

About

A traceability vocabulary for describing relevant Verifiable Credentials and their contents.

https://w3id.org/traceability

License:Other


Languages

Language:JavaScript 100.0%