Is it possible to link to a specific path displayed in Swagger UI, such as to /work/2.1
on the image below?
I want to link to individual paths from an external web page.
Swagger Editor: Swagger Editor lets you edit OpenAPI specifications in YAML inside your browser and to preview documentations in real time. Swagger UI: Swagger UI is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from an OAS-compliant API.
By default, Swagger UI uses BaseLayout , which is built into the application. You can specify a different layout to be used by passing the layout's name as the layout parameter to Swagger UI. Be sure to provide your custom layout as a component to Swagger UI.
Swagger UI, a part of Swagger, is an open source tool that generates a web page that documents the APIs generated by the Swagger specification. This UI presentation of the APIs is user friendly and easy to understand, with all logic complexity kept behind the screen.
Yes, Swagger UI has permalinks for operations and tags. To get a permalink, expand an operation or tag and copy the URL in the address bar. Permalinks look like this:
index.html#/tagName
index.html#/tagName/operationId
When someone opens such a permalink in a browser, the corresponding tag or operation is automatically expanded and also scrolled to the top if needed. Example:
https://petstore.swagger.io/#/store/getInventory
In Swagger UI 2.2 permalinks are enabled by default.
If you use UI 3.x, you need version 3.0.19 or later, and you need to add deepLinking: true
to the Swagger UI init code in your index.html
:
const ui = SwaggerUIBundle({
url: "http://petstore.swagger.io/v2/swagger.json",
deepLinking: true, // <------
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With