{
    "$schema": "http://json-schema.org/draft-07/schema",
    "definitions": {
        "color": {
            "oneOf": [
                {
                    "type": "string",
                    "examples": [
                        "red",
                        "green",
                        "yellow",
                        "blue",
                        "magenta",
                        "cyan",
                        "bold",
                        "underlined",
                        "red_bold",
                        "green_bold",
                        "yellow_bold",
                        "blue_bold",
                        "magenta_bold",
                        "cyan_bold",
                        "red_underlined",
                        "green_underlined",
                        "yellow_underlined",
                        "blue_underlined",
                        "magenta_underlined",
                        "cyan_underlined"
                    ]
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "title": "settings",
    "description": "Settings of the current application\nhttps://bashly.dannyb.co/usage/settings/#settings",
    "type": "object",
    "properties": {
        "source_dir": {
            "title": "source dir",
            "description": "A directory with source files of the current script\nhttps://bashly.dannyb.co/usage/settings/#source_dir",
            "type": "string",
            "minLength": 1,
            "default": "src"
        },
        "config_path": {
            "title": "config path",
            "description": "A path to bashly.yml of the current script\nhttps://bashly.dannyb.co/usage/settings/#config_path",
            "type": "string",
            "minLength": 1,
            "default": "%{source_dir}/bashly.yml"
        },
        "target_dir": {
            "title": "target dir",
            "description": "A directory of the current script\nhttps://bashly.dannyb.co/usage/settings/#target_dir",
            "type": "string",
            "minLength": 1,
            "default": "."
        },
        "lib_dir": {
            "title": "lib dir",
            "description": "A directory to common library files of the current script\nhttps://bashly.dannyb.co/usage/settings/#lib_dir",
            "type": "string",
            "minLength": 1,
            "default": "lib"
        },
        "commands_dir": {
            "title": "commands dir",
            "description": "A directory to nested command files of the current script\nhttps://bashly.dannyb.co/usage/settings/#commands_dir",
            "oneOf": [
                {
                    "type": "string",
                    "minLength": 1
                },
                {
                    "type": "null"
                }
            ]
        },
        "strict": {
            "title": "strict",
            "description": "Bash initialiation options of the current script\nhttps://bashly.dannyb.co/usage/settings/#strict",
            "oneOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "string",
                    "examples": [
                        "set -o pipefail"
                    ]
                }
            ],
            "default": false
        },
        "tab_indent": {
            "title": "tab indent",
            "description": "Whether to use tabs in the the current script\nhttps://bashly.dannyb.co/usage/settings/#tab_indent",
            "type": "boolean",
            "default": false
        },
        "compact_short_flags": {
            "title": "compact short flags",
            "description": "Whether to expand short flags of the current script\nhttps://bashly.dannyb.co/usage/settings/#compact_short_flags",
            "type": "boolean",
            "default": true
        },
        "env": {
            "title": "env",
            "description": "Whether to include development related comments in the current script\nhttps://bashly.dannyb.co/usage/settings/#env",
            "type": "string",
            "enum": [
                "development",
                "production"
            ],
            "default": "development"
        },
        "partials_extension": {
            "title": "partials extension",
            "description": "A partial snippet extension of the current script\nhttps://bashly.dannyb.co/usage/settings/#partials_extension",
            "type": "string",
            "minLength": 1,
            "default": "sh"
        },
        "usage_colors": {
            "title": "usage colors",
            "description": "Usage colors of the current script\nhttps://bashly.dannyb.co/usage/settings/#usage_colors",
            "type": "object",
            "properties": {
                "caption": {
                    "title": "caption",
                    "description": "A caption color of the current script\nhttps://bashly.dannyb.co/usage/settings/#usage_colors",
                    "$ref": "#/definitions/color"
                },
                "command": {
                    "title": "command",
                    "description": "A command color of the current script\nhttps://bashly.dannyb.co/usage/settings/#usage_colors",
                    "$ref": "#/definitions/color"
                },
                "arg": {
                    "title": "arg",
                    "description": "An argument color of the current script\nhttps://bashly.dannyb.co/usage/settings/#usage_colors",
                    "$ref": "#/definitions/color"
                },
                "flag": {
                    "title": "flag",
                    "description": "A flag color of the current script\nhttps://bashly.dannyb.co/usage/settings/#usage_colors",
                    "$ref": "#/definitions/color"
                },
                "environment_variable": {
                    "title": "environment variable",
                    "description": "An environment variable color of the current script\nhttps://bashly.dannyb.co/usage/settings/#usage_colors",
                    "$ref": "#/definitions/color"
                }
            },
            "additionalProperties": false
        }
    },
    "additionalProperties": false
}