Description
We try to keep struct names, field names, and import paths the same as in k8s-openapi
so that, it's (in theory) easy to switch.
If you see field names with strange split casings / mismatched casings:
cluster_i_ps
rather thancluster_ips
- Handle irregular camelCase to snake_case conversion #2pod_i_ps
rather thanpod_ips
or if you see struct names in rust style PascalCase
when the upstream has stronger capitalisation:
ApiResource
rather thanAPIResource
CsiNode
rather thanCSINode
ClusterCidr
rather thanClusterCIDR
- Align type names with k8s-openapi #49
then please raise an issue or submit a PR against our universal re-alignment target just names
:
Lines 80 to 93 in 7e731d6
We do actually want to maintain the aggressive capitalization because 1; it's what the structs are actually called, and 2; it matches k8s-openapi
.
Additionally, if you see import paths not matching the commensurate path as in docs.rs/k8s-openapi please also raise an issue! As examples, these import paths are matching because they have the same path components:
- k8s-pb::CRD vs. k8s-openapi::CRD (apiext full path)
- k8s-pb::ServiceRef vs. k8s-openapi::ServiceRef (aggregator full path)
- k8s-pb::Deployment vs. k8s-openapi::Deployment (apps full path)
if you cannot simply swap out k8s-openapi
for k8s-pb
in a use k8s-openapi::SOMEPATH::SomeStruct
line, then this could be a bug.