In this chapter, we will learn how to document our API using the OpenAPI Specification and how to use Swagger tools to parse and generate the documentation. Documenting APIs is particularly significant when our web service is consumed by an external company or a foreign organization team. Moreover, some services can be considerably complex and expose a lot of endpoints. For this reason, some tools related to the .NET ecosystem guarantee up-to-date API documentation. Two main toolchains can be used in this process: NSwag and Swashbuckle. In this book, we will cover and use NSwag to document our APIs.
In this chapter, we will cover the following topics:
- Understanding OpenAPI
- Implementing OpenAPI in ASP.NET Core services
By the end of this chapter, you will be able to automatically generate up-to-date documentation that's compliant with the...