giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
cache-seeder / gobuild (push) Canceled after 0s
cache-seeder / lint (bindata, lint-backend) (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s
Includes direct password setup links in registration emails. Assisted-by: Codex:GPT-5
13 lines
551 B
TypeScript
13 lines
551 B
TypeScript
import '../css/swagger-standalone.css';
|
|
import {initSwaggerUI} from './render/swagger.ts';
|
|
|
|
async function initGiteaAPIViewer() {
|
|
const elSwaggerUi = document.querySelector<HTMLElement>('#swagger-ui')!;
|
|
const url = elSwaggerUi.getAttribute('data-source')!;
|
|
const res = await fetch(url); // eslint-disable-line no-restricted-globals
|
|
// HINT: SWAGGER-CSS-IMPORT: this is used in the standalone page which already has the related CSS imported by `<link>`
|
|
await initSwaggerUI(elSwaggerUi, {specText: await res.text()});
|
|
}
|
|
|
|
initGiteaAPIViewer();
|