From 75edd880d64f4b95077da4359d32bb137b1d13b2 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 10 Dec 2025 10:33:59 +0100 Subject: [PATCH] --- README.rst | 7 +++++++ swagger-initializer.js | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 README.rst create mode 100644 swagger-initializer.js diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..daff546 --- /dev/null +++ b/README.rst @@ -0,0 +1,7 @@ +keywords: swagger-ui "store" api key + +Config value: ``persistAuthorization`` + +- patch: https://github.com/swagger-api/swagger-ui/pull/5939 +- documentation: https://github.com/swagger-api/swagger-ui/blob/v5.30.3/docs/usage/configuration.md#authorization + diff --git a/swagger-initializer.js b/swagger-initializer.js new file mode 100644 index 0000000..4187157 --- /dev/null +++ b/swagger-initializer.js @@ -0,0 +1,22 @@ +window.onload = function() { + // + + // the following lines will be replaced by docker/configurator, when it runs in a docker-container + window.ui = SwaggerUIBundle({ + url: "../api.yaml", + dom_id: '#swagger-ui', + deepLinking: true, + // HERE: + persistAuthorization: true, + presets: [ + SwaggerUIBundle.presets.apis, + SwaggerUIStandalonePreset + ], + plugins: [ + SwaggerUIBundle.plugins.DownloadUrl + ], + layout: "StandaloneLayout" + }); + + // +}; -- 2.30.2