digitallyinduced / ihp

🔥 The fastest way to build type safe web apps. IHP is a new batteries-included web framework optimized for longterm productivity and programmer happiness
https://ihp.digitallyinduced.com/
MIT License
4.94k stars 196 forks source link

Allow defining rest API endpoints (with Swagger/OpenAPI) #1597

Open philer opened 1 year ago

philer commented 1 year ago

Being able to define simple GET/PUT/POST/PATCH/DELETE endpoints with JSON data is a common use case for a modern back end web framework – if not the most common. It surprised me to find that IHP has no official support for it at all. This limits its usability to cases where I know I'll only ever have a simple web front end and not, say, a native phone app. It makes it hard for me to commit to this framework as a Haskell beginner, not knowing if I'll be able to use it for one of my basic requirements.

Please consider adding built in support for rest API endpoints. As a second step, generating a Swagger/OpenAPI schema would be very useful for ease of development.

Notes:

mpscholten commented 1 year ago

The good news it that there's support for this use case, it's just not well documented as the documentation so far focusses a lot on full stack applications. But I agree that we improved this.