Skip to content

Comment on Show HN: Django REST – Typed Views

Comments

Shameless self plug: a couple of days ago I posted a project that does pretty much the same thing but built on top of flask instead of django: https://github.com/plainas/flask-swagger-types

Also relying on Marshmallow but with the extra bonus of generating an openapi spec for you and hosting swagger ui.

It puzzles me that such approach is not the norm. Interesting to see more people tackling the same problem.

Very cool! Yeah, it seems like web frameworks could do more in terms of linking up HTTP contracts with the arguments to the controller/view/whatever. Though, sometimes you need a little more flexibility. For instance, often when updating an existing model, the validation depends not just on the incoming request data but also the value of the existing instance's fields.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.