Repository navigation
v0.9.0
-
BREAKING CHANGE: Resource types that used to have a
metadata: Option<crate::apimachinery::pkg::apis::meta::v1::ObjectMeta>field now have ametadata: crate::apimachinery::pkg::apis::meta::v1::ObjectMetafield instead. That is, metadata is now a required field for resource types. Most client requests and server responses need to set the field, so dealing with it being optional required unnecessary boilerplate in client code for both creating requests and using responses.Likewise, the
k8s_openapi::Metadatatrait'smetadatagetter now returns&Self::Tyinstead ofOption<&Self::Ty>Note that the fields inside the
ObjectMetatype are themselves still optional.There are some sitations like PATCH requests where the metadata truly is optional. In these cases, you can create an empty metadata value via
Default::default(), which will get serialized as an empty JSON object{}. If there is a situation where the empty object does not act the same as if the field had been omitted entirely, please file an issue. -
BREAKING CHANGE:
k8s_openapi::apimachinery::pkg::apis::meta::v1::WatchEvent::<T>::Bookmarkused to be a tuple variant containing aT, but is now a struct variant containing aresource_version: Stringfield.While the Kubernetes OpenAPI spec indicates that bookmark events contain the resource type, in fact they contain a stripped down form of that type with only the
apiVersion,kindandmetadata.resourceVersionfields set to useful values. Previously this would cause deserialization of bookmark events to fail if theThad some required field that was actually unset ornull. Now the deserializer only looks for those three values in the event and ignores any others. -
BREAKING CHANGE:
k8s_openapi::apimachinery::pkg::apis::meta::v1::WatchEvent<T>now requiresTto also implementk8s_openapi::Resource. Previously it only requiredTto implementserde::de::DeserializeOwned. This is required to support the change mentioned in the previous item, since the deserialization of aWatchEventnow needs to take theapiVersion,kindandmetadata.resourceVersionfields into consideration itself instead of relying onT'sserde::Deserializeimpl. -
FEATURE: The
k8s_openapi::Metadatatrait now has afn metadata_mut(&mut self) -> &mut<Self as Metadata>::Tymethod that can be used to mutate the metadata of the resource. -
FEATURE: The
k8s-openapi-codegen-commoncrate is now stable and documented. It can be used by other code generators that want to generate code for Kubernetes-like API servers such as OpenShift.
Corresponding Kubernetes API server versions:
- v1.11.10
- v1.12.10
- v1.13.12
- v1.14.10
- v1.15.12
- v1.16.13
- v1.17.9
- v1.18.6