From 87ba603fc3606ba802ded97330bd9712c6acdbf7 Mon Sep 17 00:00:00 2001 From: James Lal Date: Fri, 25 Sep 2026 13:44:55 -0600 Subject: [PATCH] chore(release): prepare 0.18.0 --- CHANGELOG.md | 18 +++++++++++++++++- Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da76eac4..9e2df6b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,19 @@ when correcting output that was wrong or incomplete on the wire. ## [Unreleased] +## [0.18.0] - 2026-09-25 + +### Breaking changes + +#### Generated Rust API + +- Properties with nullable `anyOf` branches, or a `oneOf` with exactly one + nullable branch, now preserve that nullability in generated Rust types. A + required field may change from `T` to `Option`; an optional field may + change from `Option` to `Option>` so missing and explicit `null` + remain distinct. Regenerate clients and update affected constructors and + field access. + ### Fixed - Generated union deserializers no longer reject a branch whose re-encoding @@ -14,6 +27,8 @@ when correcting output that was wrong or incomplete on the wire. optional field that is skipped on output. Exact matches still take precedence, so values that decoded before keep their branch. This unblocks every record of the Cloudflare DNS API. +- Required nullable union properties now accept an explicit JSON `null`, + including Cloudflare responses with a nullable `result` field. ## [0.17.0] - 2026-09-14 @@ -721,7 +736,8 @@ would have passed any amount of spec-diffing. signed enum values, recursive unions, parameter collisions, optional request bodies, range response codes, and path-segment encoding. -[Unreleased]: https://github.com/gpu-cli/openapi-to-rust/compare/v0.17.0...HEAD +[Unreleased]: https://github.com/gpu-cli/openapi-to-rust/compare/v0.18.0...HEAD +[0.18.0]: https://github.com/gpu-cli/openapi-to-rust/compare/v0.17.0...v0.18.0 [0.17.0]: https://github.com/gpu-cli/openapi-to-rust/compare/v0.16.0...v0.17.0 [0.16.0]: https://github.com/gpu-cli/openapi-to-rust/compare/v0.15.0...v0.16.0 [0.15.0]: https://github.com/gpu-cli/openapi-to-rust/compare/v0.14.0...v0.15.0 diff --git a/Cargo.lock b/Cargo.lock index 9f6851bb..139aaa2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1122,7 +1122,7 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "openapi-to-rust" -version = "0.17.0" +version = "0.18.0" dependencies = [ "clap", "heck", diff --git a/Cargo.toml b/Cargo.toml index a1fb7595..a0939736 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ exclude = ["tmp"] [package] name = "openapi-to-rust" -version = "0.17.0" +version = "0.18.0" edition = "2024" rust-version = "1.88.0" autobins = false