From the course: Building APIs with Swagger and the OpenAPI Specification
Unlock the full course today
Join today to access over 24,100 courses taught by industry experts.
Swagger UI - REST Tutorial
From the course: Building APIs with Swagger and the OpenAPI Specification
Swagger UI
- [Instructor] Once we've built an API definition file, we can automatically generate interactive documentation from the file using Swagger UI. To get started, we just need to save our API definition from Swagger Editor. To do this, we click on the file option within the menu and then click on Save as YAML. This is going to open a dialog where we can then save our API definition file. In this case, we're going to save the file within our course workspace directory on the desktop. I'm going to go ahead and name the file hsports-api.yaml. Once the file has downloaded, we can navigate to the directory containing the file and we're going to copy our API definition. From there, we're going to navigate into the swagger-ui directory, where we find the Swagger installation. In this directory, you'll see the dist directory. Let's navigate into that directory and then paste our API definition file. Now if we hop up a directory, we can copy dist and then we can paste dist within the course…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Defining APIs3m 23s
-
(Locked)
Reading the specification5m 40s
-
(Locked)
Paths with query parameters3m 53s
-
(Locked)
Template parameters in paths4m 45s
-
(Locked)
Building posts with request bodies3m 34s
-
(Locked)
Achieving reusability with components7m 1s
-
(Locked)
Response objects3m 34s
-
(Locked)
Reusing parameters2m 41s
-
(Locked)
Content negotiation2m 21s
-
(Locked)
Swagger UI3m 22s
-
(Locked)
Challenge: Create company blog posts1m 9s
-
(Locked)
Solution: Create company blog posts3m 37s
-
(Locked)
-
-
-