Closed
Description
It would be super useful if generated classes could have a static Kind
and ApiVersion
property.
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.
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?
Metadata
Metadata
Assignees
Labels
No labels