Currently, plugins and exporter will receive proxy objects when dealing with values from the model. For basic plugins and exporters, you know exactly which type to expect, and you can simply access the attributes you care about. If you build a more generic logic however, which needs to discover the attributes of the object, it gets very complicated, and requires accessing private attributes of the proxy object.
It would be nice of the proxy layer would expose the information of the type of the entity --> currently _type method
It would be nice if the inmanta.ast.entity.Entity was added to the stable api (at least partially), same goes for Attribute, Relation, etc
Currently, plugins and exporter will receive proxy objects when dealing with values from the model. For basic plugins and exporters, you know exactly which type to expect, and you can simply access the attributes you care about. If you build a more generic logic however, which needs to discover the attributes of the object, it gets very complicated, and requires accessing private attributes of the proxy object.
_type
methodinmanta.ast.entity.Entity
was added to the stable api (at least partially), same goes for Attribute, Relation, etcOne example of more advanced usage: https://code.inmanta.com/solutions/modules/restbase/-/blob/68289e734aaaeb39f97e3eba7bbcf6851c810acb/inmanta_plugins/restbase/schemas/one_of_object.py#L136