{ "definitions": { "strictName": { "type": "string", "pattern": "^[a-z][a-z0-9\\-]+$" }, "looseName": { "type": "string", "pattern": "^[a-z][a-zA-Z0-9\\-_]+$" }, "macros": { "type": "string", "pattern": "^[a-z][a-zA-Z0-9\\-_/.]+$" }, "region": { "type": "string", "enum": [ "us-east-1", "us-east-2", "us-west-1", "us-west-2", "ca-central-1", "eu-west-1", "eu-central-1", "eu-west-2", "eu-west-3", "eu-north-1", "ap-northeast-1", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-south-1", "sa-east-1", "us-gov-west-1", "us-gov-east-1" ] }, "table": { "type": "object", "title": "DynamoDB table", "propertyNames": { "pattern": "^[a-z][a-z|0-9|\\-]+$" }, "minProperties": 1, "maxProperties": 1 } }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://arc.codes/schema.json", "type": "object", "title": "OpenJS Architect JSON Schema", "required": [ "app" ], "additionalProperties": { "type": [ "array", "object" ], "items": { "type": [ "string", "number", "boolean", "array", "object" ] } }, "properties": { "app": { "$id": "#/properties/app", "title": "@app", "description": "Application namespace", "type": [ "string", "array" ], "maxItems": 1, "items": { "$ref": "#/definitions/looseName" } }, "aws": { "$id": "#/properties/aws", "title": "@aws", "description": "AWS specific configuration", "type": [ "array", "object" ], "maxItems": 12, "uniqueItems": true, "items": { "type": [ "array", "object" ], "maxItems": 2, "items": [ { "type": "string", "enum": [ "apigateway", "bucket", "concurrency", "layer", "layers", "memory", "policy", "policies", "profile", "region", "runtime", "timeout" ] }, { "type": [ "string", "number" ] } ] }, "properties": { "apigateway": { "type": "string" }, "bucket": { "type": "string" }, "concurrency": { "type": "number" }, "layer": { "type": [ "string", "object", "array" ] }, "layers": { "type": [ "string", "object", "array" ] }, "memory": { "type": "number" }, "policy": { "type": [ "string", "object", "array" ] }, "policies": { "type": [ "string", "object", "array" ] }, "profile": { "type": "string" }, "region": { "type": "string" }, "runtime": { "type": "string" }, "timeout": { "type": "number" } } }, "static": { "$id": "#/properties/static", "title": "@static", "description": "Static asset & S3 configuration", "uniqueItems": true, "type": "array", "maxItems": 6, "items": { "type": ["array", "object"], "items": [ { "type": "string", "enum": [ "fingerprint", "folder", "ignore", "prefix", "production", "prune", "spa", "staging" ] }, { "type": [ "string", "boolean", "array", "object" ] } ], "properties": { "fingerprint": { "type": [ "boolean", "string" ] }, "folder": { "type": "string" }, "ignore": { "type": [ "string", "object", "array" ] }, "prefix": { "type": "string" }, "production": { "type": "string" }, "prune": { "type": "boolean" }, "spa": { "type": "boolean" }, "staging": { "type": "string" } } } }, "ws": { "$id": "#/properties/ws", "type": "array", "title": "@ws", "description": "API Gateway WebSocket configuration", "uniqueItems": true, "items": { "$ref": "#/definitions/strictName" } }, "http": { "$id": "#/properties/http", "title": "@http", "description": "API Gateway configuration", "type": "array", "uniqueItems": true, "items": { "type": [ "array", "object" ], "maxItems": 2, "maxProperties": 1, "properties": { "any": { "type": "string", "pattern": "^[a-zA-Z0-9\\/\\-:\\._\\*]+$" }, "get": { "type": "string", "pattern": "^[a-zA-Z0-9\\/\\-:\\._\\*]+$" }, "post": { "type": "string", "pattern": "^[a-zA-Z0-9\\/\\-:\\._\\*]+$" }, "put": { "type": "string", "pattern": "^[a-zA-Z0-9\\/\\-:\\._\\*]+$" }, "patch": { "type": "string", "pattern": "^[a-zA-Z0-9\\/\\-:\\._\\*]+$" }, "delete": { "type": "string", "pattern": "^[a-zA-Z0-9\\/\\-:\\._\\*]+$" }, "head": { "type": "string", "pattern": "^[a-zA-Z0-9\\/\\-:\\._\\*]+$" }, "options": { "type": "string", "pattern": "^[a-zA-Z0-9\\/\\-:\\._\\*]+$" } }, "items": [ { "type": "string", "enum": [ "any", "get", "post", "put", "patch", "delete", "head", "options" ] }, { "type": "string", "pattern": "^[a-zA-Z0-9\\/\\-:\\._\\*]+$" } ] } }, "proxy": { "$id": "#/properties/http", "title": "@proxy", "description": "Proxy", "type": "array", "uniqueItems": true, "items": { "type": [ "array", "object" ], "maxItems": 3, "maxProperties": 1, "properties": { "testing": { "type": "string", "pattern": "^https?:\\/\\/.+$" }, "staging": { "type": "string", "pattern": "^https?:\\/\\/.+$" }, "production": { "type": "string", "pattern": "^https?:\\/\\/.+$" } }, "items": [ { "type": "string", "enum": [ "testing", "staging", "production" ] }, { "type": "string", "pattern": "^https?:\\/\\/.+$" } ] } }, "events": { "$id": "#/properties/events", "type": "array", "title": "@events", "description": "Events configuration", "uniqueItems": true, "items": { "$ref": "#/definitions/strictName" } }, "queues": { "$id": "#/properties/queues", "type": "array", "title": "@queues", "description": "Queues configuration", "uniqueItems": true, "items": { "$ref": "#/definitions/strictName" } }, "macros": { "$id": "#/properties/macros", "type": "array", "title": "@macros", "description": "Deployment macros configuration", "uniqueItems": true, "items": { "$ref": "#/definitions/macros" } }, "scheduled": { "$id": "#/properties/scheduled", "type": [ "array", "object" ], "title": "@scheduled", "description": "Scheduled event configuration", "uniqueItems": true, "items": { "$id": "#/properties/scheduled/items", "type": [ "array", "object" ], "title": "scheduled handlers", "items": [ { "type": "string", "pattern": "^[a-z][a-z|\\-|0-9]+$" }, { "type": "string", "pattern": "^(rate|cron)" } ] } }, "tables": { "$id": "#/properties/tables", "type": "array", "title": "@tables", "description": "DynamoDB database tables configuration", "uniqueItems": true, "items": { "$ref": "#/definitions/table" } }, "indexes": { "$id": "#/properties/indexes", "type": "array", "title": "@indexes", "description": "DynamoDB global secondary indexes configuration", "uniqueItems": true, "items": { "$ref": "#/definitions/table" } } } }