summaryrefslogtreecommitdiff
path: root/schemas
diff options
context:
space:
mode:
Diffstat (limited to 'schemas')
-rw-r--r--schemas/config/2.0.schema.json15
-rw-r--r--schemas/config/3.0.schema.json15
-rw-r--r--schemas/readme.md2
3 files changed, 19 insertions, 13 deletions
diff --git a/schemas/config/2.0.schema.json b/schemas/config/2.0.schema.json
index e3cdefee..9971849a 100644
--- a/schemas/config/2.0.schema.json
+++ b/schemas/config/2.0.schema.json
@@ -2232,13 +2232,16 @@
"Duration": {
"description": "Time duration",
"type": "string",
- "pattern": "^[0-9]+[ms]|[s,h]",
+ "pattern": "^([0-9]*(\\.[0-9]*)?(ms|h|m|s))+$",
"examples": [
- "10h",
- "1m",
- "1h",
- "30s",
- "300ms"
+ "1h",
+ "2.5h",
+ "2m",
+ ".2m",
+ "30s",
+ "30.03s",
+ "300ms",
+ "1h3m40s500ms"
]
},
"HostAndPortWithTCP": {
diff --git a/schemas/config/3.0.schema.json b/schemas/config/3.0.schema.json
index 98563373..f65e86cb 100644
--- a/schemas/config/3.0.schema.json
+++ b/schemas/config/3.0.schema.json
@@ -2359,14 +2359,17 @@
"Duration": {
"description": "Time duration",
"type": "string",
- "pattern": "^[0-9]+[ms]|[s,h]",
+ "pattern": "^([0-9]*(\\.[0-9]*)?(ms|h|m|s))+$",
"examples": [
- "10h",
- "1m",
- "1h",
+ "1h",
+ "2.5h",
+ "2m",
+ ".2m",
"30s",
- "300ms"
- ]
+ "30.03s",
+ "300ms",
+ "1h3m40s500ms"
+ ]
},
"HostAndPortWithTCP": {
"description": "Host and port with tcp:// prefix",
diff --git a/schemas/readme.md b/schemas/readme.md
index 534c4a78..65a8de98 100644
--- a/schemas/readme.md
+++ b/schemas/readme.md
@@ -7,7 +7,7 @@ This directory contains public schemas for the most important parts of applicati
- You can validate existing config file using the following command:
```bash
- $ docker run --rm -v "$(pwd):/src" -w "/src" node:14-alpine sh -c \
+docker run --rm -v "$(pwd):/src" -w "/src" node:14-alpine sh -c \
"npm install -g ajv-cli && \
ajv validate --all-errors --verbose \
-s ./schemas/config/3.0.schema.json \