Last active
February 7, 2026 05:39
-
-
Save anuragvohraec/c3f66d0e28d32a72429ef054c41f1eeb to your computer and use it in GitHub Desktop.
Schema for Bhidu Deployment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "title": "Server Configuration", | |
| "type": "object", | |
| "additionalProperties": false, | |
| "properties": { | |
| "port": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 65535, | |
| "description": "Port on which the server listens" | |
| }, | |
| "ssl": { | |
| "type": "object", | |
| "additionalProperties": false, | |
| "properties": { | |
| "cert": { | |
| "type": "string", | |
| "description": "Path to SSL certificate" | |
| }, | |
| "key": { | |
| "type": "string", | |
| "description": "Path to SSL private key" | |
| } | |
| }, | |
| "required": ["cert", "key"] | |
| }, | |
| "server_threads": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "description": "Number of worker threads" | |
| }, | |
| "deployments": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/definitions/deployment" | |
| } | |
| } | |
| }, | |
| "required": ["port", "deployments"], | |
| "definitions": { | |
| "deployment": { | |
| "type": "object", | |
| "additionalProperties": false, | |
| "properties": { | |
| "name": { | |
| "type": "string", | |
| "description": "Deployment name" | |
| }, | |
| "type": { | |
| "type": "string", | |
| "enum": ["service_worker", "proxy", "static"], | |
| "description": "Deployment type" | |
| }, | |
| "mount_path": { | |
| "type": "string", | |
| "description": "URL mount path" | |
| }, | |
| "url": { | |
| "type": "string", | |
| "description": "File path or remote URL" | |
| }, | |
| "origin": { | |
| "type": "string", | |
| "description": "Allowed origin" | |
| }, | |
| "exposed": { | |
| "type": "boolean", | |
| "description": "Whether publicly accessible" | |
| }, | |
| "serve_web_socket": { | |
| "type": "boolean", | |
| "description": "Enable WebSocket handling" | |
| }, | |
| "memory": { | |
| "type": "integer", | |
| "minimum": 5000000, | |
| "description": "Memory allocation in bytes" | |
| }, | |
| "imports": { | |
| "type": "object", | |
| "description": "Import map entries", | |
| "additionalProperties": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "required": ["name", "type", "mount_path"], | |
| "allOf": [ | |
| { | |
| "if": { | |
| "properties": { "type": { "const": "service_worker" } } | |
| }, | |
| "then": { | |
| "required": ["exposed", "memory"] | |
| } | |
| }, | |
| { | |
| "if": { | |
| "properties": { | |
| "type": { | |
| "enum": ["proxy", "static"] | |
| } | |
| } | |
| }, | |
| "then": { | |
| "required": ["url"] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment