Skarlso / crd-to-sample-yaml

Generate a sample YAML file from a CRD and view it rendered on a nice website
https://crdtoyaml.com/
Apache License 2.0
131 stars 17 forks source link

Idea/FeatureRequest: Extend JSON Schemas with "x-kubernetes-group-version-kind" Property #128

Closed markussiebert closed 1 month ago

markussiebert commented 1 month ago

I use cty to generate JSON schemas from my CRDs. To enhance compatibility and potentially improve IDE integrations, it would be beneficial to extend the generated JSON schemas with the "x-kubernetes-group-version-kind" property, as shown in this example.

Feature Request

Extend JSON Schemas

It would be great if the generated JSON schemas could be extended with the "x-kubernetes-group-version-kind" property. This property provides information about the API group, version, and kind, which may be useful for tools and IDE integrations that utilize these schemas.

Context and Clarification

I was investigating Kubernetes JSON schemas because I didn't understand why my autocompletion was not completing the GroupVersionKind (GVK) in my IDE. It appears that some IDE integrations might rely on the "x-kubernetes-group-version-kind" property for proper functionality. However, I may be mistaken and it might be something that needs to be defined within my CRDs instead.

Potential Benefits

I think this should be easy to implement ...

Skarlso commented 1 month ago

Oh nice catch. Yeah, I can add that.