# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.17.2](https://github.com/ngergs/optionable/compare/optionable-v0.16.1...optionable-v0.17.2) - 2026-06-19
### Fixed
- rm spurious Cargo.toml (broke release)
- publish v0.17.1 due to broken release (missing files at crates.io)
- [**breaking**] merge the kube3 and kube4 modules for the `ExtractManagedFields` sealed helper trait
### Other
- *(optionable)* release v0.17.1
- release
- release
## [0.17.1](https://github.com/ngergs/optionable/compare/optionable-v0.17.0...optionable-v0.17.1) - 2026-06-19
### Fixed
- publish v0.17.1 due to broken release (missing files at crates.io)
## [0.17.0](https://github.com/ngergs/optionable/compare/optionable-v0.16.1...optionable-v0.17.0) - 2026-06-19
### Fixed
- [**breaking**] merge the kube3 and kube4 modules for the `ExtractManagedFields` sealed helper trait
### Other
- release
## [0.16.1](https://github.com/ngergs/optionable/compare/optionable-v0.16.0...optionable-v0.16.1) - 2026-06-17
### Added
- kube v4 support
- add support vor k8s_openapi v0.28.x
### Fixed
- dependency updates
### Other
- adjust testscripts for kube4/k8s-openapi028
- run codegen
- prepare release
- run codegen
## [0.16.0](https://github.com/ngergs/optionable/compare/optionable-v0.15.1...optionable-v0.16.0) - 2026-05-14
### Fixed
- [**breaking**] preserve `metadata.resourceVersion` in the `kube3::ExtractManagedFields` helper trait
## [0.15.1](https://github.com/ngergs/optionable/compare/optionable-v0.15.0...optionable-v0.15.1) - 2026-05-04
### Fixed
- skip required fields during serializing if they are `Option::None`
### Other
- regenerate k8s-openapi optioned types
- comment formulation
## [0.15.0](https://github.com/ngergs/optionable/compare/optionable-v0.14.0...optionable-v0.15.0) - 2026-05-03
Adds implementations of [k8s-openapi::DeepMerge](https://docs.rs/k8s-openapi/latest/k8s_openapi/trait.DeepMerge.html) for all generated optioned variannts.
### Breaking changes
All breaking changes only affect the derived Kubernetes part.
#### Changing merge behavior
We now parse the [kubernetes upstream openapi v3 spec](https://github.com/kubernetes/kubernetes/tree/master/api/openapi-spec/v3) to determine accurate merge behavior.
Therefore compares to our old (wrong) implementation some merge beavior have changed.
#### Adjust `extract`-behavior
The [extract](https://docs.rs/optionable/latest/optionable/kube3/trait.ExtractManagedFields.html) helper trait has it's function signature changed from:
```rust
fn extract(self, field_manager: &str) -> Result<Option<Self::Optioned>, Error>
```
to
```rust
fn extract(self, field_manager: &str, subresource: Option<&str>) -> Result<Option<Self::Optioned>, Error>
```
This reflect the Kubernetes beavior to [track field ownership](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#System) per combination of
field-manager and subresource. So the old behavior (extracing field ownership for the main resource) corresponds to putting
the `subresource` argument to `None`.
## [0.14.0](https://github.com/ngergs/optionable/compare/optionable-v0.13.6...optionable-v0.14.0) - 2026-04-14
Adds implementation of the upstream [Kubernetes server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) merge logic
following the upstream OpenAPI v3 specifications.
This means that for `OptionableConvert::merge` now e.g. the environment variables of a container are threated as an effective map
with the `name` field as key, see e.g. this unit test [here](https://github.com/ngergs/optionable/blob/ad0a6c58ae3a2658de8d6ac1f33befb69a68664f/optionable/src/k8s_openapi027/merge_test.rs).
### Breaking changes
The breaking changes only affect the `OptionableConvert::merge` logic which is the main change of this release.
#### Merge already `Option` fields
The previous merge logic was inconsistent and did overwrite a `Some(...)` with a `None` from the optioned type if the respective
field type on the original struct was already an `Option`.
Now the `Some(...)` is preserved and only overwritten/merged with the content of another `Some(...)` on the optioned type.
#### Kubernetes server-side apply merge style logic
The generated `OptionableConvert::merge` implementations for `k8s-openapi` now follows the mentioned Kubernetes server-side apply
merge style logic as specified in the Kubernetes OpenAPIv3 upstream specification. This is of course a breaking change compared
to the previous behavior (but the new one is more correct).
### Added
- derive macro for `OptionableMapKeysEq` (and rename of that trait)
- add OptionedConvert for remaining provided OptionableConvert impls
- implement `OptionedConvert` for stdlib vec types
- `OptionedConvert` for self-resolving stdlib/core types
- helper function for set and map list merges
### Fixed
- dependency updates
- move `map_key` derive logic into `Optionable` derive macro
- don't require OptionedConvert (just OptionableConvert) for merge functions
- tests for custom merge behaviour + bugfixes
- regenerate k8s-openapi files
### Other
- regenerate k8s-openapi (added atomic merge behavior for map acoording to upstream openapi spec)
- rename merge options
- test adjustment
- regenerate k8s openapi (fixed merge impl)
- regenerate k8s-openapi (adjusted merge impls)
- test adjustments
- regenerate k8s-openapi
- regenerate k8s openapi (custom merge behaviour)
- set merge type for k8s openapi
- regenerate k8s-openapi impl (add OptionableMapKeysEq impl where types are used with `map` style merging)
- rename integration tests
- cleanup
- error docs
- adjust codegen to support various merge_type behaviors (logic still missing)
- readme
- adjust kube3 test
- [**breaking**] regenerate k8s-openapi with required keys for lists with map type merging
- add kubernetes openapi parsing to k8s-openapi codegen (not utilized yet)
- regenerate k8s-openapi
- regenerate k8s-openapi
## [0.13.6](https://github.com/ngergs/optionable/compare/optionable-v0.13.5...optionable-v0.13.6) - 2026-03-24
### Added
- implement Optionable and OptionableConvert for [T;N] without alloc/std dependency
### Fixed
- merge existing entries for maps
- avoid allocation for merge of owned cow
### Other
- clippy
## [0.13.5](https://github.com/ngergs/optionable/compare/optionable-v0.13.4...optionable-v0.13.5) - 2026-03-21
### Fixed
- ExtractManagedFields should filter metadata to minimum entries if not explicitly managed by the respective field manager
- dependency updates
- ExtractManagedFields should error on unsupported field manager entries
## [0.13.4](https://github.com/ngergs/optionable/compare/optionable-v0.13.3...optionable-v0.13.4) - 2026-03-21
### Added
- cover whole managed fields spec for `kube3:ExtractManagedFields`
### Fixed
- dependency updates
## [0.13.3](https://github.com/ngergs/optionable/compare/optionable-v0.13.2...optionable-v0.13.3) - 2026-03-19
### Fixed
- kube3:ExtractManagedFields did delete and retain map fields
### Other
- cargo fmt
## [0.13.2](https://github.com/ngergs/optionable/compare/optionable-v0.13.1...optionable-v0.13.2) - 2026-03-08
### Fixed
- dependency updates
### Other
- k8s-openapi v0.27.1 (no changes for us)
## [0.13.1](https://github.com/ngergs/optionable/compare/optionable-v0.13.0...optionable-v0.13.1) - 2026-01-15
### Other
- docs link update
## [0.13.0](https://github.com/ngergs/optionable/compare/optionable-v0.12.1...optionable-v0.13.0) - 2026-01-14
### Added
- [**breaking**] drop k8s-openapi v0.26 support
- use kube3 as feature and package path identifier for the kube v3 support
- [**breaking**] rework kube derive tooling
### Fixed
- dependency updates
- [**breaking**] remove k8s-openapi version from package path
### Other
- clippy and docs.rs adjustment
- adjust test setup for kube
- kube v3 test adjustment
## [0.12.1](https://github.com/ngergs/optionable/compare/optionable-v0.12.0...optionable-v0.12.1) - 2026-01-13
### Added
- k8s-openapi v0.27 support
## [0.12.0](https://github.com/ngergs/optionable/compare/optionable-v0.11.2...optionable-v0.12.0) - 2025-12-24
### Fixed
- [**breaking**] use same attribute style for option_wrap as for other configs
## [0.11.2](https://github.com/ngergs/optionable/compare/optionable-v0.11.1...optionable-v0.11.2) - 2025-12-23
### Fixed
- readme
## [0.11.1](https://github.com/ngergs/optionable/compare/optionable-v0.11.0...optionable-v0.11.1) - 2025-12-23
### Added
- add type-level `option-wrap` derive argument
## [0.10.3](https://github.com/ngergs/optionable/compare/optionable-v0.10.2...optionable-v0.10.3) - 2025-12-17
### Added
- support (feature-gated) for types from `jiff`
## [0.10.2](https://github.com/ngergs/optionable/compare/optionable-v0.10.1...optionable-v0.10.2) - 2025-12-15
### Fixed
- move `api_version` and `kind` fields for kubernetes resource types to the front
## [0.10.1](https://github.com/ngergs/optionable/compare/optionable-v0.10.0...optionable-v0.10.1) - 2025-12-14
### Other
- docs typo
## [0.10.0](https://github.com/ngergs/optionable/compare/optionable-v0.9.1...optionable-v0.10.0) - 2025-12-14
### Added
- [**breaking**] rework k8s api envelope serialization/deserialization
## [0.9.1](https://github.com/ngergs/optionable/compare/optionable-v0.9.0...optionable-v0.9.1) - 2025-12-14
### Other
- add keywords and categories for main crate
## [0.9.0](https://github.com/ngergs/optionable/compare/optionable-v0.8.4...optionable-v0.9.0) - 2025-12-10
### Added
- support deserialization for QuantityAc from int following upstream
- [**breaking**] no longer include the version number in the exported path of the optioned k8s-openapi types
### Fixed
- dependency updates
### Other
- run codegen for v0.26.1 (no resulting changes)
## [0.8.4](https://github.com/ngergs/optionable/compare/optionable-v0.8.3...optionable-v0.8.4) - 2025-12-09
### Fixed
- k8s-openapi various serialization/deserialization special case handling fixes
## [0.8.3](https://github.com/ngergs/optionable/compare/optionable-v0.8.2...optionable-v0.8.3) - 2025-12-08
### Fixed
- special case serde fix for $ref fields
## [0.8.2](https://github.com/ngergs/optionable/compare/optionable-v0.8.1...optionable-v0.8.2) - 2025-12-07
### Other
- Merge pull request #54 from ngergs/release-plz-2025-12-03T22-34-19Z
- docs
## [0.8.1](https://github.com/ngergs/optionable/compare/optionable-v0.8.0...optionable-v0.8.1) - 2025-12-04
### Other
- docs
## [0.8.0](https://github.com/ngergs/optionable/compare/optionable-v0.7.0...optionable-v0.8.0) - 2025-12-03
### Fixed
- [**breaking**] no longer generate an optioned type for `WatchEvent` from `k8s-openapi`
### Other
- docs
## [0.7.0](https://github.com/ngergs/optionable/compare/optionable-v0.6.1...optionable-v0.7.0) - 2025-12-02
### Added
- [**breaking**] unseal `OptionedConvert`, drop blanket implementation, add `optioned_type` derive field attribute
### Fixed
- OptionableConvert for k8s-openapi watch event broke compilation
- regenerate k8s-openapi generated code
### Other
- docs
## [0.6.1](https://github.com/ngergs/optionable/compare/optionable-v0.6.0...optionable-v0.6.1) - 2025-12-01
### Other
- docs
- set Cargo edition, rust version, license and repo in workspace settings
## [0.6.0](https://github.com/ngergs/optionable/compare/optionable-v0.5.8...optionable-v0.6.0) - 2025-11-30
### Added
- [**breaking**] derived optionable implementation for plain enums to itself
### Fixed
- document (and verify in release gha) minimal rust version
## [0.5.8](https://github.com/ngergs/optionable/compare/optionable-v0.5.7...optionable-v0.5.8) - 2025-11-30
### Fixed
- regenerate k8s-openapi optionable implementation with relaxed where bounds
## [0.5.7](https://github.com/ngergs/optionable/compare/optionable-v0.5.6...optionable-v0.5.7) - 2025-11-30
### Added
- full support unsized generic types for convert
### Fixed
- nightly docgen config
### Other
- conditional integration tests adjustment
- restructure integration tests
## [0.5.6](https://github.com/ngergs/optionable/compare/optionable-v0.5.5...optionable-v0.5.6) - 2025-11-22
### Fixed
- simplify generated/derived code by using `PhantomData<Self>` for the api envelope
### Other
- document k8s_openapi version used by codegen
## [0.5.5](https://github.com/ngergs/optionable/compare/optionable-v0.5.4...optionable-v0.5.5) - 2025-11-12
### Fixed
- for kube/k8s-openapi use #[serde(rename_all_fields="...")] instead of rename_all for enums
## [0.5.4](https://github.com/ngergs/optionable/compare/optionable-v0.5.3...optionable-v0.5.4) - 2025-11-12
### Fixed
- simplify extract function signature
- avoid deref in deserialize_api_envelope
### Other
- docs
## [0.5.3](https://github.com/ngergs/optionable/compare/optionable-v0.5.2...optionable-v0.5.3) - 2025-11-11
### Added
- optionable::kube::deserialize_envelope function to verify api envelope
## [0.5.2](https://github.com/ngergs/optionable/compare/optionable-v0.5.1...optionable-v0.5.2) - 2025-11-10
### Fixed
- merge derives from the derive, kube and k8s_openapi helper attributes
## [0.5.1](https://github.com/ngergs/optionable/compare/optionable-v0.5.0...optionable-v0.5.1) - 2025-11-10
### Fixed
- blanket `Optionable` impl for &mut T did resolve to &T instead of &mut T
## [0.5.0](https://github.com/ngergs/optionable/compare/optionable-v0.4.0...optionable-v0.5.0) - 2025-11-09
### Fixed
- [**breaking**] optionable kube/k8s_openapi no longer automatically add serde untagged
- avoid cloning in extract function
### Other
- docs
## [0.4.0](https://github.com/ngergs/optionable/compare/optionable-v0.3.0...optionable-v0.4.0) - 2025-11-09
### Added
- [**breaking**] feature-gate the `OptionableConvert`-impls for k8s-openapi
- kube extract functionality
### Fixed
- use trait for extract functionality
### Other
- docs
- readme docs.rs links
## [0.3.0](https://github.com/ngergs/optionable/compare/optionable_codegen-v0.4.3...optionable_codegen-v0.5.0) - 2025-11-08
### Added
- Kubernetes server side apply support (see next two items).
- Generated optioned types for all types from [`k8s-openapi`](https://crates.io/crates/k8s-openapi)
- Support for deriving optioned types for [`kube`](https://docs.rs/kube/latest/kube/) CustomResources.
### Fixed
- [**breaking**] moved the error type from `optionable::optionable::Error` to `optionable::Error`
- use DeserializeOwned as generic type bound for optioned Deserialize-derives
- simplify generated code (use less explicit associated types)
## [0.2.6](https://github.com/ngergs/optionable/compare/optionable-v0.2.5...optionable-v0.2.6) - 2025-10-25
### Other
- document associated types limitations
## [0.2.5](https://github.com/ngergs/optionable/compare/optionable-v0.2.4...optionable-v0.2.5) - 2025-10-23
### Added
- codegen/derive: add type bounds for requested `derive` of the optioned type
### Fixed
- simplify where clause codegen implementation
## [0.2.4](https://github.com/ngergs/optionable/compare/optionable-v0.2.3...optionable-v0.2.4) - 2025-10-21
### Added
- relax type restrictions for derived types with generic parameter
## [0.2.3](https://github.com/ngergs/optionable/compare/optionable-v0.2.2...optionable-v0.2.3) - 2025-10-20
### Fixed
- make `Optionable` tuple implementation consistent with pre-existing derived logic
## [0.2.2](https://github.com/ngergs/optionable/compare/optionable-v0.2.1...optionable-v0.2.2) - 2025-10-20
### Added
- implement `Optionable` for tuples with up to 16 elements
- blanket `Optionable` implementation for mutable references
- implement `Optionable` for slices `[T]`
## [0.2.1](https://github.com/ngergs/optionable/compare/optionable-v0.2.0...optionable-v0.2.1) - 2025-10-18
### Fixed
- add missing documentation for feature-dependent availability of some `OptionableConvert` implementations
## [0.2.0](https://github.com/ngergs/optionable/compare/optionable-v0.1.13...optionable-v0.2.0) - 2025-10-18
### Added
- [**breaking**] std and alloc features to support opting-out of linking to the stdlib
- implement `Optionable` for `PathBuf` and `Path`
- implement `Optionable` for `Duration`
- implement `Optionable` for `OsString` and `OsStr`
- implement `Optionable` for weak `Rc`/`Arc`
### Other
- clippy, make partially unused code feature-dependent
- document std/alloc features
- docs
- fmt
## [0.1.13](https://github.com/ngergs/optionable/compare/optionable-v0.1.12...optionable-v0.1.13) - 2025-10-16
### Added
- implement Error trait for our Error struct
- implement `Optionable` for `[T;N]`
### Other
- readme
## [0.1.12](https://github.com/ngergs/optionable/compare/optionable-v0.1.11...optionable-v0.1.12) - 2025-10-16
### Fixed
- docrs build
## [0.1.11](https://github.com/ngergs/optionable/compare/optionable-v0.1.10...optionable-v0.1.11) - 2025-10-15
### Added
- implement `Optionable` for ()
### Fixed
- document feature-gated derive macro and impls
- readme, docs
### Other
- readme
## [0.1.10](https://github.com/ngergs/optionable/compare/optionable-v0.1.9...optionable-v0.1.10) - 2025-10-10
### Added
- generalize `Optionable` trait to unsized
- implement the `Optionable` trait for `Cow`
- codegen option to prefix type path for generated `Optionable` impl
### Fixed
- no automatically_derived on struct/enum definitions, refactor derive code
## [0.1.9](https://github.com/ngergs/optionable/compare/optionable-v0.1.8...optionable-v0.1.9) - 2025-10-01
### Fixed
- handle multiple `optionable_attr` attributes
### Other
- docs
## [0.1.8](https://github.com/ngergs/optionable/compare/optionable-v0.1.7...optionable-v0.1.8) - 2025-10-01
### Fixed
- support attribute forwarding also for enum variants
## [0.1.7](https://github.com/ngergs/optionable/compare/optionable-v0.1.6...optionable-v0.1.7) - 2025-10-01
### Added
- support forwarding of helper attributes to derived optioned types
### Other
- docs
## [0.1.6](https://github.com/ngergs/optionable/compare/optionable-v0.1.5...optionable-v0.1.6) - 2025-09-30
### Added
- default-enabled feature for derive re-export
### Other
- cleanup gitignore
- integration tests
- docs
- docs
- docs
- docs
- readme
## [0.1.5](https://github.com/ngergs/optionable/compare/optionable-v0.1.4...optionable-v0.1.5) - 2025-09-24
### Fixed
- dual-license under apache version 2.0 in addition to MIT
## [0.1.4](https://github.com/ngergs/optionable/compare/optionable-v0.1.3...optionable-v0.1.4) - 2025-09-24
### Added
- resolve self-resolving types like i32 immediately when deriving optioned structs/enums
## [0.1.3](https://github.com/ngergs/optionable/compare/optionable-v0.1.2...optionable-v0.1.3) - 2025-09-17
### Added
- implement OptionableConvert for chrono::DateTime
- auto-implement trait to convert back from optioned to optionable
- implement OptionableConvert
- add impl for Result
### Fixed
- dependency updates
- adjust Optionable-impl for Option
### Other
- docs
- docs
- docs
- document OptionaleConvert
- tests
- minimal test for conversion
- docs typo
- docs
## [0.1.2](https://github.com/ngergs/optionable/compare/optionable-v0.1.1...optionable-v0.1.2) - 2025-09-10
### Fixed
- docs
## [0.1.1](https://github.com/ngergs/optionable/compare/optionable-v0.1.0...optionable-v0.1.1) - 2025-09-10
### Added
- 'required' helper attribute
### Fixed
- docs
- docs
## [0.1.0](https://github.com/ngergs/optionable/releases/tag/optionable-v0.1.0) - 2025-09-09
### Added
- simplify optionable derive macro import
- add serde helper attributes to derived structs to skip serializing Option::None
- feature-gated impl for chrono and serde_json
### Fixed
- clippy
- dependency updates
- keep visibility same for derived optional structs/enums
### Other
- prepare release
- initial release of optionable_derive
- prepare release
- readme
- readme
- prepare publish
- document similar crates
- docs
- readme
- readme
- docs
- test for structwrap trick, simplify impl
- docs
- rename to optionable