Do you know the best way to generate your classes from swagger?

Updated by Brady Stroud [SSW] 1 year ago. See history

123
<introEmbed body={<> You can save time and reduce human error by automatically generating clients for your APIs. </>} />

The best tool for this is NSwag.

This is Microsoft's recommended approach, and you can read more about how to set this up in your ASP.Net Core project at the official documentation.

If you use the Clean Architecture template developed by SSW, this is built in out of the box. See our rule on getting started with clean architecture.

Image

✅ Figure: Good example - NSwag Studio lets you customise your nswag config

Image

✅ Figure: Good example - @JasonTaylorDev's Clean Architecture templace comes with this built in


Acknowledgements

Adam Cogan
Eric Phan
William Yin
Related rules

Need help?

SSW Consulting has over 30 years of experience developing awesome software solutions.