Adding Descriptions to Swagger Generated OpenAPI Documentation

Enhancing API Documentation Swashbuckle tooling for Swagger provides an easy way to document APIs in ASP.NET Core with out of the box functionality that creates a lot without additional customization. The OpenAPI spec allows for a lot of additional description to be included, and by annotating your code in appropriate places the Swagger generation can automatically fill these for you. Many of these additional descriptions also show up in the automatically generated Swagger UI....

September 30, 2023 · 7 min · 1327 words · John Bowen

Adding Bearer Token Authentication to Swagger API Test UI in ASP.NET Core

Swagger OpenApi Doc Generation The Swagger tooling provided by Swashbuckle in ASP.NET Core can be used to auto-generate OpenAPI docs and a test UI for exercising your API through the browser without external tooling. The basic setup only requires a few lines of code and is currently optionally included in many of the standard dotnet templates that produce APIs. A simple setup includes adding two services and two middleware registrations:...

July 27, 2023 · 6 min · 1079 words · John Bowen