I'm using the swagger-editor docker.
It produces, in the right column, a beautiful and functional interactive version of the documentation I'm writing in the right column.
I am trying to export such documentation but to no luck.
Is it possible to export an interactive, stand alone, documentation looking and working as the one shown in the right column?
The right-side panel of Swagger Editor is Swagger UI. You can download Swagger UI assets and host them on your own website.
Download (or clone) the Swagger UI repository:
https://github.com/swagger-api/swagger-ui
Take the dist
folder - it contains the static assets.
Put your OpenAPI YAML/JSON file to the dist
folder.
In the dist\index.html
file, change the url
parameter to point to your YAML/JSON file:
const ui = SwaggerUIBundle({
url: "myapi.yaml", // <----
Put the files from the dist
folder on your web server.
It's also possible to embed Swagger UI into your existing web page, e.g. if you want to have your custom branded header and footer.
See also: