optionable 0.17.2

Derive macro (and associated marker trait) to derive nested structs/enums with all subfields being optional (e.g. for patches or Kubernetes server side apply).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
# 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