feat: Add Swagger UI integration and API documentation support

This commit is contained in:
2025-01-06 15:32:58 +08:00
parent 62dda6b767
commit dd9e694ca3
7 changed files with 174 additions and 5 deletions

View File

@@ -0,0 +1,21 @@
window.onload = function() {
//<editor-fold desc="Changeable Configuration Block">
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
window.ui = SwaggerUIBundle({
url: "/api.json",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
validatorUrl: null,
});
//</editor-fold>
};