mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-14 19:15:52 +02:00
fix(backend): /api-doc にアクセスできない問題を修正 (#17267)
* Initial plan * fix: fix /api-doc returning 404 after backend minification (#17266) Agent-Logs-Url: https://github.com/misskey-dev/misskey/sessions/8d7d0585-55da-412f-a8ee-dde1b6565026 Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> * enhance: API DocのHTMLをJSXで生成するように * Update Changelog * chore: remove unused imports [ci skip] --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
This commit is contained in:
26
packages/backend/src/server/api/openapi/api-doc.tsx
Normal file
26
packages/backend/src/server/api/openapi/api-doc.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export function ApiDocPage() {
|
||||
return (
|
||||
<>
|
||||
{'<!DOCTYPE html>'}
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Misskey API</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style>
|
||||
{`body { margin: 0; padding: 0; }`}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script id="api-reference" data-url="/api.json"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
|
||||
</body>
|
||||
</html>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user