From Dev.to
FastAPI: Use Enums for Path Parameters — Endpoints That Only Accept Valid Values in 5 Minutes
Many APIs have path parameters that only accept a few fixed values — an order status, for example: pending, shipped, or delivered. Instead of accepting a str and checking it by hand with if/else, decl...
