In this video, learn how to add the NSwag package to your API project to automatically generate an OpenAPI definition and add Swagger UI.
- [Instructor] There are a couple of tools that you can use…to add the Open API capabilities to an ASP.net core project,…with Swashbuckle and Nswag currently being the most popular.…In this video, I'll show you how to add…Nswag to your project.…First, we'll start in the NuGet package manager.…I need to search for 'Nswag dot ASP net core'…and install this package.…
Then, in Startup.cs, we can add Swagger UI…to the configure method.…I'm gonna add it only when the application…is running in development mode.…I'll do 'app dot use swagger UI'…'three with API explorer'.…Import this name space, Nswag dot ASP net core.…I can pass some options to it.…I'll do 'options dot generator settings'…'dot default property name handling'…and tell it that I want 'N Json Schema'…'dot property name handling dot camel case properties'.…
Alright, let's run this project.…I'll open up a browser and browse to slash swagger.…Let me get the port once again.…I'll open up a browser.…Go to local host, my ports slash swagger.…Now we can interact with Swagger UI.…
- What is RESTful design?
- Building a new API with ASP.NET Core
- Using HTTP methods
- Returning JSON
- Creating RESTful routing with templates
- Securing RESTful APIs with HTTPS
- Representing resources
- Representing links
- Representing collections
- Sorting and searching collections
- Building forms
- Adding caching to an ASP.NET Core API
- Configuring user authentication and authorization
Skill Level Advanced
1. REST API Concepts
2. Build a Basic API
3. Versioning and Errors
4. Secure the API
5. Represent Resources
6. Represent Links
7. Represent Collections
Add pagination7m 37s
8. Sorting Collections
9. Searching Collections
10. Forms and Modifying Data
11. Caching and Compression
12. Authentication and Authorization
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.