fix(backend): /api-doc にアクセスできない問題を修正#17267
Merged
Conversation
Closed
1 task
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>
Copilot
AI
changed the title
[WIP] Fix 404 error when accessing /api-doc
fix: /api-doc returns 404 due to broken path resolution after backend bundling
Mar 28, 2026
Member
|
/preview |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #17267 +/- ##
===========================================
- Coverage 63.57% 61.74% -1.83%
===========================================
Files 1161 1161
Lines 116244 116324 +80
Branches 8371 8062 -309
===========================================
- Hits 73900 71824 -2076
- Misses 40159 42314 +2155
- Partials 2185 2186 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
このPRによるapi.jsonの差分 |
Contributor
Backend memory usage comparisonBefore GC
After GC
After Request
|
Contributor
|
なおした |
Member
|
🙏🏻 |
m10i-0nyx
pushed a commit
to foundation0-link/misskey
that referenced
this pull request
Apr 12, 2026
* Initial plan * fix: fix /api-doc returning 404 after backend minification (misskey-dev#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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fix
staticAssetspath resolution inOpenApiServerService.tsto use the same root-finding approach already used inClientServerService.ts.Why
PR #17054 (minify backend) switched the build from per-file
tscoutput to a single esbuild bundle atbuilt/boot/entry.js.OpenApiServerService.tswas still resolving the assets path relative toimport.meta.url:ClientServerService.tswas updated in the same PR to walk up the tree to find the repo root, butOpenApiServerService.tswas missed, causingreply.sendFile('/api-doc.html', staticAssets)to look in the wrong directory and return 404.Additional info (optional)
Related: #17054 introduced the build change;
/api.jsonwas unaffected since it generates content dynamically.Checklist
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.