WIP: continued server work. Schema for config files.

This commit is contained in:
Jonathan Bernard
2017-02-19 14:51:43 -06:00
parent 9f68963f18
commit 435613f6dc
5 changed files with 94 additions and 0 deletions

View File

@ -0,0 +1,50 @@
{
"title": "StrawBoss service configuration schema.",
"type": "object",
"properties": {
"artifactsRepo": "string",
"projects": {
"title": "ProjectsList",
"type": "array",
"items": {
"title": "ProjectDefinition",
"type": "object",
"properties": {
"name": "string",
"repo": "string",
"defaultBranch": "string",
"cfgFilePath": "string",
"envVars": {
"type": "object",
"patternProperties": {
"^[\w-]+$": "string"
}
},
"required": ["name", "repo"],
"additionalProperties": false
}
}
},
"users": {
"title": "UsersList",
"type": "array",
"items": {
"title": "UserDefinition",
"type": "object",
"properties": {
"username": "string",
"hashedPwd": "string"
},
"required": ["username", "hashedPwd"],
"additionalProperties": false
}
},
"tokens": {
"title": "TokensList",
"type": "array",
"items": "string"
},
"required": ["artifactsRepo", "projects", "users", "tokens"],
"additionalProperties": false
}
}