summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2023-11-08 09:09:21 +0100
committerGitHub <[email protected]>2023-11-08 09:09:21 +0100
commit7fc0430e8b38b9b3d205c1e8685f1723da18ccf3 (patch)
treecfef0df9e1ab8562bb9980ebf98c5d5ef817cee4
parentfce8455997e7b7f7b1ffe59175cb9d891d2202e3 (diff)
parenta694b834baee8367cfc1d7e448a10af7dcded55f (diff)
[#1768]: allow using env variable in schema properties
-rw-r--r--schemas/config/2.0.schema.json12
-rw-r--r--schemas/config/3.0.schema.json12
2 files changed, 16 insertions, 8 deletions
diff --git a/schemas/config/2.0.schema.json b/schemas/config/2.0.schema.json
index 55c46823..e3cdefee 100644
--- a/schemas/config/2.0.schema.json
+++ b/schemas/config/2.0.schema.json
@@ -2244,18 +2244,22 @@
"HostAndPortWithTCP": {
"description": "Host and port with tcp:// prefix",
"type": "string",
- "pattern": "^(tcp://[0-9a-zA-Z_.-]+|):[0-9]{1,5}$",
+ "pattern": "^(((tcp://[0-9a-zA-Z_.-]+|)|\\$\\{([^}]+)\\}):([0-9]{1,5}||\\$\\{([^}]+)\\}))|\\$\\{([^}]+)\\}$",
"examples": [
- "tcp://127.0.0.1:443"
+ "tcp://127.0.0.1:443",
+ "${TCP:-tcp://127.0.0.1:443}",
+ "tcp://127.0.0.1:${TCP_PORT}"
]
},
"HostAndPort": {
"description": "Host and port",
"type": "string",
- "pattern": "^([0-9a-zA-Z_.-]+|):[0-9]{1,5}$",
+ "pattern": "^((([0-9a-zA-Z_.-]+|)|\\$\\{([^}]+)\\}):([0-9]{1,5})|\\$\\{([^}]+)\\})|\\$\\{([^}]+)\\}$",
"examples": [
"127.0.0.1:443",
- ":8080"
+ ":8080",
+ "0.0.0.0:${HTTP_PORT:-8080}",
+ "${HTTP_HOST:-127.0.0.1:8000}"
]
},
"LogMode": {
diff --git a/schemas/config/3.0.schema.json b/schemas/config/3.0.schema.json
index d008b8da..0d62a6f1 100644
--- a/schemas/config/3.0.schema.json
+++ b/schemas/config/3.0.schema.json
@@ -2362,18 +2362,22 @@
"HostAndPortWithTCP": {
"description": "Host and port with tcp:// prefix",
"type": "string",
- "pattern": "^(tcp://[0-9a-zA-Z_.-]+|):[0-9]{1,5}$",
+ "pattern": "^(((tcp://[0-9a-zA-Z_.-]+|)|\\$\\{([^}]+)\\}):([0-9]{1,5}||\\$\\{([^}]+)\\}))|\\$\\{([^}]+)\\}$",
"examples": [
- "tcp://127.0.0.1:443"
+ "tcp://127.0.0.1:443",
+ "${TCP:-tcp://127.0.0.1:443}",
+ "tcp://127.0.0.1:${TCP_PORT}"
]
},
"HostAndPort": {
"description": "Host and port",
"type": "string",
- "pattern": "^([0-9a-zA-Z_.-]+|):[0-9]{1,5}$",
+ "pattern": "^((([0-9a-zA-Z_.-]+|)|\\$\\{([^}]+)\\}):([0-9]{1,5})|\\$\\{([^}]+)\\})|\\$\\{([^}]+)\\}$",
"examples": [
"127.0.0.1:443",
- ":8080"
+ ":8080",
+ "0.0.0.0:${HTTP_PORT:-8080}",
+ "${HTTP_HOST:-127.0.0.1:8000}"
]
},
"LogMode": {