From dc08039305a8e0cb1528692919e6f15c1a262cd7 Mon Sep 17 00:00:00 2001 From: Nicolas Van Bossuyt Date: Mon, 20 Feb 2023 12:05:55 +0100 Subject: [PATCH] Added json schemas --- schemas/osdk.manifest.component.v1.json | 84 +++++++++++++++++++++++++ schemas/osdk.manifest.project.v1.json | 39 ++++++++++++ schemas/osdk.manifest.target.v1.json | 65 +++++++++++++++++++ 3 files changed, 188 insertions(+) create mode 100644 schemas/osdk.manifest.component.v1.json create mode 100644 schemas/osdk.manifest.project.v1.json create mode 100644 schemas/osdk.manifest.target.v1.json diff --git a/schemas/osdk.manifest.component.v1.json b/schemas/osdk.manifest.component.v1.json new file mode 100644 index 0000000..324f41f --- /dev/null +++ b/schemas/osdk.manifest.component.v1.json @@ -0,0 +1,84 @@ +{ + "$id": "https://schema.cute.engineering/osdk.manifest.component.v1.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A representation of a component manifest for OSDK", + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "description": "The unique identifier for this manifest", + "type": "string" + }, + "type": { + "description": "The type of this manifest", + "type": "string" + }, + "description": { + "description": "A description of this manifest", + "type": "string" + }, + "props": { + "type": "object", + "description": "A list of properties that this component provides", + "patternProperties": { + ".*": {} + } + }, + "tools": { + "type": "object", + "description": "A list of tools that this component provides", + "patternProperties": { + ".*": { + "type": "object", + "properties": { + "cmd": { + "description": "Command to run the tool", + "type": "string" + }, + "args": { + "description": "Arguments to pass to the tool", + "type": "array", + "items": { + "type": "string" + } + }, + "files": { + "description": "Files used by the tool", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "enableIf": { + "type": "object", + "description": "A list of conditions that must be met for this component to be enabled", + "patternProperties": { + ".*": { + "type": "list", + "items": {} + } + } + }, + "requires": { + "type": "array", + "description": "A list of features that this component requires", + "items": { + "type": "string" + } + }, + "provides": { + "type": "array", + "description": "A list of features that this component provides (note: by default all components provides they own id as a feature)", + "items": { + "type": "string" + } + } + } +} \ No newline at end of file diff --git a/schemas/osdk.manifest.project.v1.json b/schemas/osdk.manifest.project.v1.json new file mode 100644 index 0000000..1f53c8c --- /dev/null +++ b/schemas/osdk.manifest.project.v1.json @@ -0,0 +1,39 @@ +{ + "$id": "https://schema.cute.engineering/osdk.manifest.project.v1.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A representation of a component project for OSDK", + "type": "object", + "properties": { + "id": { + "description": "The unique identifier for this manifest", + "type": "string" + }, + "type": { + "description": "The type of this manifest", + "type": "string" + }, + "description": { + "description": "A description of this manifest", + "type": "string" + }, + "extern": { + "description": "A list of external dependencies", + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "properties": { + "git": { + "description": "The git repository to clone", + "type": "string" + }, + "tag": { + "description": "The tag to checkout", + "type": "string" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/schemas/osdk.manifest.target.v1.json b/schemas/osdk.manifest.target.v1.json new file mode 100644 index 0000000..7bcf369 --- /dev/null +++ b/schemas/osdk.manifest.target.v1.json @@ -0,0 +1,65 @@ +{ + "$id": "https://schema.cute.engineering/osdk.manifest.target.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A representation of a target manifest for OSDK", + "type": "object", + "properties": { + "id": { + "description": "The unique identifier for this manifest", + "type": "string" + }, + "type": { + "description": "The type of this manifest", + "type": "string" + }, + "description": { + "description": "A description of this manifest", + "type": "string" + }, + "props": { + "type": "object", + "description": "A list of properties that this target provides", + "patternProperties": { + ".*": {} + } + }, + "tools": { + "type": "object", + "description": "A list of tools that this target provides", + "patternProperties": { + ".*": { + "type": "object", + "properties": { + "cmd": { + "description": "Command to run the tool", + "type": "string" + }, + "args": { + "description": "Arguments to pass to the tool", + "type": "array", + "items": { + "type": "string" + } + }, + "files": { + "description": "Files used by the tool", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "routing": { + "type": "object", + "description": "A list of feature to component mappings", + "patternProperties": { + ".*": { + "type": "string" + } + } + } + } +} \ No newline at end of file