{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "App Configuration Schema", "type": "object", "properties": { "type": { "type": "string", "enum": [ "system-app", "micro-app", "gateway-app" ], "$comment": "Type must be either 'system-app' or 'micro-app' or 'gateway-app'." }, "home": { "type": "string", "pattern": "^/.*", "$comment": "https://kevisual.xiongxiao.me" }, "single": { "type": "boolean", "$comment": "是否单例模式,独立启动服务。" }, "port": { "type": "integer", "minimum": 0, "maximum": 65535, "$comment": "开发和单例启动服务的端口" }, "remote": { "type": "object", "properties": { "host": { "type": "string", "format": "hostname" }, "path": { "type": "string", "pattern": "^/.*" } }, "required": [ "host", "path" ], "$comment": "远程服务的地址和路径" }, "micro": { "type": "object", "properties": { "serve": { "type": "object", "properties": { "name": { "type": "string", "pattern": "^[a-z0-9-]+$", "$comment": "服务名称" }, "port": { "type": "integer", "minimum": 0, "maximum": 65535, "$comment": "启动的服务端口" } }, "required": [] }, "remote": { "type": "object", "properties": { "host": { "type": "string", "format": "hostname" }, "port": { "type": "integer", "minimum": 0, "maximum": 65535, "$comment": "链接的远程地址的端口" } }, "required": [ "host", "port" ] } }, "required": [] } }, "required": [ "type" ] }