WIP> Completed JSON schemas.

This commit is contained in:
Jonathan Bernard 2017-02-20 00:11:31 -06:00
parent 435613f6dc
commit 36eb80077d
2 changed files with 33 additions and 35 deletions

View File

@ -2,40 +2,40 @@
"title": "Strawboss project configuration schema", "title": "Strawboss project configuration schema",
"type": "object", "type": "object",
"properties": { "properties": {
"name": "string", "name": { "type": "string" },
"versionCmd": "string", "versionCmd": { "type": "string" },
"steps": { "steps": {
"title": "StepsCollection", "title": "StepsCollection",
"type": "object", "type": "object",
"minProperties": 1, "minProperties": 1,
"properties": { "properties": {
"patternProperties": { "patternProperties": {
"^[\w-]+$": { "^[\\w-]+$": {
"type": "object", "type": "object",
"title": "StepDefinition", "title": "StepDefinition",
"properties": { "properties": {
"workingDir": "string", "workingDir": { "type": "string"},
"stepCmd": "string", "stepCmd": { "type": "string"},
"artifacts": { "artifacts": {
"type": "array", "type": "array",
"items": "string" }, "items": { "type": "string" }},
"cmdInput": { "cmdInput": {
"type": "array", "type": "array",
"items": "string" }, "items": { "type": "string" }},
"depends": { "depends": {
"type": "array", "type": "array",
"items": "string" }, "items": { "type": "string" }},
"expectedEnv": { "expectedEnv": {
"type": "array", "type": "array",
"items": "string" }, "items": { "type": "string" }},
"dontCache": "bool", "dontCache": "bool"
"additionalProperties": false },
} "additionalProperties": false
} }
} }
} }
}, }
"required": ["name", "steps"], },
"additionalProperties": false "required": ["name", "steps"],
} "additionalProperties": false
} }

View File

@ -2,7 +2,7 @@
"title": "StrawBoss service configuration schema.", "title": "StrawBoss service configuration schema.",
"type": "object", "type": "object",
"properties": { "properties": {
"artifactsRepo": "string", "artifactsRepo": { "type": "string" },
"projects": { "projects": {
"title": "ProjectsList", "title": "ProjectsList",
"type": "array", "type": "array",
@ -10,19 +10,17 @@
"title": "ProjectDefinition", "title": "ProjectDefinition",
"type": "object", "type": "object",
"properties": { "properties": {
"name": "string", "name": { "type": "string" },
"repo": "string", "repo": { "type": "string" },
"defaultBranch": "string", "defaultBranch": { "type": "string" },
"cfgFilePath": "string", "cfgFilePath": { "type": "string" },
"envVars": { "envVars": {
"type": "object", "type": "object",
"patternProperties": { "patternProperties": { "^[\\w-]+$": { "type": "string" } }
"^[\w-]+$": "string" }
} },
}, "required": ["name", "repo"],
"required": ["name", "repo"], "additionalProperties": false
"additionalProperties": false
}
} }
}, },
"users": { "users": {
@ -32,8 +30,8 @@
"title": "UserDefinition", "title": "UserDefinition",
"type": "object", "type": "object",
"properties": { "properties": {
"username": "string", "username": { "type": "string" },
"hashedPwd": "string" "hashedPwd": { "type": "string" }
}, },
"required": ["username", "hashedPwd"], "required": ["username", "hashedPwd"],
"additionalProperties": false "additionalProperties": false
@ -42,9 +40,9 @@
"tokens": { "tokens": {
"title": "TokensList", "title": "TokensList",
"type": "array", "type": "array",
"items": "string" "items": { "type": "string" }
}, }
"required": ["artifactsRepo", "projects", "users", "tokens"], },
"additionalProperties": false "required": ["artifactsRepo", "projects", "users", "tokens"],
} "additionalProperties": false
} }