从@abearxiong/config拷贝过来
This commit is contained in:
87
config/app-schema.json
Normal file
87
config/app-schema.json
Normal file
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "App Configuration Schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"inline-app",
|
||||
"micro-app"
|
||||
],
|
||||
"$comment": "Type must be either 'inline-app' or 'micro-app'"
|
||||
},
|
||||
"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"
|
||||
]
|
||||
},
|
||||
"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"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user