Skip to content

Commit a1ebdcc

Browse files
committed
update json schemas with new environment variable validation
1 parent bccd3b0 commit a1ebdcc

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

schemas/bashly.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,17 @@
334334
"type": "boolean",
335335
"default": true
336336
},
337+
"validate": {
338+
"title": "validate",
339+
"description": "A validation function for the current environment variable\nhttps://bashly.dannyb.co/configuration/environment-variable/#validate",
340+
"type": "string",
341+
"examples": [
342+
"file_exists",
343+
"dir_exists",
344+
"integer",
345+
"non_empty"
346+
]
347+
},
337348
"allowed": {
338349
"title": "allowed",
339350
"description": "Valid values of the current environment variable\nhttps://bashly.dannyb.co/configuration/environment-variable/#allowed",

schemas/strings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,13 @@
241241
"type": "string",
242242
"minLength": 1,
243243
"default": "validation error in %s:\\n%s"
244+
},
245+
"environment_variable_validation_error": {
246+
"title": "validation error",
247+
"description": "The error message template for failed custom validation for environment variables\nhttps://bashly.dannyb.co/advanced/strings/#custom-strings",
248+
"type": "string",
249+
"minLength": 1,
250+
"default": "validation error in environment variable %s:\\n%s"
244251
}
245252
},
246253
"additionalProperties": false

support/schema/bashly.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,17 @@ definitions:
300300
https://bashly.dannyb.co/configuration/environment-variable/#required
301301
type: boolean
302302
default: true
303+
validate:
304+
title: validate
305+
description: |-
306+
A validation function for the current environment variable
307+
https://bashly.dannyb.co/configuration/environment-variable/#validate
308+
type: string
309+
examples:
310+
- file_exists
311+
- dir_exists
312+
- integer
313+
- non_empty
303314
allowed:
304315
title: allowed
305316
description: |-

0 commit comments

Comments
 (0)