v0.12.0
k8s-openapi
-
BREAKING CHANGE: Struct fields of type
Option<Vec<T>>
andOption<BTreeMap<K, V>>
are now of typeVec<T>
andBTreeMap<K, V>
respectively. When deserializing from JSON,null
is deserialized to an empty collection. When serializing, an empty collection is not serialized. This was done to improve ergonomics and is not expected to create problems with any existing Kubernetes objects. If you do find a Kubernetes object that meaningfully differentiates between anull
collection and an empty one, please file a bug. -
BREAKING CHANGE: Added support for Kubernetes 1.21 under the
v1_21
feature. -
FEATURE: The
Resource
trait now contains two additional items. The first is an associated typeScope: ResourceScope
that identifies whether a resource is cluster-scoped, namespace-scoped or a subresource. The second is an associated constURL_PATH_SEGMENT: &'static str
that can be used to dynamically construct a URL for operations on the resource - for cluster- and namespace-scoped resources it is their plural name, for subresources it is the subresource name.
Corresponding Kubernetes API server versions:
- v1.11.10
- v1.12.10
- v1.13.12
- v1.14.10
- v1.15.12
- v1.16.15
- v1.17.17
- v1.18.19
- v1.19.11
- v1.20.7
- v1.21.1
k8s-openapi-derive
- BUGFIX: The generated code of
#[derive(CustomResourceDefinition)]
implicitly expected the crate to have added a dependency on thehttp
,serde
andserde_json
crates. It has now been fixed to use the re-exports from thek8s-openapi
crate instead.
k8s-openapi-codegen-common
-
BREAKING CHANGE:
run
now takes an impl ofRunState
for writing generated code and imports instead of two separate closures. This allows the impl ofRunState
to share state between invocations of the two functions instead of needingRefCell
, etc. -
BREAKING CHANGE:
swagger20::Type::JSONSchemaPropsOrArray
,swagger20::Type::JSONSchemaPropsOrBool
andswagger20::Type::JSONSchemaPropsOrStringArray
have been renamed toswagger20::Type::JsonSchemaPropsOrArray
,swagger20::Type::JsonSchemaPropsOrArray
andswagger20::Type::JsonSchemaPropsOrArray
respectively to match Rust naming conventions.