Skip to content

material-identity/E-CoC-schemas

Repository files navigation

E-COC-schemas

E-CoC Schema CI FOSSA Status

The e-CoC.schema.json is a reimplementation of e-coc.org schema. This repository contains translations and templates used for HTML / PDF rendering of E-CoC certificates.

Following changes were applied :

  • In TechnicalProperties.value property replace oneOf by anyOf (since can contain anyOf those enumerated types ) and adding the following possible type ( that was used in some example certificates )
{
  "type": "array",
  "maxItems": 6,
  "minItems": 1,
  "items": {
    "type": "string"
  }
}
  • In EcocData property, the references union (DataLevelA, DataLevelB, DataLevelC) is replaced by DataLevel reference, for clarity and easier validation (since properties are not required in DataLevel definition in the original version).
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "DataLevel": {
      "enum": ["A", "B", "C"]
    },
    "Data": {
      "$ref": "#/definitions/HigherDataLevel"
    },
    "Results": {
      "$ref": "#/definitions/Results"
    }
  },
  "allOf": [
    {
      "if": {
        "properties": { "DataLevel": { "const": "A" } }
      },
      "then": {
        "properties": {
          "Data": { "default": null },
          "Results": { "default": null }
        }
      }
    },
    {
      "if": {
        "properties": { "DataLevel": { "const": "B" } }
      },
      "then": {
        "properties": {
          "Data": { "$ref": "#/definitions/HigherDataLevel" },
          "Results": { "default": null }
        }
      }
    },
    {
      "if": {
        "properties": { "DataLevel": { "const": "C" } }
      },
      "then": {
        "properties": {
          "Data": { "$ref": "#/definitions/HigherDataLevel" },
          "Results": { "$ref": "#/definitions/Results" }
        }
      }
    }
  ],
  "required": ["DataLevel"]
}

TODO

  • in Declaration: if ConformityStatus = WithConcessions, Concessions should be required

  • in Party: if CompanyIdentifier only allow "DUNS", "VATID", "CageCode", which are absolute identifier and separate "CustomerNo", "SupplierNo" in a new property

  • in ObjectOfDeclaration: rename Object to ObjectOfDeclarationItem ?

  • in Results requires at least oneOf MaterialCertification or ChemicalAnalysis

Add some descriptions!

License

FOSSA Status

About

Contains schema, translations, and templates for E-CoC specification

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •