Step 8: The externalDocs object (OpenAPI tutorial)
externalDocs object lets you link to external documentation. You can also provide links to external docs in the
Example externalDocs object
Here’s an example of an
externalDocs: description: API Documentation url: https://openweathermap.org/api
In the Swagger UI, this link appears after the API description along with other info about the API.
See the related topic, Integrating Swagger UI with the rest of your docs for tips on how to integrate your Swagger UI output into your regular documentation.
Seeing the finished result
Now that we’ve completed all the steps in the tutorial, we’re finished building our OpenAPI document. You can see the end result here: docs/rest_api_specifications/openapi_weather.yml.
Here’s the specification document embedded in Swagger UI:
You can actually insert any valid path to an OpenAPI specification document into the “Explore” box in Swagger UI (assuming it’s using a version that supports your version of the spec), and it will display the content.
73/101 pages complete. Only 28 more pages to go...
Would you like to help encourage more content development and updates? If so, click the Donate button below to donate $10 through Paypal.
I'd Rather Be Writing Newsletter
Get new posts delivered straight to your inbox.