uncefact / spec-untp

UN Transparency Protocol
https://uncefact.github.io/spec-untp/
GNU General Public License v3.0
10 stars 9 forks source link

Implement an example steel mill test certificate using the generic Conformity schema #19

Open nissimsan opened 5 months ago

nissimsan commented 5 months ago

Collaborate to give the conformity schema a go in practice.

nissimsan commented 3 months ago

Examples are good.

nissimsan commented 3 months ago

Probably add an example folder, add this - and others.

Use these (using ellipses and annotation) in the spec. Potentially list the examples in a separate section on the spec. Potentially subject files to test regime.

nissimsan commented 3 months ago

MTR schema and example:

{
        "title": "Mill Test Report",
        "description": "A Mill Test Credential (MTC), or Mill Test Report (MTR), is issued by a manufacturer to certify the chemical and mechanical features of a product and its compliance to the applicable norms and technical specifications. Typically, Mill Test Credentials conform to the EN 10204 standard and are related to steel products. (Source: https://blog.projectmaterials.com/project-procurement/mill-test-Credential/)",
        "type": "object",
        "properties": {
            "@context": {
                "type": "array",
                "readOnly": true,
                "const": [
                    "https://www.w3.org/2018/credentials/v1",
                    "https://w3id.org/traceability/v1"
                ],
                "default": [
                    "https://www.w3.org/2018/credentials/v1",
                    "https://w3id.org/traceability/v1"
                ],
                "items": {
                    "type": "string",
                    "enum": [
                        "https://www.w3.org/2018/credentials/v1",
                        "https://w3id.org/traceability/v1"
                    ]
                }
            },
            "type": {
                "type": "array",
                "readOnly": true,
                "const": [
                    "VerifiableCredential",
                    "MillTestReportCredential"
                ],
                "default": [
                    "VerifiableCredential",
                    "MillTestReportCredential"
                ],
                "items": {
                    "type": "string",
                    "enum": [
                        "VerifiableCredential",
                        "MillTestReportCredential"
                    ]
                }
            },
            "id": {
                "type": "string",
                "format": "uri",
                "description": "Mill test report identifier; this must be an Internationalized Resource Identifier such as an DID, URI, URL, or URN."
            },
            "credentialSchema": {
                "type": "object",
                "properties": {
                    "id": {
                        "title": "Schema URL",
                        "description": "The url of the schema file to validate the shape of the json object",
                        "type": "string",
                        "format": "uri",
                        "const": "https://platform.transmute.industries/marketplace/templates/urn:transmute:template:mill-test-report"
                    },
                    "type": {
                        "title": "Type",
                        "description": "The type of validation to be run against the defined schema",
                        "const": "JsonSchema"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type",
                    "id"
                ]
            },
            "credentialStatus": {
                "type": "array",
                "maxItems": 1,
                "description": "Revocation only.",
                "items": [
                    {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string",
                                "format": "url",
                                "example": "https://example.com/credentials/status/3#94567"
                            },
                            "type": {
                                "type": "string",
                                "const": "BitstringStatusListEntry"
                            },
                            "statusPurpose": {
                                "type": "string",
                                "const": "revocation"
                            },
                            "statusListIndex": {
                                "type": "number",
                                "example": 94567
                            },
                            "statusListCredential": {
                                "type": "string",
                                "format": "url",
                                "example": "https://example.com/credentials/status/3"
                            }
                        },
                        "additionalProperties": false,
                        "required": [
                            "type",
                            "id",
                            "statusPurpose",
                            "statusListIndex",
                            "statusListCredential"
                        ]
                    }
                ]
            },
            "issuanceDate": {
                "type": "string",
                "format": "date-time"
            },
            "expirationDate": {
                "type": "string",
                "format": "date-time"
            },
            "issuer": {
                "title": "Issuer Organization",
                "description": "The steel manufacturer issuing the Mill Test Report product certificate.",
                "type": "object",
                "properties": {
                    "type": {
                        "type": "array",
                        "readOnly": true,
                        "const": [
                            "Organization"
                        ],
                        "default": [
                            "Organization"
                        ],
                        "items": {
                            "type": "string",
                            "enum": [
                                "Organization"
                            ]
                        }
                    },
                    "id": {
                        "title": "Issuer's Identifier",
                        "description": "Issuing organization identifier, typically a Decentralized Identifier (DID).",
                        "type": "string",
                        "format": "uri"
                    },
                    "name": {
                        "title": "Name",
                        "description": "Issuing organization name.",
                        "type": "string"
                    },
                    "address": {
                        "title": "Postal Address",
                        "description": "Issuing organization's postal address.",
                        "type": "object",
                        "properties": {
                            "type": {
                                "type": "array",
                                "readOnly": true,
                                "const": [
                                    "PostalAddress"
                                ],
                                "default": [
                                    "PostalAddress"
                                ],
                                "items": {
                                    "type": "string",
                                    "enum": [
                                        "PostalAddress"
                                    ]
                                }
                            },
                            "street": {
                                "title": "Street",
                                "description": "The street address expressed as free form text. The street address is printed on paper as the first lines below the name. For example, the name of the street and the number in the street, or the name of a building.",
                                "type": "string"
                            },
                            "locality": {
                                "title": "Locality",
                                "description": "The locality in which the street address is, and which is in the region; for example, a city or town.",
                                "type": "string"
                            },
                            "region": {
                                "title": "State",
                                "description": "Text specifying a province or state in abbreviated format; for example, NJ.",
                                "type": "string"
                            },
                            "postalCode": {
                                "title": "Postal Code",
                                "description": "Text specifying the postal code for an address.",
                                "type": "string"
                            },
                            "country": {
                                "title": "Country",
                                "description": "The two-letter ISO 3166-1 alpha-2 country code.",
                                "type": "string"
                            }
                        },
                        "additionalProperties": false,
                        "required": [
                            "type",
                            "street",
                            "locality",
                            "country"
                        ]
                    },
                    "phoneNumber": {
                        "title": "Phone Number",
                        "description": "Organization's contact phone number.",
                        "type": "string"
                    },
                    "faxNumber": {
                        "title": "Fax Number",
                        "description": "Organization's fax number.",
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type",
                    "id"
                ]
            },
            "credentialSubject": {
                "title": "Mill Test Report",
                "description": "Test results made by a manufacturer of a metal product.",
                "type": "object",
                "properties": {
                    "type": {
                        "type": "array",
                        "readOnly": true,
                        "const": [
                            "MillTestReport"
                        ],
                        "default": [
                            "MillTestReport"
                        ],
                        "items": {
                            "type": "string",
                            "enum": [
                                "MillTestReport"
                            ]
                        }
                    },
                    "certificateNumber": {
                        "title": "Certificate Number",
                        "description": "Mill test report certificate number.",
                        "type": "string"
                    },
                    "certification": {
                        "title": "Certification",
                        "description": "The type of certification conducted.",
                        "type": "string"
                    },
                    "purchaseOrderNumber": {
                        "title": "Purchase Order Number",
                        "description": "Purchase order number.",
                        "type": "string"
                    },
                    "shipmentDate": {
                        "title": "Shipment Date",
                        "description": "Date of shipping.",
                        "type": "string",
                        "format": "date",
                        "$linkedData": {
                            "term": "shipmentDate",
                            "@id": "https://vocabulary.uncefact.org/DateTimePeriodFunctionCodeList#270"
                        }
                    },
                    "meansOfTransport": {
                        "title": "Means of Transport",
                        "description": "A means of transport, expressed as text, for this transport route.",
                        "type": "string",
                        "enum": [
                            "Road",
                            "Rail",
                            "Ocean"
                        ],
                        "$linkedData": {
                            "term": "meansOfTransport",
                            "@id": "https://vocabulary.uncefact.org/transportMeans"
                        }
                    },
                    "customer": {
                        "title": "Customer",
                        "description": "Bill to, buyer party.",
                        "type": "object",
                        "properties": {
                            "type": {
                                "type": "array",
                                "readOnly": true,
                                "const": [
                                    "Organization"
                                ],
                                "default": [
                                    "Organization"
                                ],
                                "items": {
                                    "type": "string",
                                    "enum": [
                                        "Organization"
                                    ]
                                }
                            },
                            "id": {
                                "title": "Identifier",
                                "description": "Customers's identifier, typically a Decentralized Identifier (DID).",
                                "type": "string",
                                "format": "uri"
                            },
                            "name": {
                                "title": "Name",
                                "description": "Customer name.",
                                "type": "string"
                            },
                            "address": {
                                "title": "Postal Address",
                                "description": "Customer's postal address.",
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "array",
                                        "readOnly": true,
                                        "const": [
                                            "PostalAddress"
                                        ],
                                        "default": [
                                            "PostalAddress"
                                        ],
                                        "items": {
                                            "type": "string",
                                            "enum": [
                                                "PostalAddress"
                                            ]
                                        }
                                    },
                                    "plantOrSiteName": {
                                        "title": "Plant or Site Name",
                                        "description": "Name of Plant, Site or Unit.",
                                        "type": "string"
                                    },
                                    "street": {
                                        "title": "Street",
                                        "description": "The street address expressed as free form text. The street address is printed on paper as the first lines below the name. For example, the name of the street and the number in the street, or the name of a building.",
                                        "type": "string"
                                    },
                                    "locality": {
                                        "title": "Locality",
                                        "description": "The locality in which the street address is, and which is in the region; for example, a city or town.",
                                        "type": "string"
                                    },
                                    "region": {
                                        "title": "State",
                                        "description": "Text specifying a province or state in abbreviated format; for example, NJ.",
                                        "type": "string"
                                    },
                                    "postalCode": {
                                        "title": "Postal Code",
                                        "description": "Text specifying the postal code for an address.",
                                        "type": "string"
                                    },
                                    "country": {
                                        "title": "Country",
                                        "description": "The two-letter ISO 3166-1 alpha-2 country code.",
                                        "type": "string"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "type",
                                    "street",
                                    "locality",
                                    "country"
                                ]
                            }
                        },
                        "additionalProperties": false,
                        "required": [
                            "type",
                            "name",
                            "address"
                        ]
                    },
                    "productSpecification": {
                        "title": "Product Specification",
                        "description": "Specifications of product.",
                        "type": "object",
                        "properties": {
                            "type": {
                                "type": "array",
                                "readOnly": true,
                                "const": [
                                    "SteelProduct"
                                ],
                                "default": [
                                    "SteelProduct"
                                ],
                                "items": {
                                    "type": "string",
                                    "enum": [
                                        "SteelProduct"
                                    ]
                                }
                            },
                            "standard": {
                                "title": "Standard",
                                "description": "Grading system standard.",
                                "type": "string"
                            },
                            "grade": {
                                "title": "Grade",
                                "description": "Material grade.",
                                "type": "string"
                            },
                            "heatTreatment": {
                                "title": "Heat Treatment",
                                "description": "Special heat treatments, depending on product specification.",
                                "type": "string"
                            },
                            "surfaceTreatment": {
                                "title": "Surface Treatment",
                                "description": "Surface treatments, if applicable.",
                                "type": "string"
                            },
                            "productDescription": {
                                "title": "Product Description",
                                "description": "Descriptive product name.",
                                "type": "string"
                            }
                        },
                        "required": [
                            "type",
                            "standard",
                            "grade",
                            "productDescription"
                        ]
                    },
                    "remarks": {
                        "title": "Remarks",
                        "description": "Additional attestation remarks.",
                        "type": "string"
                    },
                    "inspections": {
                        "title": "Inspections",
                        "description": "Inspections certified by this Mill Test Report. Multiple inspections can be listed for different items, heats, etc.",
                        "type": "array",
                        "minItems": 1,
                        "items": {
                            "title": "Inspection",
                            "description": "Inspections conducted as part of a Mill Test certification.",
                            "type": "object",
                            "properties": {
                                "type": {
                                    "type": "array",
                                    "readOnly": true,
                                    "const": [
                                        "Inspection"
                                    ],
                                    "default": [
                                        "Inspection"
                                    ],
                                    "items": {
                                        "type": "string",
                                        "enum": [
                                            "Inspection"
                                        ]
                                    }
                                },
                                "productIdentifier": {
                                    "title": "Product Identifier",
                                    "description": "Product identifier such as lot, part, coil, or serial number.",
                                    "type": "string"
                                },
                                "productDimensions": {
                                    "title": "Product Dimensions",
                                    "description": "Confirmed dimensions of product, as applicable to the product type (for example diameter or thickness).",
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "array",
                                            "readOnly": true,
                                            "const": [
                                                "ProductDimensions"
                                            ],
                                            "default": [
                                                "ProductDimensions"
                                            ],
                                            "items": {
                                                "type": "string",
                                                "enum": [
                                                    "ProductDimensions"
                                                ]
                                            }
                                        },
                                        "length": {
                                            "title": "Length",
                                            "description": "Product length.",
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "array",
                                                    "readOnly": true,
                                                    "const": [
                                                        "MeasuredValue"
                                                    ],
                                                    "default": [
                                                        "MeasuredValue"
                                                    ],
                                                    "items": {
                                                        "type": "string",
                                                        "enum": [
                                                            "MeasuredValue"
                                                        ]
                                                    }
                                                },
                                                "value": {
                                                    "title": "Measurement Value",
                                                    "description": "The measured value of an observation.",
                                                    "type": "string"
                                                },
                                                "unitCode": {
                                                    "title": "Measurement Unit",
                                                    "description": "A string value indicating a Measurement Unit from UN/ECE Recommendation 20, Units of Measure used in International Trade, e.g., GRM = gram - see <a href=\"https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\">rec20_rev3</a>",
                                                    "type": "string"
                                                }
                                            }
                                        },
                                        "width": {
                                            "title": "Width",
                                            "description": "Product width.",
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "array",
                                                    "readOnly": true,
                                                    "const": [
                                                        "MeasuredValue"
                                                    ],
                                                    "default": [
                                                        "MeasuredValue"
                                                    ],
                                                    "items": {
                                                        "type": "string",
                                                        "enum": [
                                                            "MeasuredValue"
                                                        ]
                                                    }
                                                },
                                                "value": {
                                                    "title": "Measurement Value",
                                                    "description": "The measured value of an observation.",
                                                    "type": "string"
                                                },
                                                "unitCode": {
                                                    "title": "Measurement Unit",
                                                    "description": "A string value indicating a Measurement Unit from UN/ECE Recommendation 20, Units of Measure used in International Trade, e.g., GRM = gram - see <a href=\"https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\">rec20_rev3</a>",
                                                    "type": "string"
                                                }
                                            }
                                        },
                                        "thickness": {
                                            "title": "Thickness",
                                            "description": "Product thickness.",
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "array",
                                                    "readOnly": true,
                                                    "const": [
                                                        "MeasuredValue"
                                                    ],
                                                    "default": [
                                                        "MeasuredValue"
                                                    ],
                                                    "items": {
                                                        "type": "string",
                                                        "enum": [
                                                            "MeasuredValue"
                                                        ]
                                                    }
                                                },
                                                "value": {
                                                    "title": "Measurement Value",
                                                    "description": "The measured value of an observation.",
                                                    "type": "string"
                                                },
                                                "unitCode": {
                                                    "title": "Measurement Unit",
                                                    "description": "A string value indicating a Measurement Unit from UN/ECE Recommendation 20, Units of Measure used in International Trade, e.g., GRM = gram - see <a href=\"https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\">rec20_rev3</a>",
                                                    "type": "string"
                                                }
                                            }
                                        },
                                        "diameter": {
                                            "title": "Diameter",
                                            "description": "Product diameter.",
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "array",
                                                    "readOnly": true,
                                                    "const": [
                                                        "MeasuredValue"
                                                    ],
                                                    "default": [
                                                        "MeasuredValue"
                                                    ],
                                                    "items": {
                                                        "type": "string",
                                                        "enum": [
                                                            "MeasuredValue"
                                                        ]
                                                    }
                                                },
                                                "value": {
                                                    "title": "Measurement Value",
                                                    "description": "The measured value of an observation.",
                                                    "type": "string"
                                                },
                                                "unitCode": {
                                                    "title": "Measurement Unit",
                                                    "description": "A string value indicating a Measurement Unit from UN/ECE Recommendation 20, Units of Measure used in International Trade, e.g., GRM = gram - see <a href=\"https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\">rec20_rev3</a>",
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type"
                                    ]
                                },
                                "pieces": {
                                    "title": "Pieces",
                                    "description": "The amount of units.",
                                    "type": "number"
                                },
                                "perUnitWeight": {
                                    "title": "Per Unit Weight",
                                    "description": "Nominal unit weight.",
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "array",
                                            "readOnly": true,
                                            "const": [
                                                "MeasuredValue"
                                            ],
                                            "default": [
                                                "MeasuredValue"
                                            ],
                                            "items": {
                                                "type": "string",
                                                "enum": [
                                                    "MeasuredValue"
                                                ]
                                            }
                                        },
                                        "value": {
                                            "title": "Measurement Value",
                                            "description": "The measured value of an observation.",
                                            "type": "string"
                                        },
                                        "unitCode": {
                                            "title": "Measurement Unit",
                                            "description": "A string value indicating a Measurement Unit from UN/ECE Recommendation 20, Units of Measure used in International Trade, e.g., GRM = gram - see <a href=\"https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\">rec20_rev3</a>",
                                            "type": "string"
                                        }
                                    }
                                },
                                "totalWeight": {
                                    "title": "Total Weight",
                                    "description": "Total product weight.",
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "array",
                                            "readOnly": true,
                                            "const": [
                                                "MeasuredValue"
                                            ],
                                            "default": [
                                                "MeasuredValue"
                                            ],
                                            "items": {
                                                "type": "string",
                                                "enum": [
                                                    "MeasuredValue"
                                                ]
                                            }
                                        },
                                        "value": {
                                            "title": "Measurement Value",
                                            "description": "The measured value of an observation.",
                                            "type": "string"
                                        },
                                        "unitCode": {
                                            "title": "Measurement Unit",
                                            "description": "A string value indicating a Measurement Unit from UN/ECE Recommendation 20, Units of Measure used in International Trade, e.g., GRM = gram - see <a href=\"https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\">rec20_rev3</a>",
                                            "type": "string"
                                        }
                                    }
                                },
                                "countryOfManufacture": {
                                    "title": "Country of Manufacture",
                                    "description": "Manufacturing country.",
                                    "type": "string"
                                },
                                "countryOfMeltAndPour": {
                                    "title": "Country of Melt and Pour",
                                    "description": "Country of original melt and pour.",
                                    "type": "string"
                                },
                                "meltPractice": {
                                    "title": "Melt Practice",
                                    "description": "Type of melting practice.",
                                    "type": "string"
                                },
                                "heatNumber": {
                                    "title": "Heat Number",
                                    "description": "Heat identification.",
                                    "type": "string"
                                },
                                "testNumber": {
                                    "title": "Test number",
                                    "description": "Identifier of test conducted.",
                                    "type": "string"
                                },
                                "chemicalComposition": {
                                    "title": "Chemical Composition",
                                    "description": "Measured chemical composition; all values in W%.",
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "array",
                                            "readOnly": true,
                                            "const": [
                                                "ChemicalComposition"
                                            ],
                                            "default": [
                                                "ChemicalComposition"
                                            ],
                                            "items": {
                                                "type": "string",
                                                "enum": [
                                                    "ChemicalComposition"
                                                ]
                                            }
                                        },
                                        "c": {
                                            "title": "C",
                                            "description": "Carbon percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "c",
                                                "@id": "https://w3id.org/traceability#c"
                                            }
                                        },
                                        "mn": {
                                            "title": "Mn",
                                            "description": "Manganese percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "mn",
                                                "@id": "https://w3id.org/traceability#mn"
                                            }
                                        },
                                        "p": {
                                            "title": "P",
                                            "description": "Phosphorus percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "p",
                                                "@id": "https://w3id.org/traceability#p"
                                            }
                                        },
                                        "s": {
                                            "title": "S",
                                            "description": "Sulphur percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "s",
                                                "@id": "https://w3id.org/traceability#s"
                                            }
                                        },
                                        "si": {
                                            "title": "Si",
                                            "description": "Silicon percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "si",
                                                "@id": "https://w3id.org/traceability#si"
                                            }
                                        },
                                        "al": {
                                            "title": "Al",
                                            "description": "Aluminum percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "al",
                                                "@id": "https://w3id.org/traceability#al"
                                            }
                                        },
                                        "cu": {
                                            "title": "Cu",
                                            "description": "Copper percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "cu",
                                                "@id": "https://w3id.org/traceability#cu"
                                            }
                                        },
                                        "ni": {
                                            "title": "Ni",
                                            "description": "Nickel percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "ni",
                                                "@id": "https://w3id.org/traceability#ni"
                                            }
                                        },
                                        "cr": {
                                            "title": "Cr",
                                            "description": "Chromium percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "cr",
                                                "@id": "https://w3id.org/traceability#cr"
                                            }
                                        },
                                        "mo": {
                                            "title": "Mo",
                                            "description": "Molybdenum percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "mo",
                                                "@id": "https://w3id.org/traceability#mo"
                                            }
                                        },
                                        "sn": {
                                            "title": "Sn",
                                            "description": "Tin percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "sn",
                                                "@id": "https://w3id.org/traceability#sn"
                                            }
                                        },
                                        "nbCb": {
                                            "title": "NbCb",
                                            "description": "Niobium (also known as Columbium) percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "nbCb",
                                                "@id": "https://w3id.org/traceability#nbCb"
                                            }
                                        },
                                        "v": {
                                            "title": "V",
                                            "description": "Vanadium percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "v",
                                                "@id": "https://w3id.org/traceability#v"
                                            }
                                        },
                                        "ti": {
                                            "title": "Ti",
                                            "description": "Titanium percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "ti",
                                                "@id": "https://w3id.org/traceability#ti"
                                            }
                                        },
                                        "b": {
                                            "title": "B",
                                            "description": "Boron percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "b",
                                                "@id": "https://w3id.org/traceability#b"
                                            }
                                        },
                                        "n": {
                                            "title": "N",
                                            "description": "Nitrogen percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "n",
                                                "@id": "https://w3id.org/traceability#n"
                                            }
                                        },
                                        "ca": {
                                            "title": "Ca",
                                            "description": "Calcium percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "ca",
                                                "@id": "https://w3id.org/traceability#ca"
                                            }
                                        },
                                        "pb": {
                                            "title": "Pb",
                                            "description": "Lead percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "pb",
                                                "@id": "https://w3id.org/traceability#pb"
                                            }
                                        },
                                        "ce": {
                                            "title": "C.E.",
                                            "description": "Carbon Equivalent percentage content.",
                                            "type": "number",
                                            "$linkedData": {
                                                "term": "ce",
                                                "@id": "https://w3id.org/traceability#ce"
                                            }
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type",
                                        "c",
                                        "mn",
                                        "p",
                                        "s",
                                        "si"
                                    ]
                                },
                                "mechanicalProperties": {
                                    "title": "Mechanical Properties",
                                    "description": "Mechanical property measurements.",
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "array",
                                            "readOnly": true,
                                            "const": [
                                                "MechanicalProperties"
                                            ],
                                            "default": [
                                                "MechanicalProperties"
                                            ],
                                            "items": {
                                                "type": "string",
                                                "enum": [
                                                    "MechanicalProperties"
                                                ]
                                            }
                                        },
                                        "tensile": {
                                            "title": "Tensile",
                                            "description": "Tensile strength.",
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "array",
                                                    "readOnly": true,
                                                    "const": [
                                                        "MeasuredValue"
                                                    ],
                                                    "default": [
                                                        "MeasuredValue"
                                                    ],
                                                    "items": {
                                                        "type": "string",
                                                        "enum": [
                                                            "MeasuredValue"
                                                        ]
                                                    }
                                                },
                                                "value": {
                                                    "title": "Measurement Value",
                                                    "description": "The measured value of an observation.",
                                                    "type": "string"
                                                },
                                                "unitCode": {
                                                    "title": "Measurement Unit",
                                                    "description": "A string value indicating a Measurement Unit from UN/ECE Recommendation 20, Units of Measure used in International Trade, e.g., GRM = gram - see <a href=\"https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\">rec20_rev3</a>",
                                                    "type": "string"
                                                }
                                            }
                                        },
                                        "yield": {
                                            "title": "Yield",
                                            "description": "Yield strength.",
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "array",
                                                    "readOnly": true,
                                                    "const": [
                                                        "MeasuredValue"
                                                    ],
                                                    "default": [
                                                        "MeasuredValue"
                                                    ],
                                                    "items": {
                                                        "type": "string",
                                                        "enum": [
                                                            "MeasuredValue"
                                                        ]
                                                    }
                                                },
                                                "value": {
                                                    "title": "Measurement Value",
                                                    "description": "The measured value of an observation.",
                                                    "type": "string"
                                                },
                                                "unitCode": {
                                                    "title": "Measurement Unit",
                                                    "description": "A string value indicating a Measurement Unit from UN/ECE Recommendation 20, Units of Measure used in International Trade, e.g., GRM = gram - see <a href=\"https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\">rec20_rev3</a>",
                                                    "type": "string"
                                                }
                                            }
                                        },
                                        "hardness": {
                                            "title": "Hardness",
                                            "description": "Material hardness.",
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "array",
                                                    "readOnly": true,
                                                    "const": [
                                                        "MeasuredValue"
                                                    ],
                                                    "default": [
                                                        "MeasuredValue"
                                                    ],
                                                    "items": {
                                                        "type": "string",
                                                        "enum": [
                                                            "MeasuredValue"
                                                        ]
                                                    }
                                                },
                                                "value": {
                                                    "title": "Measurement Value",
                                                    "description": "The measured value of an observation.",
                                                    "type": "string"
                                                },
                                                "unitCode": {
                                                    "title": "Measurement Unit",
                                                    "description": "A string value indicating a Measurement Unit from UN/ECE Recommendation 20, Units of Measure used in International Trade, e.g., GRM = gram - see <a href=\"https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\">rec20_rev3</a>",
                                                    "type": "string"
                                                }
                                            }
                                        },
                                        "elongation": {
                                            "title": "Elongation",
                                            "description": "Elongation percentage.",
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "array",
                                                    "readOnly": true,
                                                    "const": [
                                                        "MeasuredValue"
                                                    ],
                                                    "default": [
                                                        "MeasuredValue"
                                                    ],
                                                    "items": {
                                                        "type": "string",
                                                        "enum": [
                                                            "MeasuredValue"
                                                        ]
                                                    }
                                                },
                                                "value": {
                                                    "title": "Measurement Value",
                                                    "description": "The measured value of an observation.",
                                                    "type": "string"
                                                },
                                                "unitCode": {
                                                    "title": "Measurement Unit",
                                                    "description": "A string value indicating a Measurement Unit from UN/ECE Recommendation 20, Units of Measure used in International Trade, e.g., GRM = gram - see <a href=\"https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\">rec20_rev3</a>",
                                                    "type": "string"
                                                }
                                            }
                                        },
                                        "charpy": {
                                            "title": "Charpy",
                                            "description": "Dynamic impact test.",
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "array",
                                                    "readOnly": true,
                                                    "const": [
                                                        "MeasuredValue"
                                                    ],
                                                    "default": [
                                                        "MeasuredValue"
                                                    ],
                                                    "items": {
                                                        "type": "string",
                                                        "enum": [
                                                            "MeasuredValue"
                                                        ]
                                                    }
                                                },
                                                "value": {
                                                    "title": "Measurement Value",
                                                    "description": "The measured value of an observation.",
                                                    "type": "string"
                                                },
                                                "unitCode": {
                                                    "title": "Measurement Unit",
                                                    "description": "A string value indicating a Measurement Unit from UN/ECE Recommendation 20, Units of Measure used in International Trade, e.g., GRM = gram - see <a href=\"https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\">rec20_rev3</a>",
                                                    "type": "string"
                                                }
                                            }
                                        },
                                        "reduction": {
                                            "title": "Reduction",
                                            "description": "Reduction area.",
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "array",
                                                    "readOnly": true,
                                                    "const": [
                                                        "MeasuredValue"
                                                    ],
                                                    "default": [
                                                        "MeasuredValue"
                                                    ],
                                                    "items": {
                                                        "type": "string",
                                                        "enum": [
                                                            "MeasuredValue"
                                                        ]
                                                    }
                                                },
                                                "value": {
                                                    "title": "Measurement Value",
                                                    "description": "The measured value of an observation.",
                                                    "type": "string"
                                                },
                                                "unitCode": {
                                                    "title": "Measurement Unit",
                                                    "description": "A string value indicating a Measurement Unit from UN/ECE Recommendation 20, Units of Measure used in International Trade, e.g., GRM = gram - see <a href=\"https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\">rec20_rev3</a>",
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "type"
                                    ]
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "type",
                                "productIdentifier",
                                "productDimensions",
                                "countryOfManufacture",
                                "countryOfMeltAndPour",
                                "heatNumber",
                                "chemicalComposition",
                                "mechanicalProperties"
                            ]
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "customer",
                    "certificateNumber",
                    "purchaseOrderNumber",
                    "certification",
                    "productSpecification",
                    "inspections"
                ]
            }
        },
        "additionalProperties": false,
        "required": [
            "@context",
            "type",
            "id",
            "credentialSchema",
            "credentialStatus",
            "issuanceDate",
            "issuer",
            "credentialSubject"
        ],
        "example": "{\"@context\":[\"https://www.w3.org/2018/credentials/v1\",\"https://w3id.org/traceability/v1\"],\"type\":[\"VerifiableCredential\",\"MillTestReportCredential\"],\"id\":\"urn:uuid:2e604860-b308-4ada-n1s3-4a22635befea\",\"issuanceDate\":\"2022-06-06T08:10:00+00:00\",\"credentialSchema\":{\"type\":\"JsonSchema\",\"id\":\"https://platform.transmute.industries/marketplace/templates/urn:transmute:template:mill-test-report\"},\"credentialStatus\":[{\"id\":\"https://example.com/credentials/status/3#94567\",\"type\":\"BitstringStatusListEntry\",\"statusPurpose\":\"revocation\",\"statusListIndex\":94567,\"statusListCredential\":\"https://example.com/credentials/status/3\"}],\"issuer\":{\"type\":[\"Organization\"],\"id\":\"did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U\",\"name\":\"Tall Steel, Inc\",\"address\":{\"type\":[\"PostalAddress\"],\"street\":\"1331 N 7th St\",\"locality\":\"Phoenix\",\"region\":\"Arizona\",\"postalCode\":\"78599\",\"country\":\"US\"},\"phoneNumber\":\"+1-675-555-6659\",\"faxNumber\":\"+1-527-555-1986\"},\"credentialSubject\":{\"type\":[\"MillTestReport\"],\"certificateNumber\":\"202304215088\",\"certification\":\"EN 10204.3.1\",\"purchaseOrderNumber\":\"PO992765413\",\"meansOfTransport\":\"Road\",\"customer\":{\"type\":[\"Organization\"],\"id\":\"did:web:rise-higher-construction.example.com\",\"name\":\"Rise Higher Construction, Ltd.\",\"address\":{\"type\":[\"PostalAddress\"],\"plantOrSiteName\":\"Rise Warehouse West\",\"street\":\"4423 Reeves Street\",\"locality\":\"Baileys Harbor\",\"region\":\"California\",\"postalCode\":\"98200\",\"country\":\"US\"}},\"productSpecification\":{\"type\":[\"SteelProduct\"],\"standard\":\"AISI/SAE\",\"grade\":\"316\",\"heatTreatment\":\"Min. 1900F, Quenched\",\"surfaceTreatment\":\"Varnished\",\"productDescription\":\"Stainless Steel Plate\"},\"remarks\":\"No Mercury, Lead or Sulfor. Free from radioactive contamination.\",\"inspections\":[{\"type\":[\"Inspection\"],\"productIdentifier\":\"212900-34\",\"productDimensions\":{\"type\":[\"ProductDimensions\"],\"length\":{\"type\":[\"MeasuredValue\"],\"value\":\"6000\",\"unitCode\":\"MM\"},\"width\":{\"type\":[\"MeasuredValue\"],\"value\":\"2000\",\"unitCode\":\"MM\"},\"thickness\":{\"type\":[\"MeasuredValue\"],\"value\":\"60\",\"unitCode\":\"MM\"}},\"pieces\":80,\"perUnitWeight\":{\"type\":[\"MeasuredValue\"],\"value\":\"3620\",\"unitCode\":\"KG\"},\"totalWeight\":{\"type\":[\"MeasuredValue\"],\"value\":\"289600\",\"unitCode\":\"KG\"},\"countryOfManufacture\":\"US\",\"countryOfMeltAndPour\":\"US\",\"meltPractice\":\"EAM\",\"heatNumber\":\"61316\",\"testNumber\":\"1205\",\"chemicalComposition\":{\"type\":[\"ChemicalComposition\"],\"c\":0.0189,\"mn\":1.568,\"p\":0.035,\"s\":0.0128,\"si\":0.312,\"al\":0.004,\"cu\":0.4208,\"ni\":8.286,\"cr\":16.558,\"mo\":2.03,\"sn\":0.007,\"nbCb\":0,\"v\":0.004,\"ti\":0.003,\"b\":0.0014,\"n\":0.0074,\"ca\":0.0018,\"pb\":0.001,\"ce\":0.3882},\"mechanicalProperties\":{\"type\":[\"MechanicalProperties\"],\"tensile\":{\"type\":[\"MeasuredValue\"],\"value\":\"367.22\",\"unitCode\":\"MPa\"},\"yield\":{\"type\":[\"MeasuredValue\"],\"value\":\"648.71\",\"unitCode\":\"MPa\"},\"hardness\":{\"type\":[\"MeasuredValue\"],\"value\":\"86\",\"unitCode\":\"HRB\"},\"elongation\":{\"type\":[\"MeasuredValue\"],\"value\":\"32\",\"unitCode\":\"%\"},\"charpy\":{\"type\":[\"MeasuredValue\"],\"value\":\"3.55\",\"unitCode\":\"J\"},\"reduction\":{\"type\":[\"MeasuredValue\"],\"value\":\"40\",\"unitCode\":\"%\"}}}]}}"
    }
zachzeus commented 2 months ago

Hi @nissimsan - did the above example came from: https://w3c-ccg.github.io/traceability-vocab/#MillTestReportCredential

zachzeus commented 6 days ago

Working on this over the next two weeks - expect to close this out with a solid sample