Videos
Check out our tutorial video series.
How to create API libraries for your DotNET project using SwashBuckle Swagger annotations and build-time client generation
DotNET web projects with REST APIs can provide typed API client libraries automatically using OpenAPI and related tooling. If you have an HTTP API that is used by a frontend, other services internally, or is a public API consider generating SDK clients. In this tutorial we will demonstrate how to use Autorest, OpenAPI (Swagger) and SwashBuckle with .NET projects to scaffold and publish development kits.
To use OpenAPi with DotNET create a new project. Add the Swashbuckle package references shown to your to enable annotations and the CLI for generation of the open api spec:
For each web controller endpoint that your wish to expose in your library add a annotation.
In your and a post build step to generate the swagger JSON file from the project dll.
To build your project in Azure Devops and publish a client to an Artifact Repository create an file and add the following:
Then include the steps below to install autorest and generate a client in Typescript
Check out our tutorial video series.
Email and SMS guides for automation and testing.
View github project code for multiple languages.
Latest posts from the MailSlurp team.
Test, build, and automate messaging with a free MailSlurp account.