Arnavion / k8s-openapi

Rust definitions of the resource types in the Kubernetes client API
Apache License 2.0
379 stars 41 forks source link

Add `impl schemars::JsonSchema` #105

Closed kazk closed 3 years ago

kazk commented 3 years ago

Generate code to impl schemars::JsonSchema instead of using serde_json::Value (#104).

See aee7913 (#105).

TODO


Closes #86

Arnavion commented 3 years ago

I pushed https://github.com/Arnavion/k8s-openapi/compare/pr-105 with your PR + one "Various changes" on top (see the commit message for details). Does that look okay to you?


Kubernetes extensions. Capture any other fields with #[serde(flatten)] extensions: BTreeMap<String, Value>, then use that to generate code to add extensions field.

What's this about?

kazk commented 3 years ago

Does that look okay to you?

Yeah, it looks good to me.

What's this about?

I thought we should preserve schema extensions (e.g., x-kubernetes-list-type etc. for server side apply). Not sure if users want them or if it makes sense. It's not a blocker. We don't need to do it now.