UNPKG

@b8n/nestjs-rapidoc

Version:
50 lines (47 loc) 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.oauthReceiverHtml = exports.rapidocHtml = exports.favIconHtml = exports.OPENAPI_YAML_PATH = exports.OPENAPI_JSON_PATH = exports.OAUTH_RECEIVER_PATH = void 0; exports.OAUTH_RECEIVER_PATH = "/oauth-receiver.html"; exports.OPENAPI_JSON_PATH = "/openapi.json"; exports.OPENAPI_YAML_PATH = "/openapi.yaml"; exports.favIconHtml = '<link rel="icon" type="image/png" href="<% baseUrl %>favicon.png" />'; exports.rapidocHtml = ` <!doctype html> <html> <head> <meta charset="utf-8"> <title><% title %></title> <% favIconString %> <script type="module" src="<% baseUrl %>rapidoc-min.js"></script> </head> <body> <rapi-doc id="rapidoc" <% rapidocOptions %>> <% customLogo %> </rapi-doc> <% customJs %> <% customJsStr %> <% customCssUrl %> <style> <% customCss %> </style> <script> window.addEventListener("DOMContentLoaded", () => { const rapidoc = document.getElementById("rapidoc"); const spec = <% openAPIDoc %>; rapidoc.loadSpec(spec); }); </script> </body> </html> `; exports.oauthReceiverHtml = ` <!doctype html> <html> <head> <script type="module" src="<% baseUrl %>rapidoc-min.js"></script> </head> <body> <oauth-receiver /> </body> </html> `;