From 4a8ec19e1405013a10987db92816cff9595ba74a Mon Sep 17 00:00:00 2001 From: Brian Thorne Date: Thu, 11 Jun 2026 15:01:38 +1200 Subject: [PATCH] chore: release 0.17.6 Bump all workspace crates and the Python runtime to 0.17.6 and promote the Unreleased CHANGELOG section. Includes the #[reflectapi(hidden)] field attribute (#168), the Python codegen fix for nullable Option fields in flattened tagged-enum variant models (#170, fixes #167), and the Python submodule import ordering fix (#165). --- CHANGELOG.md | 5 ++++- Cargo.lock | 8 ++++---- reflectapi-cli/Cargo.toml | 4 ++-- reflectapi-derive/Cargo.toml | 4 ++-- reflectapi-python-runtime/pyproject.toml | 2 +- .../src/reflectapi_runtime/__init__.py | 2 +- reflectapi-schema/Cargo.toml | 2 +- reflectapi/Cargo.toml | 6 +++--- 8 files changed, 18 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 009172b9..37453699 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ # Changelog -## Unreleased +## 0.17.6 +- New `#[reflectapi(hidden)]` field attribute: the field stays in the schema (marked `"hidden": true`) and remains functional at runtime (e.g. header extraction by the axum adapter), but is excluded from generated clients, documentation, and OpenAPI specs. Not allowed on unnamed (tuple) fields, since removing a positional element would shift indices and break wire compatibility. +- Python codegen now emits nullable `Option` fields as optional keys (`T | None = None`) in the per-variant models generated for structs with a flattened internally-tagged enum, matching the standalone-struct behavior. Previously such fields were required keys, so deserializing a valid payload that omitted the key (serde drops `None` values) raised `pydantic.ValidationError: Field required`. Doubled `str | None | None` annotations in the same paths are also fixed. +- Python codegen is now snapshot-tested by the same builder test samples as the other language backends. - Python package codegen now emits sibling submodule imports in dependency order, so Python 3.14/Pydantic can import generated packages where one sibling model annotation references another sibling namespace. - Rust codegen snapshot typechecking now handles macOS proc-macro library names instead of assuming Linux-style `.so` files. diff --git a/Cargo.lock b/Cargo.lock index f1776beb..ab007d9c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1692,7 +1692,7 @@ dependencies = [ [[package]] name = "reflectapi" -version = "0.17.5" +version = "0.17.6" dependencies = [ "anyhow", "axum", @@ -1721,7 +1721,7 @@ dependencies = [ [[package]] name = "reflectapi-cli" -version = "0.17.5" +version = "0.17.6" dependencies = [ "anyhow", "clap", @@ -1785,7 +1785,7 @@ dependencies = [ [[package]] name = "reflectapi-derive" -version = "0.17.5" +version = "0.17.6" dependencies = [ "proc-macro-error", "proc-macro2", @@ -1797,7 +1797,7 @@ dependencies = [ [[package]] name = "reflectapi-schema" -version = "0.17.5" +version = "0.17.6" dependencies = [ "glob", "serde", diff --git a/reflectapi-cli/Cargo.toml b/reflectapi-cli/Cargo.toml index 1883bf56..6707d0f3 100644 --- a/reflectapi-cli/Cargo.toml +++ b/reflectapi-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reflectapi-cli" -version = "0.17.5" +version = "0.17.6" edition = "2021" default-run = "reflectapi" @@ -23,7 +23,7 @@ doc = false workspace = true [dependencies] -reflectapi = { path = "../reflectapi", version = "0.17.5", features = ["codegen"] } +reflectapi = { path = "../reflectapi", version = "0.17.6", features = ["codegen"] } rouille = "3" clap = { version = "4.5.3", features = ["derive"] } diff --git a/reflectapi-derive/Cargo.toml b/reflectapi-derive/Cargo.toml index 272ee13b..9a4289fc 100644 --- a/reflectapi-derive/Cargo.toml +++ b/reflectapi-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reflectapi-derive" -version = "0.17.5" +version = "0.17.6" edition = "2021" license = "Apache-2.0" @@ -22,7 +22,7 @@ workspace = true proc-macro = true [dependencies] -reflectapi-schema = { path = '../reflectapi-schema', version = "0.17.5" } +reflectapi-schema = { path = '../reflectapi-schema', version = "0.17.6" } proc-macro2 = "1.0" quote = "1.0" diff --git a/reflectapi-python-runtime/pyproject.toml b/reflectapi-python-runtime/pyproject.toml index 262c8576..29dfa5aa 100644 --- a/reflectapi-python-runtime/pyproject.toml +++ b/reflectapi-python-runtime/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "reflectapi-runtime" -version = "0.17.5" +version = "0.17.6" description = "Runtime library for ReflectAPI Python clients" readme = "README.md" requires-python = ">=3.12" diff --git a/reflectapi-python-runtime/src/reflectapi_runtime/__init__.py b/reflectapi-python-runtime/src/reflectapi_runtime/__init__.py index 6cc0ba78..8c50bac0 100644 --- a/reflectapi-python-runtime/src/reflectapi_runtime/__init__.py +++ b/reflectapi-python-runtime/src/reflectapi_runtime/__init__.py @@ -50,7 +50,7 @@ ) from .types import BatchResult, ReflectapiEmpty, ReflectapiInfallible -__version__ = "0.17.5" +__version__ = "0.17.6" __all__ = [ # Authentication diff --git a/reflectapi-schema/Cargo.toml b/reflectapi-schema/Cargo.toml index 8843ed4e..25627671 100644 --- a/reflectapi-schema/Cargo.toml +++ b/reflectapi-schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reflectapi-schema" -version = "0.17.5" +version = "0.17.6" edition = "2021" license = "Apache-2.0" diff --git a/reflectapi/Cargo.toml b/reflectapi/Cargo.toml index 6cdb2572..0fc3ae4c 100644 --- a/reflectapi/Cargo.toml +++ b/reflectapi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reflectapi" -version = "0.17.5" +version = "0.17.6" edition = "2021" license = "Apache-2.0" @@ -20,8 +20,8 @@ workspace = true [dependencies] # workspace dependencies -reflectapi-derive = { path = "../reflectapi-derive", version = "0.17.5" } -reflectapi-schema = { path = "../reflectapi-schema", version = "0.17.5" } +reflectapi-derive = { path = "../reflectapi-derive", version = "0.17.6" } +reflectapi-schema = { path = "../reflectapi-schema", version = "0.17.6" } # mandatory 3rd party dependencies serde = { version = "1.0.197", features = ["derive"] }