-
-
Notifications
You must be signed in to change notification settings - Fork 93
Update JSON schema to include command.variables
#564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -335,6 +335,31 @@ definitions: | |
- ~/config.ini | ||
patternProperties: *custom-properties | ||
additionalProperties: false | ||
variable: | ||
title: variable | ||
description: |- | ||
A global bash variable | ||
https://bashly.dannyb.co/configuration/command/#variables | ||
type: object | ||
required: | ||
- name | ||
properties: | ||
name: | ||
title: name | ||
description: A name for the current variable | ||
type: string | ||
minLength: 1 | ||
examples: | ||
- output_dir | ||
value: | ||
title: value | ||
description: A value for the current variable | ||
examples: | ||
- output_dir | ||
- [development, production] | ||
- { verbosity: 3, debug: true } | ||
patternProperties: *custom-properties | ||
additionalProperties: false | ||
name-property: | ||
title: name | ||
description: |- | ||
|
@@ -435,6 +460,15 @@ definitions: | |
uniqueItems: true | ||
items: | ||
$ref: '#/definitions/environment-variable' | ||
variables-property: | ||
title: variables | ||
description: |- | ||
Bash variables for the current application | ||
https://bashly.dannyb.co/configuration/command/#variables | ||
type: array | ||
uniqueItems: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would also add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have added |
||
items: | ||
$ref: '#/definitions/variable' | ||
examples-property: | ||
title: examples | ||
oneOf: | ||
|
@@ -708,6 +742,8 @@ definitions: | |
$ref: '#/definitions/sub-command-default-property' | ||
environment_variables: | ||
$ref: '#/definitions/environment-variables-property' | ||
variables: | ||
$ref: '#/definitions/variables-property' | ||
examples: | ||
$ref: '#/definitions/examples-property' | ||
footer: | ||
|
@@ -754,6 +790,8 @@ properties: | |
$ref: '#/definitions/root-version-property' | ||
environment_variables: | ||
$ref: '#/definitions/environment-variables-property' | ||
variables: | ||
$ref: '#/definitions/variables-property' | ||
examples: | ||
$ref: '#/definitions/examples-property' | ||
footer: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the variable value is
null
? Is it an error? What it corresponds to in Bash (in the context of Bashly) if it's not?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null
is allowed (it will be null if not provided), and the bash variable definition will simply bevarname=""
.