From dfd57ee351569d15d68acc993ec70be8eeb85245 Mon Sep 17 00:00:00 2001 From: tschmidtb51 <65305130+tschmidtb51@users.noreply.github.com> Date: Wed, 24 Jan 2024 18:55:14 +0100 Subject: [PATCH] Core Schema Draft - add a core schema as draft --- schema/openeox_core_schema.json | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 schema/openeox_core_schema.json diff --git a/schema/openeox_core_schema.json b/schema/openeox_core_schema.json new file mode 100644 index 0000000..ebde522 --- /dev/null +++ b/schema/openeox_core_schema.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://docs.oasis-open.org/openeox/tbd/openeox_core_json_schema.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": "EOL and EOS schema", + "description": "Specifies the schema the JSON object must be valid against.", + "type": "string", + "enum": [ + "https://docs.oasis-open.org/openeox/tbd/openeox_core_json_schema.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"] + } + ] + } + } + } + } + } +}