databricks-cli/bundle/schema
shreyas-goenka 30215860e7
Fix description memoization in bundle schema (#1409)
## Changes
Fixes https://github.com/databricks/cli/issues/559

The CLI generation is now stable and does not produce a diff for the
`bundle_descriptions.json` file.

Before a pointer to the schema was stored in the memo, which would be
mutated later to include the description. This lead to duplicate
documentation for schema components that were used in multiple places.
This PR fixes this issue.

Eg: Before all references of `pause_status` would have the same
description.

## Tests
Added regression test.
2024-05-01 11:04:37 +00:00
..
docs Fix description memoization in bundle schema (#1409) 2024-05-01 11:04:37 +00:00
README.md Move bundle schema update to an internal module (#1012) 2023-12-06 10:45:18 +00:00
docs.go Fix description memoization in bundle schema (#1409) 2024-05-01 11:04:37 +00:00
docs_test.go Add JSON schema validation for input template parameters (#598) 2023-08-01 14:09:27 +00:00
openapi.go Fix description memoization in bundle schema (#1409) 2024-05-01 11:04:37 +00:00
openapi_test.go Fix description memoization in bundle schema (#1409) 2024-05-01 11:04:37 +00:00
schema.go Allow variable references in non-string fields in the JSON schema (#1398) 2024-04-25 11:20:45 +00:00
schema_test.go Allow variable references in non-string fields in the JSON schema (#1398) 2024-04-25 11:20:45 +00:00
tracker.go Use tracker for reference loop tracking (#252) 2023-03-16 12:57:57 +01:00

README.md

Overview

docs/bundle_descriptions.json contains both autogenerated as well as manually written descriptions for the json schema. Specifically

  1. resources : almost all descriptions are autogenerated from the OpenAPI spec
  2. targets : almost all descriptions are copied over from root level entities (eg: bundle, artifacts)
  3. bundle : manually editted
  4. include : manually editted
  5. workspace : manually editted
  6. artifacts : manually editted

These descriptions are rendered in the inline documentation in an IDE

SOP: Add schema descriptions for new fields in bundle config

Manually edit bundle_descriptions.json to add your descriptions. Note that the descriptions in resources block is generated from the OpenAPI spec, and thus any changes there will be overwritten.