aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbozo.kopic <bozo.kopic@gmail.com>2017-08-16 13:43:43 +0200
committerbozo.kopic <bozo.kopic@gmail.com>2017-08-16 13:43:43 +0200
commit1b6052d7e74d90806650ff09153c581e7ae851eb (patch)
tree571a37a3be6f933c873a3780e34a291b56c78e3c
parentae2cd78f02edf0c13c01407b82286fd566299705 (diff)
server json schema
-rw-r--r--schemas_json/server.yaml56
1 files changed, 56 insertions, 0 deletions
diff --git a/schemas_json/server.yaml b/schemas_json/server.yaml
new file mode 100644
index 0000000..89c74e4
--- /dev/null
+++ b/schemas_json/server.yaml
@@ -0,0 +1,56 @@
+---
+"$schema": "http://json-schema.org/schema#"
+id: "hatter://server.yaml#"
+title: Server
+description: Server configuration
+type: object
+required:
+ - repositories
+properties:
+ host:
+ title: Host
+ description: Listening host name
+ type: string
+ default: "0.0.0.0"
+ port:
+ title: TCP port
+ description: Listening TCP port
+ type: integer
+ default: 24000
+ db_path:
+ title: DB path
+ description: SQLite database path
+ type: string
+ default: hatter.db
+ webhook_path:
+ title: Webhook path
+ type: string
+ default: '/webhook'
+ repositories:
+ title: Repositories
+ description: List of all repositories with project definitions
+ type: array
+ items:
+ oneOf:
+ - "$ref": "hatter://server.yaml#/definitions/gitlab"
+ - "$ref": "hatter://server.yaml#/definitions/github"
+definitions:
+ gitlab:
+ type: object
+ required:
+ - type
+ - token
+
+ properties:
+ type:
+ enum:
+ - GITLAB
+ github:
+ type: object
+ required:
+ - type
+ properties:
+ type:
+ enum:
+ - GITHUB
+...