databricks-cli/libs/template
shreyas-goenka 757d5efe8d
Add support for regex patterns in template schema (#768)
## Changes
This PR introduces support for regex pattern validation in our custom
jsonschema validator. This allows us to fail early if a user enters an
invalid value for a field.

For example, now this is what initializing the default template looks
like with an invalid project name:
```
shreyas.goenka@THW32HFW6T bricks % cli bundle init
Template to use [default-python]: 
Unique name for this project [my_project]: (_*_)
Error: invalid value for project_name: (_*_). Must consist of letter and underscores only.
```

## Tests
New unit tests and manually.
2023-09-25 09:53:38 +00:00
..
templates/default-python Add support for regex patterns in template schema (#768) 2023-09-25 09:53:38 +00:00
testdata Add schema and config validation to jsonschema package (#740) 2023-09-07 14:36:06 +00:00
config.go Add support for regex patterns in template schema (#768) 2023-09-25 09:53:38 +00:00
config_test.go Add enum support for bundle templates (#668) 2023-09-08 12:07:22 +00:00
file.go Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
file_test.go Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
helpers.go databricks bundle init template v2: optional stubs, DLT support (#700) 2023-09-06 09:52:31 +00:00
helpers_test.go Add a foundation for built-in templates (#685) 2023-08-25 09:03:42 +00:00
materialize.go Cleanup after "Add a foundation for built-in templates" (#707) 2023-08-30 14:01:08 +00:00
renderer.go Error when unknown keys are encounters during template execution (#766) 2023-09-14 15:53:20 +00:00
renderer_test.go Error when unknown keys are encounters during template execution (#766) 2023-09-14 15:53:20 +00:00