-1

Is there a way to import an existing OpenAPI (Swagger) definition to SwaggerHub by providing a link to the corresponding Swagger UI page?

I tried importing the WEBLOC file link that I have, but SwaggerHub does not seem to be able to access it.

Import to SwaggerHub

Helen
  • 87,344
  • 17
  • 243
  • 314

1 Answers1

0

To import an API definition into SwaggerHub, you need to specify an URL that points to the YAML or JSON definition file (not to the Swagger UI web page!). For example:

http://petstore.swagger.io/v2/swagger.yaml

Or you can upload the actual YAML or JSON file.

You cannot upload a .webloc file. Open your .webloc in a browser to see where it points to, find out the URL of the API definition file, and use that with SwaggerHub. This question explains how to get the API definition path from Swagger UI.

Helen
  • 87,344
  • 17
  • 243
  • 314