diff --git a/schema/core.json b/schema/core.json new file mode 100644 index 0000000..31b5e03 --- /dev/null +++ b/schema/core.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://docs.oasis-open.org/openeox/tbd/schema/core.json", + "title": "EOL and EOS Information", + "description": "A draft schema for representing End-of-Life (EOL) and End-of-Support (EOS) information in OpenEoX.", + "type": "object", + "$defs": { + "schema_t": { + "title": "OpenEoX Core schema", + "description": "Specifies the schema the JSON object must be valid against.", + "type": "string", + "enum": [ + "https://docs.oasis-open.org/openeox/tbd/schema/core.json" + ] + } + }, + "required": ["$schema", "last_updated", "status"], + "properties": { + "$schema": { + "$ref": "#/$defs/schema_t" + }, + "last_updated": { + "title": "Timestamp of last change", + "description": "Contains the RFC 3339 timestamp when the record was last updated.", + "type": "string", + "format": "date-time" + }, + "status": { + "title": "List of status", + "description": "Contains a list of status elements.", + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "title": "Status", + "description": "Contains a single entry in the product lifecycle.", + "type": "object", + "required": ["category", "timestamp"], + "properties": { + "category": { + "title": "Status category", + "description": "Contains the category of the status", + "type": "string", + "enum": ["EndOfLife", "EndOfSupport"] + }, + "timestamp": { + "title": "Timestamp", + "description": "Contains the timestamp at which the product enters the category.", + "type": "string", + "oneOf": [ + { + "format": "date-time" + }, + { + "enum": ["tba"] + } + ] + } + } + } + } + } +} diff --git a/schema/shell.json b/schema/shell.json new file mode 100644 index 0000000..7b21b89 --- /dev/null +++ b/schema/shell.json @@ -0,0 +1,70 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://docs.oasis-open.org/openeox/tbd/schema/shell.json", + "title": "EOL and EOS Information", + "description": "A draft schema for representing End-of-Life (EOL) and End-of-Support (EOS) information in OpenEoX.", + "type": "object", + "$defs": { + "productName_t": { + "title": "Product name", + "description": "Contains the name of the product.", + "type": "string", + "minLength": 1 + }, + "productVersion_t": { + "title": "Product version", + "description": "Contains the version or release of the product.", + "type": "string", + "minLength": 1 + }, + "supplierName_t": { + "title": "Supplier name", + "description": "Contains the name of the supplier or service provider.", + "type": "string", + "minLength": 1 + }, + "schema_t": { + "title": "OpenEoX Shell schema", + "description": "Specifies the schema the JSON object must be valid against.", + "type": "string", + "enum": [ + "https://docs.oasis-open.org/openeox/tbd/schema/shell.json" + ] + } + }, + "required": [ + "$schema", + "statements" + ], + "properties": { + "$schema": { + "$ref": "#/$defs/schema_t" + }, + "statements": { + "title": "List of statements", + "description": "Contains a list of statement elements.", + "type": "array", + "minItems": 1, + "items": { + "title": "Statement", + "description": "Statements contain the single OpenEoX entries.", + "type": "object", + "required": ["core", "productName", "productVersion", "supplierName"], + "properties": { + "core": { + "$ref": "https://docs.oasis-open.org/openeox/tbd/schema/core.json" + }, + "productName": { + "$ref": "#/$defs/productName_t" + }, + "productVersion": { + "$ref": "#/$defs/productVersion_t" + }, + "supplierName": { + "$ref": "#/$defs/supplierName_t" + } + } + } + } + } +} \ No newline at end of file