-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hi! 👋
Kubernetes both OpenAPI v2 and v3 side-by-side, but moving more and more towards v3, especially for CustomResourceDefinitions (CRDs). In CRDs you can specify a default value for a property.
Kubernetes has it's own meta-library kube-openapi, which has a translation layer for the OpenAPI schema. However, the proto models from this library are used.
In v2 of the proto models of this library, Schema.default is of the Any type, exactly as per the spec's There are no restrictions placed on the value of this keyword [default]..
However, in v3, this is hard-coded to only be a number, string or bool, which breaks round-tripping between JSON and protobuf in Kubernetes.
Would it be possible to support also objects and arrays in the v3 default proto encoding to be compliant with the spec?
Thanks for the consideration!