From 25af5ea4669caa8c3c52ef11504253ac818ebb11 Mon Sep 17 00:00:00 2001 From: Rich Piazza Date: Wed, 6 Mar 2024 16:00:59 -0500 Subject: [PATCH] fix observed-string schema --- .../examples/mission_id.json | 6 +-- ...-8b1aa84c-5532-4c69-a8e7-b6170facfd3d.json | 35 +++++++++++---- .../observed-string-8b1/observed-string.json | 44 ------------------- 3 files changed, 30 insertions(+), 55 deletions(-) delete mode 100644 extension-definition-specifications/observed-string-8b1/observed-string.json diff --git a/extension-definition-specifications/observed-string-8b1/examples/mission_id.json b/extension-definition-specifications/observed-string-8b1/examples/mission_id.json index 405629a1447..93032c4b8b5 100644 --- a/extension-definition-specifications/observed-string-8b1/examples/mission_id.json +++ b/extension-definition-specifications/observed-string-8b1/examples/mission_id.json @@ -6,7 +6,7 @@ "purpose": "mission-id", "extensions": { "extension-definition--8b1aa84c-5532-4c69-a8e7-b6170facfd3d": { - "extension_type": "new-sco" - } + "extension_type": "new-sco" } - } \ No newline at end of file + } +} diff --git a/extension-definition-specifications/observed-string-8b1/extension-definition--8b1aa84c-5532-4c69-a8e7-b6170facfd3d.json b/extension-definition-specifications/observed-string-8b1/extension-definition--8b1aa84c-5532-4c69-a8e7-b6170facfd3d.json index 04250a2d002..b87b6508ca4 100644 --- a/extension-definition-specifications/observed-string-8b1/extension-definition--8b1aa84c-5532-4c69-a8e7-b6170facfd3d.json +++ b/extension-definition-specifications/observed-string-8b1/extension-definition--8b1aa84c-5532-4c69-a8e7-b6170facfd3d.json @@ -6,7 +6,7 @@ "type": "object", "allOf": [ { - "$ref": "http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/cyber-observerable-core.json" + "$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/master/schemas/common/cyber-observable-core.json" }, { "properties": { @@ -15,14 +15,33 @@ "properties": { "extension-definition--8b1aa84c-5532-4c69-a8e7-b6170facfd3d": { "type": "object", - "$ref": "observed-string.json" - } - } - } + "additionalProperties": false, + "properties": { + "extension_type": { + "type": "string", + "const": "new-sco" + } + }, + "required": [ + "extension_type" + ] + } + } }, - "required": [ - "extensions" - ] + "purpose": { + "type": "string", + "description": "What this string is used for" + }, + "value": { + "type": "string", + "description": "The Unicode encoded value of the string. It SHOULD come from string-purpose-ov" + }, + "required": [ + "extensions", + "purpose", + "value" + ] + } } ] } diff --git a/extension-definition-specifications/observed-string-8b1/observed-string.json b/extension-definition-specifications/observed-string-8b1/observed-string.json deleted file mode 100644 index 296246ffb0e..00000000000 --- a/extension-definition-specifications/observed-string-8b1/observed-string.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "$id": "https://raw.githubusercontent.com/oasis-open/cti-stix-common-objects/main/extension-definition-specifications/observed-string-8b1/observed-string.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "observed-string-extension-schema", - "description": "This is the observed-string extension schema", - "type": "object", - "properties": { - "extension_type": { - "type": "string", - "enum": [ - "property-extension" - ] - }, - "purpose": { - "type": "string", - "description": "What this string is used for" - }, - "value": { - "type": "string", - "description": "The Unicode encoded value of the string. It SHOULD come from string-purpose-ov" - } - }, - "required": [ - "extension_type", - "purpose", - "value" - ], - "additionalProperties": false, - "definitions": { - "string-purpose-ov": { - "type": "string", - "enum": [ - "decoded", - "document-text", - "gui-text", - "mission-id", - "pipe", - "unknown", - "user-agent", - "uuid" - ] - } - } -}