Make JSON schema for projects more explicit (#6550)

This commit is contained in:
Mitchell Stern
2019-12-29 19:41:53 -05:00
committed by Philipp Moritz
parent 10338fde0c
commit 3e0f07468f
3 changed files with 39 additions and 11 deletions
+38 -10
View File
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
@@ -13,6 +14,10 @@
"description": "The URL of the repo this project is part of",
"type": "string"
},
"documentation": {
"description": "Link to the documentation of this project",
"type": "string"
},
"tags": {
"description": "Relevant tags for this project",
"type": "array",
@@ -20,10 +25,6 @@
"type": "string"
}
},
"documentation": {
"description": "Link to the documentation of this project",
"type": "string"
},
"cluster": {
"type": "object",
"properties": {
@@ -91,7 +92,8 @@
"type": "string"
}
}
}
},
"additionalProperties": false
},
"commands": {
"type": "array",
@@ -103,11 +105,15 @@
"description": "Name of the command",
"type": "string"
},
"help": {
"description": "Help string for the command",
"type": "string"
},
"command": {
"description": "Shell command to run on the cluster",
"type": "string"
},
"params" : {
"params": {
"type": "array",
"items": {
"description": "Possible parameters in the command",
@@ -124,8 +130,23 @@
"choices": {
"description": "Possible values the parameter can take",
"type": "array"
},
"default": {
},
"type": {
"description": "Required type for the parameter",
"type": "string",
"enum": [
"int",
"float",
"str"
]
}
}
},
"required": [
"name"
],
"additionalProperties": false
}
},
"config": {
@@ -142,12 +163,19 @@
"additionalProperties": false
}
}
}
},
"required": [
"name",
"command"
],
"additionalProperties": false
}
}
},
"output_files": {}
},
"required": [
"name",
"cluster"
]
],
"additionalProperties": false
}
@@ -2,7 +2,7 @@ name: testproject1
description: "Test project for docker environment"
environment:
docker: "Dockerfile"
dockerfile: "Dockerfile"
cluster:
config: cluster.yaml