This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I played around with an upcoming framework in Python called FastAPI where you use classes to specify models for data validation. Simply by specifying route handler parameter types and a response_model
it will auto-generate all of the OpenAPI json needed to display in Swagger.
Is there anything like this in TypeScript currently? I've checked out things like Loopback and Adonis (new version has TS support) but from what I can tell, those all require you to write out your own doc json which feels super tedious. I'm not too familiar with stuff like reflection, but I assume it should be possible to auto-generate the OpenAPI json with information inferred from the code? Or is there a technical limitation that I'm not aware of?
Subreddit
Post Details
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/typescript/...