{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ref.openepcis.org/extensions/eu/electronics/electronics-json-schema.json",
  "title": "OpenEPCIS Electronics Vocabulary Schema",
  "description": "JSON Schema for validating Electronics Digital Product Passport data per ESPR Electronics delegated acts. Covers the French Repairability Index (Indice de Réparabilité), the EU Repairability Class (A–E) under Right-to-Repair Directive 2024/1799, WEEE / RoHS compliance, energy labelling (EPREL), software support commitments, and the CIRPASS-2 multi-component bill-of-materials pattern. Version 0.9.5.",
  "$defs": {
    "ElectronicDevice": {
      "type": "object",
      "title": "Electronic Device",
      "description": "An electronic device falling under ESPR Electronics delegated acts. Extends gs1:Product / schema:Product with the cross-cutting DPP fields from dpp-core plus the electronics-specific assessments below.",
      "properties": {
        "@type": {
          "const": "ElectronicDevice"
        },
        "modelIdentifier": {
          "type": "string",
          "description": "Manufacturer-assigned model identifier (commercial reference)."
        },
        "deviceCategory": {
          "$ref": "#/$defs/DeviceCategory"
        },
        "hasRepairabilityIndex": {
          "$ref": "#/$defs/RepairabilityIndex",
          "description": "Recommended — repairability assessment per the French Repairability Index (Indice de Réparabilité), precursor of the EU repairability score under ESPR."
        },
        "hasSparePartAvailabilityYears": {
          "$ref": "#/$defs/QuantitativeValue",
          "description": "Recommended — duration for which spare parts remain available (unitCode ANN); repairability parameter per the French Repairability Index and the EU Right to Repair."
        },
        "hasSoftwareSupport": {
          "$ref": "#/$defs/SoftwareSupport",
          "description": "Recommended — software/firmware support lifecycle (guaranteed update period); ESPR reliability parameter for electronics."
        },
        "hasEnergyEfficiency": {
          "$ref": "#/$defs/EnergyEfficiency",
          "description": "Recommended — EU Energy Labelling (Regulation (EU) 2017/1369) / Ecodesign (EU) 2019/2021: energy label class and consumption data."
        },
        "hasBillOfMaterials": {
          "$ref": "#/$defs/ComponentBOM"
        },
        "hasWeeeCompliance": {
          "$ref": "#/$defs/WEEECompliance",
          "description": "Recommended — WEEE Directive 2012/19/EU: separate-collection marking and producer-registration compliance."
        },
        "hasRohsCompliance": {
          "$ref": "#/$defs/RoHSCompliance",
          "description": "Recommended — RoHS Directive 2011/65/EU restricted-substances compliance declaration."
        },
        "hasDisplaySpecification": {
          "$ref": "#/$defs/DisplaySpecification"
        },
        "hasMaterialDeclaration": {
          "type": "string",
          "format": "uri",
          "description": "URL to the full material declaration (e.g. IPC-1752A material composition declaration)."
        }
      }
    },
    "DeviceCategory": {
      "type": "string",
      "title": "Device Category",
      "description": "Top-level device categorisation aligned with the ESPR Electronics delegated-act scope and the WEEE Directive (2012/19/EU) Annex III categories.",
      "enum": [
        "DataStorage",
        "Desktop",
        "Dishwasher",
        "Display",
        "Laptop",
        "NetworkEquipment",
        "Printer",
        "Refrigerator",
        "Server",
        "SmallAppliance",
        "Smartphone",
        "Tablet",
        "Television",
        "VacuumCleaner",
        "WashingMachine",
        "Wearable"
      ]
    },
    "RepairabilityIndex": {
      "type": "object",
      "title": "Repairability Index",
      "description": "French repairability index (hasMethod euelec:FrenchRepairabilityIndexMethod): one oea:CriterionResult per criterion (euelec:Documentation, Disassembly, SparePartsAvailability, SparePartsPricing, ProductSpecific) with awardedScore 0-20; total, display score and A-E class are indicators. See common/assessment (oea:).",
      "properties": {
        "@type": {
          "const": "RepairabilityIndex"
        },
        "repairabilityLabelUrl": {
          "type": "string",
          "format": "uri",
          "description": "Resolvable URL to the consumer-facing repairability label artefact. Required."
        },
        "hasMethod": {
          "type": [
            "string",
            "object"
          ],
          "description": "oea:hasMethod: the assessment method, the IRI of a published oea:AssessmentMethod individual or an inline method."
        },
        "hasCondition": {
          "type": [
            "object",
            "array"
          ],
          "description": "oea:hasCondition: oea:AssessmentCondition object(s)."
        },
        "hasParameterSetting": {
          "type": [
            "object",
            "array"
          ],
          "description": "oea:hasParameterSetting: oea:ParameterSetting object(s) (protocol parameter + gs1:QuantitativeValue)."
        },
        "hasSubAssessment": {
          "type": [
            "object",
            "array"
          ],
          "description": "oea:hasSubAssessment: the tests of a composite assessment (oea:TestExecution objects)."
        },
        "hasResult": {
          "type": [
            "object",
            "array"
          ],
          "description": "oea:hasResult: oea:MeasurementResult / oea:CriterionResult object(s)."
        },
        "hasIndicator": {
          "type": [
            "object",
            "array"
          ],
          "description": "oea:hasIndicator: oea:Indicator object(s) for scores, classes and expected lifetimes."
        },
        "hasOutcome": {
          "type": [
            "string",
            "object"
          ],
          "description": "oea:hasOutcome: Satisfied, NotSatisfied or NotAssessed."
        },
        "assessmentDate": {
          "type": "string",
          "format": "date"
        },
        "hasAssessmentBody": {
          "type": [
            "string",
            "object"
          ]
        },
        "hasEvidence": {
          "type": [
            "object",
            "array"
          ]
        }
      }
    },
    "EURepairabilityClass": {
      "type": "string",
      "title": "EU Repairability Class",
      "description": "Repairability grade (A best to E worst) as defined by Right-to-Repair Directive 2024/1799.",
      "enum": [
        "RepairClassA",
        "RepairClassB",
        "RepairClassC",
        "RepairClassD",
        "RepairClassE"
      ]
    },
    "SoftwareSupport": {
      "type": "object",
      "title": "Software Support",
      "description": "Operating-system and firmware support commitments. The EU Right-to-Repair Directive 2024/1799 and ESPR Electronics delegated acts require explicit minimum support periods for security and feature updates.",
      "properties": {
        "@type": {
          "const": "SoftwareSupport"
        },
        "operatingSystem": {
          "type": "string",
          "description": "Operating system name (e.g. Android, iOS, Windows, Linux distribution). Required."
        },
        "osVersion": {
          "type": "string",
          "description": "Operating-system version shipped with the device. Required."
        },
        "firmwareVersion": {
          "type": "string",
          "description": "Firmware version shipped with the device. Required."
        },
        "securityUpdateEndDate": {
          "type": "string",
          "format": "date",
          "description": "Date until which security updates are committed to be provided. Required."
        },
        "featureUpdateEndDate": {
          "type": "string",
          "format": "date",
          "description": "Date until which feature updates are committed to be provided. Required."
        },
        "hasSecuritySupportYears": {
          "type": "integer",
          "minimum": 0,
          "description": "Security support period in whole years from placement on the market. Required."
        },
        "hasFeatureSupportYears": {
          "type": "integer",
          "minimum": 0,
          "description": "Feature support period in whole years from placement on the market. Required."
        },
        "updateChannel": {
          "type": "string",
          "format": "uri",
          "description": "Resolvable URL where software updates are published or distributed. Required."
        }
      },
      "required": [
        "operatingSystem",
        "osVersion",
        "firmwareVersion",
        "securityUpdateEndDate",
        "featureUpdateEndDate",
        "hasSecuritySupportYears",
        "hasFeatureSupportYears",
        "updateChannel"
      ]
    },
    "EnergyEfficiency": {
      "type": "object",
      "title": "Energy Efficiency",
      "description": "EU Energy Label data per Energy Labelling Framework Regulation 2017/1369 and the relevant product-group delegated acts, plus the EPREL (European Product Registry for Energy Labelling) cross-reference.",
      "properties": {
        "@type": {
          "const": "EnergyEfficiency"
        },
        "hasEnergyEfficiencyClass": {
          "$ref": "#/$defs/EnergyEfficiencyClass"
        },
        "hasAnnualEnergyConsumption": {
          "$ref": "#/$defs/QuantitativeValue",
          "description": "Annual energy consumption (typically in kWh/year)."
        },
        "energyLabelUrl": {
          "type": "string",
          "format": "uri",
          "description": "Resolvable URL to the consumer-facing EU energy-label artefact (the A–G colour scale)."
        },
        "eprelProductUrl": {
          "type": "string",
          "format": "uri",
          "description": "EPREL database registry URL for this product."
        }
      }
    },
    "EnergyEfficiencyClass": {
      "type": "string",
      "title": "Energy Efficiency Class",
      "description": "EU Energy Label class (A best, G worst) per Energy Labelling Regulation 2017/1369 rescaled labels.",
      "enum": [
        "EnergyClassA",
        "EnergyClassB",
        "EnergyClassC",
        "EnergyClassD",
        "EnergyClassE",
        "EnergyClassF",
        "EnergyClassG"
      ]
    },
    "ComponentBOM": {
      "type": "object",
      "title": "Component Bill of Materials",
      "description": "Bill of Materials for multi-component electronics, supporting the CIRPASS-2 nested-DPP pattern for components.",
      "properties": {
        "@type": {
          "const": "ComponentBOM"
        },
        "hasComponents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ElectronicComponent"
          },
          "minItems": 1,
          "description": "Constituent components of the device. Required."
        }
      },
      "required": [
        "hasComponents"
      ]
    },
    "ElectronicComponent": {
      "type": "object",
      "title": "Electronic Component",
      "description": "An individual electronic component listed in the device's bill of materials.",
      "properties": {
        "@type": {
          "const": "ElectronicComponent"
        },
        "name": {
          "type": "string",
          "description": "Human-readable component name. Required."
        },
        "hasComponentType": {
          "$ref": "#/$defs/ComponentType"
        },
        "componentPartNumber": {
          "type": "string",
          "description": "Manufacturer-assigned part number for the component."
        },
        "hasComponentPassport": {
          "type": "string",
          "format": "uri",
          "description": "Resolvable URL to the component's own Digital Product Passport (CIRPASS-2 nested-DPP pattern)."
        },
        "hasReplacementDifficulty": {
          "$ref": "#/$defs/ReplacementDifficulty"
        }
      },
      "required": [
        "name"
      ]
    },
    "ComponentType": {
      "type": "string",
      "title": "Component Type",
      "description": "Functional component categorisation used in the bill of materials.",
      "enum": [
        "BatteryComponent",
        "CameraComponent",
        "ConnectorComponent",
        "CoolingSystemComponent",
        "DisplayComponent",
        "EnclosureComponent",
        "KeyboardComponent",
        "MemoryComponent",
        "MicrophoneComponent",
        "MotherboardComponent",
        "PowerSupplyComponent",
        "ProcessorComponent",
        "SpeakerComponent",
        "StorageComponent",
        "TrackpadComponent"
      ]
    },
    "ReplacementDifficulty": {
      "type": "string",
      "title": "Replacement Difficulty",
      "description": "How accessible the replacement of this component is.",
      "enum": [
        "UserReplaceable",
        "ToolRequired",
        "ProfessionalOnly",
        "NotReplaceable"
      ]
    },
    "WEEECompliance": {
      "type": "object",
      "title": "WEEE Compliance",
      "description": "Waste Electrical and Electronic Equipment (WEEE) Directive 2012/19/EU compliance information.",
      "properties": {
        "@type": {
          "const": "WEEECompliance"
        },
        "weeeCategory": {
          "$ref": "#/$defs/WEEECategory"
        },
        "collectionSchemeUrl": {
          "type": "string",
          "format": "uri",
          "description": "Resolvable URL to the producer-responsibility collection scheme covering this product."
        }
      }
    },
    "WEEECategory": {
      "type": "string",
      "title": "WEEE Category",
      "description": "WEEE Directive 2012/19/EU Annex III equipment categories.",
      "enum": [
        "WEEE1_TemperatureExchange",
        "WEEE2_ScreensMonitors",
        "WEEE3_Lamps",
        "WEEE4_LargeEquipment",
        "WEEE5_SmallEquipment",
        "WEEE6_SmallIT"
      ]
    },
    "RoHSCompliance": {
      "type": "object",
      "title": "RoHS Compliance",
      "description": "Restriction of Hazardous Substances (RoHS) Directive 2011/65/EU compliance information.",
      "properties": {
        "@type": {
          "const": "RoHSCompliance"
        },
        "rohsCompliant": {
          "type": "boolean",
          "description": "True if the product complies with the RoHS restricted-substances list."
        },
        "rohsDeclarationUrl": {
          "type": "string",
          "format": "uri",
          "description": "Resolvable URL to the manufacturer's RoHS declaration of conformity."
        },
        "rohsExemptions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of RoHS Annex III / Annex IV exemption numbers claimed (e.g. \"6(c)\", \"7(a)\")."
        }
      }
    },
    "DisplaySpecification": {
      "type": "object",
      "title": "Display Specification",
      "description": "Display-specific technical specifications for monitors, TVs, and device screens (relevant to the ESPR Electronics display delegated act).",
      "properties": {
        "@type": {
          "const": "DisplaySpecification"
        },
        "displayTechnology": {
          "type": "string",
          "description": "Display technology (e.g. LCD-IPS, OLED, mini-LED, e-ink)."
        },
        "hasScreenDiagonal": {
          "$ref": "#/$defs/QuantitativeValue",
          "description": "Screen diagonal, typically in inches (unitCode INH)."
        },
        "screenResolutionWidth": {
          "type": "integer",
          "minimum": 1,
          "description": "Native horizontal resolution in pixels."
        },
        "screenResolutionHeight": {
          "type": "integer",
          "minimum": 1,
          "description": "Native vertical resolution in pixels."
        },
        "hasRefreshRate": {
          "$ref": "#/$defs/QuantitativeValue",
          "description": "Refresh rate, typically in Hz."
        },
        "hasPeakBrightness": {
          "$ref": "#/$defs/QuantitativeValue",
          "description": "Peak luminance, typically in cd/m² (nits)."
        }
      }
    },
    "QuantitativeValue": {
      "type": "object",
      "title": "Quantitative Value",
      "description": "GS1-idiomatic quantitative value with a numeric magnitude and a UN/CEFACT Recommendation 20 unit code.",
      "properties": {
        "@type": {
          "const": "QuantitativeValue"
        },
        "value": {
          "type": "number"
        },
        "unitCode": {
          "type": "string",
          "description": "UN/CEFACT Recommendation 20 unit code (e.g. KWH for kilowatt-hour, HTZ for Hertz, INH for inch, CDL for candela per square metre)."
        }
      },
      "required": [
        "value",
        "unitCode"
      ]
    }
  },
  "oneOf": [
    {
      "$ref": "#/$defs/ElectronicDevice"
    },
    {
      "$ref": "#/$defs/RepairabilityIndex"
    },
    {
      "$ref": "#/$defs/SoftwareSupport"
    },
    {
      "$ref": "#/$defs/EnergyEfficiency"
    },
    {
      "$ref": "#/$defs/ComponentBOM"
    },
    {
      "$ref": "#/$defs/ElectronicComponent"
    },
    {
      "$ref": "#/$defs/WEEECompliance"
    },
    {
      "$ref": "#/$defs/RoHSCompliance"
    },
    {
      "$ref": "#/$defs/DisplaySpecification"
    }
  ]
}
