Repository navigation
erdify 0.14.0 — ER diagrams for django-ninja schemas #175
FabianClemenz
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
erdify 0.14.0 is out 🎉
A small release with one new option that unblocks a whole framework.
--base-classeserdify treats a class as a Pydantic model when
BaseModelappears in its bases — and it resolves that chain only across the files it scanned. So a base class living in an installed package was unresolvable, and every subclass of it was silently skipped.django-ninja is the case people hit.
ninja.Schemadoes subclasspydantic.BaseModel, but that inheritance is inside the installed package, which erdify never reads:Name the base and it works:
This is deliberately config-driven rather than a hardcoded list of known third-party names, because the shared
BaseSchemathat every service imports from an internal company package is the same problem — and no fixed list could ever reach it. Both the bare (Schema) and qualified (ninja.Schema) forms match, and a class reaching the named base through an intermediate in a scanned file resolves too.Scope, plainly: this covers
ninja.Schemasubclasses with explicit field annotations. It does not coverninja.ModelSchema(orninja_schema.ModelSchema), whose fields come from an innerMeta/Configrather than the class body — naming those bases would produce entities with no fields. That half is tracked in #171, and there is an open design question in it worth your opinion if you use those: is a response schema an entity, or just a projection of one?A correction to the comparison page
The comparison page claimed no alternative ships Markdown injection or a CI drift gate. That was wrong: paracelsus ships both, plus Mermaid output and
[tool.paracelsus]configuration. It is now a column in the table and a named entry under when to use something else — it reaches your models by importing them, so it sees resolved metadata an AST scan cannot, and for a single SQLAlchemy application that accuracy may well be worth more than erdify's independence.An inaccurate comparison is worse than none. If you spot another, please open an issue.
📦 Release · 📖 Docs · 📝 Changelog
All reactions