eslint-plugin-json-schema-validator
Version:
ESLint plugin that validates data using JSON Schema Validator.
1 lines • 6.28 kB
JSON
{"title":"JSON schema for Apex Up configuration files","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name"],"properties":{"name":{"type":"string","title":"Name of the project.","examples":["apex-site","apex-api","ping-app"]},"description":{"type":"string","title":"Description of the project.","examples":["Marketing site","Public API"]},"type":{"type":"string","title":"Type of project.","default":"server","enum":["static","server"],"examples":["static"]},"profile":{"type":"string","title":"AWS profile.","examples":["apex-prod","apex-dev","personal"]},"regions":{"type":"array","minItems":1,"items":{"type":"string","title":"AWS Region.","enum":["us-east-2","us-east-1","us-west-1","us-west-2","ap-south-1","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-northeast-1","ca-central-1","eu-central-1","eu-west-1","eu-west-2","eu-west-3","sa-east-1"],"examples":["us-west-2","us-*","eu-*","*"]}},"lambda":{"type":"object","properties":{"accelerate":{"type":"boolean","title":"Enables S3 acceleration.","default":false},"warm":{"type":"boolean","title":"Enables active warming.","default":false},"warm_rate":{"type":"string","title":"Active warming rate.","default":"15m","examples":["5m","30m"]},"warm_count":{"type":"integer","title":"Active warming container count.","default":"15"},"memory":{"type":"integer","title":"Memory.","default":512,"enum":[128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048,2112,2176,2240,2304,2368,2432,2496,2560,2624,2688,2752,2816,2880,2944,3008]}}},"stages":{"type":"object","properties":{"production":{"type":"object","properties":{"domain":{"type":"string","title":"Domain name.","default":"","examples":["gh-polls.com","api.gh-polls.com"]}}},"staging":{"type":"object","properties":{"domain":{"type":"string","title":"Domain name.","default":"","examples":["stage.gh-polls.com","gh-polls-staging.com"]}}},"development":{"type":"object","properties":{"domain":{"type":"string","title":"Domain name.","default":"","examples":["dev.gh-polls.com"]}}}}},"hooks":{"type":"object","properties":{"build":{"type":"string","title":"Build hook."},"clean":{"type":"string","title":"Clean hook."},"prebuild":{"type":"string","title":"Prebuild hook."},"postbuild":{"type":"string","title":"Postbuild hook."},"predeploy":{"type":"string","title":"Predeploy hook."},"postdeploy":{"type":"string","title":"Postdeploy hook."}}},"static":{"type":"object","properties":{"dir":{"type":"string","title":"Directory path.","default":".","examples":["public","./dist"]},"prefix":{"type":"string","title":"URL prefix.","examples":["/public/","/static/"]}}},"proxy":{"type":"object","properties":{"command":{"type":"string","title":"Command.","default":"./server","examples":["node app.js"]},"timeout":{"type":"integer","title":"Request timeout.","default":15},"listen_timeout":{"type":"integer","title":"Listen timeout.","default":15},"shutdown_timeout":{"type":"integer","title":"Shutdown timeout.","default":15},"backoff":{"type":"object","properties":{"min":{"type":"integer","title":"Minimum delay.","default":500},"max":{"type":"integer","title":"Max delay.","default":1500},"factor":{"type":"number","title":"Factor.","default":1.5},"attempts":{"type":"integer","title":"Retry attempts.","default":5},"jitter":{"type":"boolean","title":"Jitter.","default":false}}}}},"dns":{"type":"object"},"environment":{"type":"object"},"headers":{"type":"object"},"error_pages":{"type":"object","properties":{"disable":{"type":"boolean","title":"Disable error pages.","default":false},"dir":{"type":"string","title":"Directory path.","default":".","examples":["public","./dist"]},"variables":{"type":"object","properties":{"support_email":{"type":"string","title":"Support email.","examples":["support@apex.sh"]},"color":{"type":"string","title":"Color.","examples":["#228ae6"]}}}}},"cors":{"type":"object","properties":{"enable":{"type":"boolean","title":"Enable CORS.","default":false},"allowed_origins":{"type":"array","items":{"type":"string","title":"Allowed Origins.","default":"*","examples":["https://*.myapp.com","https://myapp.com"]}},"allowed_methods":{"type":"array","items":{"type":"string","title":"Allowed Methods.","examples":["GET","HEAD"]}},"allowed_headers":{"type":"array","items":{"type":"string","title":"Allowed Headers.","examples":["Content-Type"]}},"exposed_headers":{"type":"array","items":{"type":"string","title":"Exposed Headers.","examples":["Content-Type"]}},"max_age":{"type":"integer","title":"Max Age.","default":0},"allowed_credentials":{"type":"boolean","title":"Allow Credentials.","default":true}}},"inject":{"type":"object"},"redirects":{"type":"object"},"actions":{"type":"array","items":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string","title":"Action Name.","examples":["slack","email.backend","text.frontend","text_frontend","email.tj","email tj","Text backend team"]},"type":{"type":"string","title":"Action Type.","examples":["email","sms"]},"emails":{"type":"array","items":{"type":"string","title":"Email addresses.","examples":["tj@apex.sh"]}},"numbers":{"type":"array","items":{"type":"string","title":"Phone numbers.","examples":["+12508004123"]}}}}},"alerts":{"type":"array","items":{"type":"object","required":["metric","statistic","threshold","action"],"properties":{"metric":{"type":"string","title":"Metric name.","examples":["http.count","http.latency","http.4xx","http.5xx"]},"statistic":{"type":"string","title":"Statistics name.","enum":["min","max","avg","sum","count"],"examples":["avg","sum"]},"threshold":{"type":"integer","title":"Value Threshold.","default":0},"action":{"type":"string","title":"Action Name.","examples":["email.backend","sms backend team"]},"period":{"type":["integer","string"],"title":"Period.","default":"1m"},"evaluation_periods":{"type":"integer","title":"Evaluation Periods.","default":1},"operator":{"type":"string","title":"Operator.","default":">","enum":[">","<",">=","<="]},"namespace":{"type":"string","title":"Namespace.","examples":["AWS/ApiGateway"]},"description":{"type":"string","title":"Description.","examples":["Huge traffic spike"]},"disable":{"type":"boolean","title":"Disable.","default":false}}}}}}