Open SGStino opened 7 months ago
Hey @SGStino
That's a good idea! As long as there are possibilities to add the special "x-kubernetes" attributes, we should be good to go. According to the docs of Kubernetes, they use openapi v3 and as such, we could use a lib for that.
The library supports adding custom vocabulary, so the x-kubernetes should be implemented as those.
I'll see if I can bash something together as reference so you can see how to fit it in the operator?
That would be amazing! Thank you :-)
https://github.com/SGStino/JsonSchemaTest
If you have any real-life examples of entities we can test against? Just to see what comes out, then we can figure out if anything works different or not at all.
Hey @SGStino Thanks :-)
Sadly - no. Since I made this SDK, I've only written one operator (weird, I know).
But maybe other contributors can provide some real world examples.
Is your feature request related to a problem? Please describe.
Currently, the schema generation is limited to what is implemented,
Issues like https://github.com/buehler/dotnet-operator-sdk/issues/741, https://github.com/buehler/dotnet-operator-sdk/issues/396, https://github.com/buehler/dotnet-operator-sdk/issues/351 could possibly benefit from this
Describe the solution you would like
It would be nice to team up with a schema generator library and outsource those capabilities to generate the OpenApiV3 spec.
JsonSchema.Net offers JsonSchema with customizable keywords and validation on JsonNodes. JsonSchema.Net.Generation can generate schemas from C# classes with reflection (for use in KubeOps.Cli?)
Additional Context
No response