Skip to content
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

Add docs for Schema Aliasing in .configu Configuration File #75

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions content/CLI/cli-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ Example `.configu` file in JSON format:
}
}
},
"schemas": {
"common": "path/to/common.cfgu.json",
"api": "path/to/api.cfgu.json"
},
"scripts": {
"script1": "configu command1 --option1 value1",
"script2": "configu command2 --option2 value2 | configu command3"
Expand All @@ -58,6 +62,9 @@ stores:
configuration:
option3: value3
option4: value4
schemas:
common: 'path/to/common.cfgu.json'
api: 'path/to/api.cfgu.json'
scripts:
script1: 'configu command1 --option1 value1'
script2: 'configu command2 --option2 value2 | configu command3'
Expand Down Expand Up @@ -85,6 +92,10 @@ module.exports = {
},
},
},
schemas: {
common: "path/to/common.cfgu.json",
api: "path/to/api.cfgu.json"
},
scripts: {
script1: 'configu command1 --option1 value1',
script2: 'configu command2 --option2 value2 | configu command3',
Expand All @@ -102,6 +113,14 @@ To define a custom store, add a new key-value pair to the `stores` section of th

For detailed information about the available store options, please refer to the relevant store on the [`ConfigStore`](/config-store) page.

### Schemas

The `.configu` file allows you to save paths to `*.cfgu.json` schema files as friendly names, which can be later used as values for the `--schema` flag in all the commands.

To define a custom schema, add a new key-value pair to the `schemas` section of the `.configu` file, where the key represents the friendly name, and the value is a string containing the relative or absolute path to the schema file.

For detailed information about schema files, please refer to [`ConfigSchema`](/config-schema) page.

### Scripts

The `.configu` file allows you to save `Configu CLI` snippets as friendly names, which can be later used as values for the `--script` flag in the `configu run --script <label>` command.
Expand Down