We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be super useful if generated classes could have a static Kind and ApiVersion property.
Kind
ApiVersion
For example, right now I had to do:
if(genericObject.Kind == "Status") { var status = SafeJsonConvert.DeserializeObject<V1Status>(json); }
where Status is a magic value I had to introduce.
Status
It would be great if I would be able to just do:
if(genericObject.Kind == V1Status.Kind) { var status = SafeJsonConvert.DeserializeObject<V1Status>(json); }
making the code a bit more explicit and allowing me to bypass the need for a magic constant.
Is this something the code generator could do?
The text was updated successfully, but these errors were encountered:
Maybe? Swagger doesn't really represent this kind of stuff well, see the discussion here:
OAI/OpenAPI-Specification#1313
We'd have to post-process it on, similar to what you are doing with watch, or add an Enum to the swagger spec.
Sorry, something went wrong.
#152 fixed this
No branches or pull requests
It would be super useful if generated classes could have a static
Kind
andApiVersion
property.For example, right now I had to do:
where
Status
is a magic value I had to introduce.It would be great if I would be able to just do:
making the code a bit more explicit and allowing me to bypass the need for a magic constant.
Is this something the code generator could do?
The text was updated successfully, but these errors were encountered: