mirror of https://github.com/databricks/cli.git
18a216bf97
This PR: 1. Adds autogeneration of descriptions for `resources` field 2. Autogenerates empty descriptions for any properties in DABs 3. Defines SOPs for how to refresh these descriptions 4. Adds command to generate this documentation 5. Adds Automatically copy any descriptions over to `environments` property Basically it provides a framework for adding descriptions to the generated JSON schema Tested manually and using unit tests |
||
---|---|---|
.. | ||
docs | ||
README.md | ||
docs.go | ||
docs_test.go | ||
openapi.go | ||
openapi_test.go | ||
schema.go | ||
schema_test.go | ||
tracker.go |
README.md
Overview
docs/bundle_descriptions.json
contains both autogenerated as well as manually written
descriptions for the json schema. Specifically
resources
: almost all descriptions are autogenerated from the OpenAPI specenvironments
: almost all descriptions are copied over from root level entities (eg:bundle
,artifacts
)bundle
: manually edittedinclude
: manually edittedworkspace
: manually edittedartifacts
: manually editted
These descriptions are rendered in the inline documentation in an IDE
SOP: Add schema descriptions for new fields in bundle config
- You can autogenerate empty descriptions for the new fields by running
bricks bundle schema --only-docs > ~/bricks/bundle/schema/docs/bundle_descriptions.json
- Manually edit bundle_descriptions.json to add your descriptions
- Again run
bricks bundle schema --only-docs > ~/bricks/bundle/schema/docs/bundle_descriptions.json
to copy over any applicable descriptions toenvironments
- push to repo
SOP: Update descriptions in resources from a newer openapi spec
- Run
bricks bundle schema --only-docs --openapi PATH_TO_SPEC > ~/bricks/bundle/schema/docs/bundle_descriptions.json
- push to repo