mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-09 08:32:16 +00:00
Merge pull request '[CHORE] Proper chunking for swagger' (#5056) from gusted/forgejo-chunking into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5056 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
commit
0c02a61319
|
@ -1,7 +1,8 @@
|
|||
import SwaggerUI from 'swagger-ui-dist/swagger-ui-es-bundle.js';
|
||||
import 'swagger-ui-dist/swagger-ui.css';
|
||||
|
||||
window.addEventListener('load', async () => {
|
||||
const [{default: SwaggerUI}] = await Promise.all([
|
||||
import(/* webpackChunkName: "swagger-ui" */'swagger-ui-dist/swagger-ui-es-bundle.js'),
|
||||
import(/* webpackChunkName: "swagger-ui" */'swagger-ui-dist/swagger-ui.css'),
|
||||
]);
|
||||
const url = document.getElementById('swagger-ui').getAttribute('data-source');
|
||||
|
||||
const ui = SwaggerUI({
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import SwaggerUI from 'swagger-ui-dist/swagger-ui-es-bundle.js';
|
||||
import 'swagger-ui-dist/swagger-ui.css';
|
||||
|
||||
window.addEventListener('load', async () => {
|
||||
const [{default: SwaggerUI}] = await Promise.all([
|
||||
import(/* webpackChunkName: "swagger-ui" */'swagger-ui-dist/swagger-ui-es-bundle.js'),
|
||||
import(/* webpackChunkName: "swagger-ui" */'swagger-ui-dist/swagger-ui.css'),
|
||||
]);
|
||||
|
||||
const url = document.getElementById('swagger-ui').getAttribute('data-source');
|
||||
const res = await fetch(url);
|
||||
const spec = await res.json();
|
||||
|
|
Loading…
Reference in a new issue