2023-09-05 11:08:25 +00:00
|
|
|
package jsonschema
|
|
|
|
|
|
|
|
// Extension defines our custom JSON schema extensions.
|
|
|
|
//
|
|
|
|
// JSON schema supports custom extensions through vocabularies:
|
|
|
|
// https://json-schema.org/understanding-json-schema/reference/schema.html#vocabularies.
|
|
|
|
// We don't (yet?) define a meta-schema for the extensions below.
|
|
|
|
// It's not a big issue because the reach/scope of these extensions is limited.
|
|
|
|
type Extension struct {
|
|
|
|
// Order defines the order of a field with respect to other fields.
|
|
|
|
// If not defined, the field is ordered alphabetically after all fields
|
|
|
|
// that do have an order defined.
|
|
|
|
Order *int `json:"order,omitempty"`
|
2023-09-25 09:53:38 +00:00
|
|
|
|
2023-10-25 12:27:25 +00:00
|
|
|
// Welcome message to print before prompting the user for input
|
|
|
|
WelcomeMessage string `json:"welcome_message,omitempty"`
|
|
|
|
|
2023-10-19 07:08:36 +00:00
|
|
|
// The message to print after the template is successfully initalized
|
|
|
|
SuccessMessage string `json:"success_message,omitempty"`
|
|
|
|
|
2023-09-25 09:53:38 +00:00
|
|
|
// PatternMatchFailureMessage is a user defined message that is displayed to the
|
|
|
|
// user if a JSON schema pattern match fails.
|
|
|
|
PatternMatchFailureMessage string `json:"pattern_match_failure_message,omitempty"`
|
2023-10-19 14:01:48 +00:00
|
|
|
|
|
|
|
// Set the minimum semver version of this CLI to validate when loading this schema.
|
|
|
|
// If the CLI version is less than this value, then validation for this
|
|
|
|
// schema will fail.
|
|
|
|
MinDatabricksCliVersion string `json:"min_databricks_cli_version,omitempty"`
|
2023-11-30 14:28:51 +00:00
|
|
|
|
2023-11-30 16:07:45 +00:00
|
|
|
// Skip prompting if this schema is satisfied by the configuration already present. In
|
|
|
|
// that case the default value of the property is used instead.
|
|
|
|
SkipPromptIf *Schema `json:"skip_prompt_if,omitempty"`
|
|
|
|
|
2023-11-30 14:28:51 +00:00
|
|
|
// Version of the schema. This is used to determine if the schema is
|
|
|
|
// compatible with the current CLI version.
|
|
|
|
Version *int `json:"version,omitempty"`
|
2023-09-05 11:08:25 +00:00
|
|
|
}
|