3 ms·
Flask ain’t going anywhere, but i’m a serious FastAPI devotee now. pydantic validation throwing a 422 with what’s wrong before my endpoint ever gets hit is a f
by hprotagonist 4y ago
Flask ain’t going anywhere, but i’m a serious FastAPI devotee now.
pydantic validation throwing a 422 with what’s wrong before my endpoint ever gets hit is a fucking superpower.
- kortex 4y agoI'm so spoiled by pydantic/fastapi spelling out exactly where my payload schema is wrong. I was interfacing with some google calendar API and it was constantly giving me a super vague "Bad Request" and I'm messing with the fields until finally I figure out I need a strict datetime string with four-digit timezone, no Z allowed. Like, it's delicious to be told exactly what you need to tweak to get it to accept.