Commit 52944672 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[schema][algorithm][v3] Schema cleanup

In fact, v3 adds two new block types that are clearly defined.
So either the algorithm matches v2 type blocks or one of the loop
or loop user block from v3. The schema now uses better defined
constraints.
parent b841f264
......@@ -4,27 +4,15 @@
"description": "This schema defines the properties of a v3 algorithm",
"oneOf": [
{ "$ref": "#/definitions/block" },
{ "$ref": "#/definitions/loop" },
{ "$ref": "#/definitions/analyzer" }
{ "$ref": "2.json#/definitions/block" },
{ "$ref": "2.json#/definitions/analyzer" },
{ "$ref": "#/definitions/loop_user" },
{ "$ref": "#/definitions/loop" }
],
"definitions": {
"type": {
"type": "string",
"enum": [
"legacy",
"sequential",
"autonomous",
"loop"
]
},
"io_group": {
"loop_user_io_group": {
"type": "object",
......@@ -37,7 +25,8 @@
"required": [
"inputs",
"outputs"
"outputs",
"loop"
],
"additionalProperties": false
......@@ -50,7 +39,7 @@
"items": [
{ "$ref": "#/definitions/io_group" }
{ "$ref": "#/definitions/loop_user_io_group" }
],
......@@ -94,7 +83,7 @@
},
"block": {
"loop_user": {
"type": "object",
......@@ -107,7 +96,11 @@
"uses": { "$ref": "../common/1.json#/definitions/uses" },
"schema_version": { "$ref": "common.json#/definitions/schema_version" },
"api_version": { "$ref": "common.json#/definitions/api_version" },
"type": { "$ref": "#/definitions/type" }
"type": {
"$comment": "Change enum to const when tools allow v6 json schema",
"type": "string",
"enum": ["loop_user"]
}
},
"required": [
......@@ -129,11 +122,14 @@
"description": { "$ref": "../common/1.json#/definitions/description" },
"groups": { "$ref": "#/definitions/loop_groups" },
"parameters": { "$ref": "common.json#/definitions/parameters" },
"splittable": { "type": "boolean" },
"uses": { "$ref": "../common/1.json#/definitions/uses" },
"schema_version": { "$ref": "common.json#/definitions/schema_version" },
"api_version": { "$ref": "common.json#/definitions/api_version" },
"type": { "$ref": "#/definitions/type" }
"type": {
"$comment": "Change enum to const when tools allow v6 json schema",
"type": "string",
"enum": ["loop"]
}
},
"required": [
......@@ -143,32 +139,6 @@
"additionalProperties": false
},
"analyzer": {
"type": "object",
"properties": {
"language": { "$ref": "../common/1.json#/definitions/language" },
"description": { "$ref": "../common/1.json#/definitions/description" },
"groups": { "$ref": "common.json#/definitions/analyzer_groups" },
"parameters": { "$ref": "common.json#/definitions/parameters" },
"results": { "$ref": "common.json#/definitions/results" },
"uses": { "$ref": "../common/1.json#/definitions/uses" },
"schema_version": { "$ref": "common.json#/definitions/schema_version" },
"api_version": { "$ref": "common.json#/definitions/api_version" },
"type": { "$ref": "#/definitions/type" }
},
"required": [
"language",
"groups",
"results"
],
"additionalProperties": false
}
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment