For our Swagger API documentation, we’d like to send a deep link to an API method (=operation
in swagger) to a developer.
Our Swagger version is 2.2.15 and Swagger-ui version is 5.11.8.
We use the parameter docExpansion: none
to have all tags collapsed by default.
const ui = SwaggerUIBundle({
url: url,
dom_id: '#swagger-ui-container',
docExpansion: 'none',
defaultModelsExpandDepth: -1,
deepLinking: true,
When using the deepLinking: true
parameter, it does not open a method when opening that link in the browser.
When using docExpansion: list
, the deep links do work.
In the documentation
https://swagger.io/docs/open-source-tools/swagger-ui/usage/deep-linking/
it says, that this combination should work but it does not, neither in Firefox nor in Chrome.
Sure - use docExpansion: none to collapse all tags and operations. Your deep link will take precedence over the setting, so only the tag or operation you've specified will be expanded.
Is there another option that we can use to make the deepLinking work?