You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have one addtional question, you may could answer: Asumming a pydantic class structure, is it possible to exclude classes? I know its possible to definde end-points via terminal_models, but in our case each class have an attribute of type "AttributeData", which we want to disable when drawing the diagram.
Thanks in advance.
There isn't currently a convenient interface for specifying certain models to be excluded.
However, here are some ways you can accomplish this:
Delete the models from the diagram after the diagram is created but before rendering. You can go through the models dictionary or edges list on the EntityRelationshipDiagram class and remove nodes and edges. See some relevant documentation here.
Use a custom plugin with custom predicate logic. You can create a custom plugin that handles the logic for excluding those particular model classes and register it overriding the built-in pydantic one. Relevant documentation here. An easy way to accomplish your goal is to just create a new function that wraps is_pydantic_model with your extra exclusion logic, and register that along with the built-in get_fields_from_pydantic_model.
Originally posted by @SebastianDD in #124 (comment)
The text was updated successfully, but these errors were encountered: