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

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…

Contents