From c59362b953436ce478a36fe98845fb27529b4835 Mon Sep 17 00:00:00 2001 From: Sebastian Echeverria Date: Wed, 1 Nov 2023 15:28:00 -0400 Subject: [PATCH] Updting schemas with array --- .../schema/artifact/value/v0.0.1/schema.json | 24 +++++++++++++++++++ mlte/schema/artifact/value/v0.0.1/schema.json | 24 +++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/mlte/frontend/nuxt-app/assets/schema/artifact/value/v0.0.1/schema.json b/mlte/frontend/nuxt-app/assets/schema/artifact/value/v0.0.1/schema.json index 7a2ae9b3..dc67ab4b 100644 --- a/mlte/frontend/nuxt-app/assets/schema/artifact/value/v0.0.1/schema.json +++ b/mlte/frontend/nuxt-app/assets/schema/artifact/value/v0.0.1/schema.json @@ -1,5 +1,25 @@ { "$defs": { + "ArrayValueModel": { + "description": "The model implementation for MLTE array values.", + "properties": { + "value_type": { + "const": "array", + "title": "Value Type" + }, + "data": { + "items": {}, + "title": "Data", + "type": "array" + } + }, + "required": [ + "value_type", + "data" + ], + "title": "ArrayValueModel", + "type": "object" + }, "EvidenceMetadata": { "description": "A simple wrapper for evidence metadata.", "properties": { @@ -133,6 +153,7 @@ "value": { "discriminator": { "mapping": { + "array": "#/$defs/ArrayValueModel", "image": "#/$defs/ImageValueModel", "integer": "#/$defs/IntegerValueModel", "opaque": "#/$defs/OpaqueValueModel", @@ -152,6 +173,9 @@ }, { "$ref": "#/$defs/ImageValueModel" + }, + { + "$ref": "#/$defs/ArrayValueModel" } ], "title": "Value" diff --git a/mlte/schema/artifact/value/v0.0.1/schema.json b/mlte/schema/artifact/value/v0.0.1/schema.json index 7a2ae9b3..dc67ab4b 100644 --- a/mlte/schema/artifact/value/v0.0.1/schema.json +++ b/mlte/schema/artifact/value/v0.0.1/schema.json @@ -1,5 +1,25 @@ { "$defs": { + "ArrayValueModel": { + "description": "The model implementation for MLTE array values.", + "properties": { + "value_type": { + "const": "array", + "title": "Value Type" + }, + "data": { + "items": {}, + "title": "Data", + "type": "array" + } + }, + "required": [ + "value_type", + "data" + ], + "title": "ArrayValueModel", + "type": "object" + }, "EvidenceMetadata": { "description": "A simple wrapper for evidence metadata.", "properties": { @@ -133,6 +153,7 @@ "value": { "discriminator": { "mapping": { + "array": "#/$defs/ArrayValueModel", "image": "#/$defs/ImageValueModel", "integer": "#/$defs/IntegerValueModel", "opaque": "#/$defs/OpaqueValueModel", @@ -152,6 +173,9 @@ }, { "$ref": "#/$defs/ImageValueModel" + }, + { + "$ref": "#/$defs/ArrayValueModel" } ], "title": "Value"