Closed felixfbecker closed 6 years ago
I have some ideas around this - will explain tomorrow :-D
PS. Thanks for taking the time to get involved!
Going to close this one now that support for model-type lookup has been added but feel free to reopen if the API doesn't do what you need :)
When parsing YAML files, I don't know beforehand what class I need to serialize it too. I first have to look at the
kind
andapiVersion
properties to find out - but I don't see an easy way to get theType
(e.g.typeof(KubeDeploymentV1Beta)
) from a given string kind. I could dynamically assemble the fully qualified name but it seems messy and I'm not sure about the assembly name. I think the best option would be to add a helper function, it could useType.GetType(string)
to load from the current assembly or use a bigswitch
that can be generated (don't know what is better).