🍱 add jsonschema for blueprint yaml validation

This commit is contained in:
Fred KISSIE
2025-10-22 21:58:19 +02:00
parent 202d2075a6
commit 6521b66b7c

View File

@@ -0,0 +1 @@
{"$ref":"#/definitions/BluePrintSchema","definitions":{"BluePrintSchema":{"type":"object","properties":{"proxy-resources":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"protocol":{"type":"string","enum":["http","tcp","udp"]},"ssl":{"type":"boolean"},"full-domain":{"type":"string"},"proxy-port":{"type":"integer","minimum":1,"maximum":65535},"enabled":{"type":"boolean"},"targets":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"site":{"type":"string"},"method":{"type":"string","enum":["http","https","h2c"]},"hostname":{"type":"string"},"port":{"type":"integer","minimum":1,"maximum":65535},"enabled":{"type":"boolean","default":true},"internal-port":{"type":"integer","minimum":1,"maximum":65535},"path":{"type":"string"},"path-match":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","enum":["exact","prefix","regex"]}]},{"type":"null"}]},"healthcheck":{"type":"object","properties":{"hostname":{"type":"string"},"port":{"type":"integer","minimum":1,"maximum":65535},"enabled":{"type":"boolean","default":true},"path":{"type":"string"},"scheme":{"type":"string"},"mode":{"type":"string","default":"http"},"interval":{"type":"integer","default":30},"unhealthyInterval":{"type":"integer","default":30},"timeout":{"type":"integer","default":5},"headers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},{"type":"null"}],"default":null},"followRedirects":{"type":"boolean","default":true},"method":{"type":"string","default":"GET"},"status":{"type":"integer"}},"required":["hostname","port"],"additionalProperties":false},"rewritePath":{"type":"string"},"rewrite-match":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","enum":["exact","prefix","regex","stripPrefix"]}]},{"type":"null"}]},"priority":{"type":"integer","minimum":1,"maximum":1000,"default":100}},"required":["hostname","port"],"additionalProperties":false},{"type":"null"}]},"default":[]},"auth":{"type":"object","properties":{"pincode":{"type":"number","minimum":100000,"maximum":999999},"password":{"type":"string","minLength":1},"basic-auth":{"type":"object","properties":{"user":{"type":"string","minLength":1},"password":{"type":"string","minLength":1}},"required":["user","password"],"additionalProperties":false},"sso-enabled":{"type":"boolean","default":false},"sso-roles":{"type":"array","items":{"type":"string"},"default":[]},"sso-users":{"type":"array","items":{"type":"string","format":"email"},"default":[]},"whitelist-users":{"type":"array","items":{"type":"string","format":"email"},"default":[]}},"additionalProperties":false},"host-header":{"type":"string"},"tls-server-name":{"type":"string"},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["name","value"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["allow","deny","pass"]},"match":{"type":"string","enum":["cidr","path","ip","country"]},"value":{"type":"string"}},"required":["action","match","value"],"additionalProperties":false}}},"additionalProperties":false},"default":{}},"client-resources":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"site":{"type":"string","minLength":2,"maxLength":100},"protocol":{"type":"string","enum":["tcp","udp"]},"proxy-port":{"type":"number","minimum":1,"maximum":65535},"hostname":{"type":"string","minLength":1,"maxLength":255},"internal-port":{"type":"number","minimum":1,"maximum":65535},"enabled":{"type":"boolean","default":true}},"required":["name","protocol","proxy-port","hostname","internal-port"],"additionalProperties":false},"default":{}},"sites":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"docker-socket-enabled":{"type":"boolean","default":true}},"required":["name"],"additionalProperties":false},"default":{}}},"additionalProperties":false}},"$schema":"http://json-schema.org/draft-07/schema#"}