4 ms·
I spend weeks looking for tools that I could even us, much less like, and eventually gave up and wrote everything by hand. I would be very interested in hearing
by 0xffff2 6y ago
I spend weeks looking for tools that I could even us, much less like, and eventually gave up and wrote everything by hand. I would be very interested in hearing about any OpenAPI tools that you would recommend.
- smt88 6y agoFor .NET, it's best to write the spec as annotations on your controllers and request/response classes using NSwag[1]. The situation is similar in the Java world. It's better to annotate, rather than start with your own spec. For TypeScript, I mostly use a CLI tool[2] that generates type definitions, which I then use in my routing system and controllers to make sure that any changes to paths, requests, and responses are going to cause compiler errors until they're fixed. 1. https://docs.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-nswag?view=aspnetcore-3.1&tabs=visual-studio https://docs.microsoft.com/en-us/aspnet/core/tutorials/getti... 2. https://github.com/horiuchi/dtsgenerator/ https://github.com/horiuchi/dtsgenerator/