Add Pipeline stage, status and job JSON schemas

This commit is contained in:
Matija Čupić 2018-05-02 21:52:57 +02:00
parent 5c79256b9b
commit 54dbdf2863
No known key found for this signature in database
GPG Key ID: 4BAF84FFACD2E5DE
3 changed files with 72 additions and 0 deletions

24
spec/fixtures/api/schemas/job.json vendored Normal file
View File

@ -0,0 +1,24 @@
{
"type": "object",
"required": [
"id",
"name",
"started",
"build_path",
"playable",
"created_at",
"updated_at",
"status"
],
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"started": { "type": "boolean" } ,
"build_path": { "type": "string" },
"playable": { "type": "boolean" },
"created_at": { "type": "string" },
"updated_at": { "type": "string" },
"status": { "$ref": "status.json" }
},
"additionalProperties": false
}

View File

@ -0,0 +1,24 @@
{
"type": "object",
"required" : [
"name",
"title",
"status",
"path",
"dropdown_path"
],
"properties" : {
"name": { "type": "string" },
"title": { "type": "string" },
"groups": { "optional": true },
"latest_statuses": {
"type": "array",
"items": { "$ref": "job.json" },
"optional": true
},
"status": { "$ref": "status.json" },
"path": { "type": "string" },
"dropdown_path": { "type": "string" }
},
"additionalProperties": false
}

24
spec/fixtures/api/schemas/status.json vendored Normal file
View File

@ -0,0 +1,24 @@
{
"type": "object",
"required" : [
"icon",
"text",
"label",
"group",
"tooltip",
"has_details",
"details_path",
"favicon"
],
"properties": {
"icon": { "type": "string" },
"text": { "type": "string" },
"label": { "type": "string" },
"group": { "type": "string" },
"tooltip": { "type": "string" },
"has_details": { "type": "boolean" },
"details_path": { "type": "string" },
"favicon": { "type": "string" }
},
"additionalProperties": false
}