Documenting an ASP.NET Core Web API Using Swagger
Documenting an API is essential. By using Swagger (OpenAPI), which integrates nicely with ASP.NET Core, you can take on this task. In this course you'll learn how to do that.
What you'll learn
Documenting an API is often regarded as a tedious, yet essential, task. In this course, Documenting an ASP.NET Core Web API using Swagger, you'll use Swagger (OpenAPI), which integrates nicely with ASP.NET Core, to take on this task. First, you'll discover how to add documentation for your API and add a UI that allows testing the API. Next, you'll see that built-in conventions already go a long way towards generating an OpenAPI specification for your API, but you can override them when needed. Finally, you'll learn how to customize the UI of the generated documentation, and what other use cases there are for OpenAPI - like generating automated tests for your API and generating client-side code from the specification. When you're finished with this course you'll know the ins and outs of OpenAPI and how it can help with documenting your API and more.
Table of contents
- Coming Up 1m
- Demo - Getting Started with Swashbuckle from Scratch 4m
- Demo - Adding Swashbuckle to an Existing Project 3m
- Demo - Inspecting the Generated OpenAPI Specification 4m
- Demo - Adding SwaggerUI to the Project 3m
- Demo - Incorporating XML Comments on Actions 5m
- Demo - Incorporating XML Comments on Model Classes 2m
- Demo - Improving Documentation with Data Annotations 3m
- Demo - Improving Documentation with Examples 3m
- Demo - Ignoring Warnings Where Appropriate 4m
- Demo - Adding API Information and Description 3m
- Summary 2m
- Coming Up 2m
- The Importance of ApiExplorer 2m
- Why It's Important to Produce Correct Response Types 1m
- Demo - Describing Response Types (Status Codes) with ProducesReponseType 8m
- Demo - Using API Analyzers to Improve the OpenAPI Specification 9m
- Demo - Working with API Conventions 8m
- Demo - Creating Custom Conventions 7m
- Attributes Versus Conventions 2m
- Content Negotiation 3m
- Demo - Specifying the Response Body Type with the Produces Attribute 8m
- Demo - Specifying the Request Body Type with the Consumes Attribute 1m
- Summary 2m
- Coming Up 1m
- Supporting Vendor-specific Media Types 3m
- Demo - Supporting Vendor-specific Media Types 8m
- OpenAPI Support for Schema Variation by Media Type (Output) 1m
- Demo - Supporting Schema Variation by Media Type (Output, ResolveConflictingActions) 6m
- Demo - Supporting Schema Variation by Media Type (Output, IOperationFilter) 8m
- OpenAPI Support for Schema Variation by Media Type (Input) 2m
- Demo - Supporting Schema Variation by Media Type (Input) 5m
- Advanced Scenarios 1m
- Summary 2m
- Coming Up 1m
- Working with Multiple OpenAPI Specifications 1m
- Demo - Working with Multiple OpenAPI Specifications 4m
- Versioning with ASP.NET Core’s Built-in Approach 2m
- Demo - Supporting Versioned Endpoints 7m
- Demo - Versioning Endpoints 5m
- Protecting Your API 4m
- Demo - Protecting Your API 4m
- Demo - Adding Authentication Support to the OpenAPI Specification 5m
- Summary 1m
- Coming Up 1m
- Enriching Comments with Markdown 1m
- Demo - Enriching Comments with Markdown 3m
- Demo - Basic UI Customization with the Configuration API 2m
- Supporting Deep Linking 1m
- Demo - Supporting Deep Linking 1m
- Branding the UI 3m
- Demo - Branding the UI by Injecting Custom CSS 3m
- Demo - Branding the UI by Injecting a Custom Index Page 4m
- Summary 2m