From the course: Building APIs with Swagger and the OpenAPI Specification

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Importing API definitions

Importing API definitions - REST Tutorial

From the course: Building APIs with Swagger and the OpenAPI Specification

Start my 1-month free trial

Importing API definitions

- [Instructor] In some situations, you may need to import an existing OAS API definition file into SwaggerHub. So for example, we've worked within Swagger editor to build out the catalog API definition for H Sports. Let's say that we're really happy with Swagger editor but we'd like to graduate to the collaboration features that we've discovered within SwaggerHub. All we need to do is click on file and then go to save as YAML, and then within our course workspace directory I'm going to name this YAML file H Sports dash API dot YAML. So I'll go ahead and save that, and now we can navigate over to SwaggerHub and you'll see the create new option within the left-hand sidebar. Here we can select the import and document API menu item, and it allows us via this dialogue to browse for an API definition. In this case we're going to grab our newly-created H Sports dash API dot YAML file. And then we can select the organization and the visibility. So I'm going to leave that as H Plus Sport and…

Contents