Files
codex/bazel/schema/tools/BUILD.bazel
T
Dmitriy Kovalenko bc13ff239c Add Bazel targets for on-demand schemas and Python SDK generation (#54096)
## What changed

- Add `//bazel/schema:app-server` to generate stable and experimental schemas from Rust sources without depending on committed precomputed bundles.
- Add `//sdk/python:generated` to generate Python SDK models, the notification registry, and API methods from the stable schema in scratch space, using dependencies from `uv.lock`.
- Add `generate-types --no-format` to skip formatters for build outputs while preserving formatting by default.

## Testing

Extend contract generation tests to regenerate in a temporary SDK copy, checking byte equality for formatted output and AST equality for unformatted output.

GitOrigin-RevId: 9ca7daa8ac0a33c4106a9e95c2f48bbded07df21
2026-10-14 20:59:31 +00:00

17 lines
428 B
Python

load("@rules_python//python:defs.bzl", "py_binary")
load("@schema_python//:requirements.bzl", "requirement")
package(default_visibility = ["//visibility:public"])
py_binary(
name = "python-codegen",
srcs = ["python_codegen.py"],
main = "python_codegen.py",
python_version = "3.12",
tags = ["manual"],
deps = [
requirement("datamodel-code-generator"),
requirement("packaging"),
],
)