Added json schemas

This commit is contained in:
Nicolas Van Bossuyt 2023-02-20 12:05:55 +01:00
parent 2781990ff5
commit dc08039305
3 changed files with 188 additions and 0 deletions

View file

@ -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"
}
}
}
}

View file

@ -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"
}
}
}
}
}
}
}

View file

@ -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"
}
}
}
}
}