Skip to content

Commit f79f5b0

Browse files
Simplify bundle JSON schema annotation system
Read OpenAPI descriptions directly from the spec at runtime instead of pre-extracting them into annotation YAML files. This makes the OpenAPI spec a requirement for schema generation and eliminates annotation files that flip-flopped on every SDK bump. Changes: - Remove annotations_openapi.yml and annotations_openapi_overrides.yml - Merge manual overrides into a single annotations.yml - Use bundle paths (e.g. resources.jobs.*) as annotation keys instead of Go type paths - Add path_mapping.go to resolve bundle paths to Go types via reflection - Remove bundle/docsgen (was the only other consumer of annotations) - Makefile schema targets now require DATABRICKS_OPENAPI_SPEC Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6357294 commit f79f5b0

24 files changed

+1184
-20015
lines changed

Makefile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,11 @@ snapshot:
130130
snapshot-release:
131131
goreleaser release --clean --skip docker --snapshot
132132

133-
schema:
134-
go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json
133+
schema: .codegen/openapi.json
134+
DATABRICKS_OPENAPI_SPEC=.codegen/openapi.json go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json
135135

136-
schema-for-docs:
137-
go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema_for_docs.json --docs
138-
139-
docs:
140-
go run ./bundle/docsgen ./bundle/internal/schema ./bundle/docsgen
136+
schema-for-docs: .codegen/openapi.json
137+
DATABRICKS_OPENAPI_SPEC=.codegen/openapi.json go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema_for_docs.json --docs
141138

142139
INTEGRATION = go run -modfile=tools/go.mod ./tools/testrunner/main.go ${GO_TOOL} gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./acceptance ./integration/..." -- -parallel 4 -timeout=2h
143140

@@ -202,7 +199,7 @@ bundle/direct/dresources/apitypes.generated.yml: ./bundle/direct/tools/generate_
202199
bundle/direct/dresources/resources.generated.yml: ./bundle/direct/tools/generate_resources.py .codegen/openapi.json bundle/direct/dresources/apitypes.generated.yml bundle/direct/dresources/apitypes.yml acceptance/bundle/refschema/out.fields.txt
203200
python3 $^ > $@
204201

205-
.PHONY: lint lintfull tidy lintcheck fmt fmtfull test test-unit test-acc test-slow test-slow-unit test-slow-acc cover showcover build snapshot snapshot-release schema schema-for-docs integration integration-short acc-cover acc-showcover docs ws wsfix links checks test-update test-update-templates generate-out-test-toml test-update-aws test-update-all generate-validation
202+
.PHONY: lint lintfull tidy lintcheck fmt fmtfull test test-unit test-acc test-slow test-slow-unit test-slow-acc cover showcover build snapshot snapshot-release schema schema-for-docs integration integration-short acc-cover acc-showcover ws wsfix links checks test-update test-update-templates generate-out-test-toml test-update-aws test-update-all generate-validation
206203

207204
test-exp-aitools:
208205
make test TEST_PACKAGES="./experimental/aitools/..." ACCEPTANCE_TEST_FILTER="TestAccept/apps"

bundle/docsgen/README.md

Lines changed: 0 additions & 79 deletions
This file was deleted.

bundle/docsgen/main.go

Lines changed: 0 additions & 152 deletions
This file was deleted.

bundle/docsgen/markdown.go

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)