databricks-cli/libs/jsonschema
shreyas-goenka bdef0f7b23
Add support for conditional prompting in bundle init (#971)
## Changes
This PR introduces the `skip_prompt_if` extension to the jsonschema
library. If the inputs provided by the user match the JSON schema then
the prompt for that property is skipped.

Right now only constant checks are supported, but if in the future more
complicated conditionals are required, this can be extended to support
`allOf`, `oneOf`, `anyOf` etc allowing template authors to specify
conditionals of arbitary complexity.

## Tests
Unit tests and manually.
2023-11-30 16:07:45 +00:00
..
testdata Add support for conditional prompting in bundle init (#971) 2023-11-30 16:07:45 +00:00
extension.go Add support for conditional prompting in bundle init (#971) 2023-11-30 16:07:45 +00:00
instance.go Make to/from string methods private to the jsonschema package (#942) 2023-11-06 15:05:17 +00:00
instance_test.go Fix pattern validation for input properties (#912) 2023-10-24 15:56:54 +00:00
schema.go Add support for conditional prompting in bundle init (#971) 2023-11-30 16:07:45 +00:00
schema_order.go Add support for ordering of input prompts (#662) 2023-09-05 11:08:25 +00:00
schema_order_test.go Add support for ordering of input prompts (#662) 2023-09-05 11:08:25 +00:00
schema_test.go Add support for conditional prompting in bundle init (#971) 2023-11-30 16:07:45 +00:00
utils.go Make to/from string methods private to the jsonschema package (#942) 2023-11-06 15:05:17 +00:00
utils_test.go Make to/from string methods private to the jsonschema package (#942) 2023-11-06 15:05:17 +00:00
validate_type.go Add schema and config validation to jsonschema package (#740) 2023-09-07 14:36:06 +00:00
validate_type_test.go Add schema and config validation to jsonschema package (#740) 2023-09-07 14:36:06 +00:00