4 ms·
> I don't really see how the validation schema and ORM model would ever really diverge... If that were the case, then using a PostgreSQL API[0] that maps table
by Attummm 2y ago
> I don't really see how the validation schema and ORM model would ever really diverge...
If that were the case, then using a PostgreSQL API[0] that maps tables to APIs would be all that's required.
However, the real world is messy. Requirements change, which could lead the project becoming a reimplementation of full framework such as Django.
Django also comes with generic REST endpoints based on models thus giving you the magic, but still allows for all the different use cases and customizations that might present themselves during the full lifecycle of a project.
[0]https://github.com/PostgREST/postgrest https://github.com/PostgREST/postgrest
- dennisy 2y agoThat is a great point, if CRUD is all we need PostgREST would be all we need!
- Scarblac 2y agoI feel it would be good to start with PostgREST and only start adding custom endpoints once what you need diverges from tgat. Although those could also be Postgres views and stored procedures, of course.