@@ -21,12 +21,18 @@ paths:
2121 security : []
2222 parameters :
2323 - name : follower
24- description : Filter users who are being followed by the specified user.
24+ description : |
25+ Filter users who are being followed by the specified user.
26+
27+ Historical usernames are accepted and transparently normalized to the canonical username.
2528 in : query
2629 schema :
2730 $ref : " #/components/schemas/User/properties/username"
2831 - name : followee
29- description : Filter users who are following the specified user.
32+ description : |
33+ Filter users who are following the specified user.
34+
35+ Historical usernames are accepted and transparently normalized to the canonical username.
3036 in : query
3137 schema :
3238 $ref : " #/components/schemas/User/properties/username"
8288 application/json :
8389 schema :
8490 $ref : " #/components/schemas/User"
91+ " 301 " :
92+ $ref : " #/components/responses/MovedPermanently"
8593
8694 /user :
8795 get :
@@ -142,6 +150,8 @@ paths:
142150 responses :
143151 " 204 " :
144152 description : Successfully followed the user.
153+ " 409 " :
154+ $ref : " #/components/responses/ResourceMoved"
145155 get :
146156 tags :
147157 - Users
@@ -159,6 +169,8 @@ paths:
159169 description : The user is followed by the authenticated user.
160170 " 404 " :
161171 description : The user is not followed by the authenticated user.
172+ " 301 " :
173+ $ref : " #/components/responses/MovedPermanently"
162174 delete :
163175 tags :
164176 - Users
@@ -174,6 +186,8 @@ paths:
174186 responses :
175187 " 204 " :
176188 description : Successfully unfollowed the user.
189+ " 409 " :
190+ $ref : " #/components/responses/ResourceMoved"
177191
178192 /project :
179193 post :
@@ -199,6 +213,8 @@ paths:
199213 Full name of the project or project release to remix from.
200214
201215 **Using the project's full name means remixing the latest release sourced from that project.**
216+
217+ Historical project or project release routes return `40901` with a `canonical` payload.
202218 oneOf :
203219 - $ref : " #/components/schemas/ProjectFullName"
204220 - $ref : " #/components/schemas/ProjectReleaseFullName"
@@ -207,6 +223,12 @@ paths:
207223 displayName :
208224 description : Defaults to `name` if not provided.
209225 $ref : " #/components/schemas/Project/properties/displayName"
226+ type :
227+ description : |
228+ Project type.
229+
230+ If omitted, the request defaults to `game` for backward compatibility.
231+ $ref : " #/components/schemas/Project/properties/type"
210232 files :
211233 description : |
212234 File paths and their corresponding universal URLs associated with the project.
@@ -228,6 +250,17 @@ paths:
228250 application/json :
229251 schema :
230252 $ref : " #/components/schemas/Project"
253+ " 409 " :
254+ description : |
255+ Returned when `remixSource` references a historical project or project release route.
256+
257+ The response includes a `canonical` payload for the route-derived fields in `remixSource`.
258+
259+ Clients may update the request and resubmit it explicitly.
260+ content :
261+ application/json :
262+ schema :
263+ $ref : " #/components/schemas/MovedResourceError"
231264
232265 /projects/list :
233266 get :
@@ -265,11 +298,16 @@ paths:
265298 Filter projects by the owner's username.
266299
267300 Defaults to the authenticated user if not specified. Use `*` to include projects from all users.
301+ Historical usernames are accepted and transparently normalized to the canonical username.
268302 in : query
269303 schema :
270304 $ref : " #/components/schemas/Project/properties/owner"
271305 - name : remixedFrom
272- description : Filter remixed projects by the full name of the source project or project release.
306+ description : |
307+ Filter remixed projects by the full name of the source project or project release.
308+
309+ Historical project or project release routes are accepted and transparently normalized to the canonical
310+ route.
273311 in : query
274312 schema :
275313 oneOf :
@@ -287,8 +325,16 @@ paths:
287325 in : query
288326 schema :
289327 $ref : " #/components/schemas/Project/properties/visibility"
328+ - name : type
329+ description : Filter projects by project type.
330+ in : query
331+ schema :
332+ $ref : " #/components/schemas/Project/properties/type"
290333 - name : liker
291- description : Filter projects liked by the specified user.
334+ description : |
335+ Filter projects liked by the specified user.
336+
337+ Historical usernames are accepted and transparently normalized to the canonical username.
292338 in : query
293339 schema :
294340 $ref : " #/components/schemas/User/properties/username"
@@ -379,6 +425,8 @@ paths:
379425 application/json :
380426 schema :
381427 $ref : " #/components/schemas/Project"
428+ " 301 " :
429+ $ref : " #/components/responses/MovedPermanently"
382430 patch :
383431 tags :
384432 - Projects
@@ -429,6 +477,8 @@ paths:
429477 application/json :
430478 schema :
431479 $ref : " #/components/schemas/Project"
480+ " 409 " :
481+ $ref : " #/components/responses/ResourceMoved"
432482 delete :
433483 tags :
434484 - Projects
@@ -450,6 +500,8 @@ paths:
450500 responses :
451501 " 204 " :
452502 description : Successfully deleted the project.
503+ " 409 " :
504+ $ref : " #/components/responses/ResourceMoved"
453505
454506 /project/{owner}/{name}/view :
455507 post :
@@ -473,6 +525,8 @@ paths:
473525 responses :
474526 " 204 " :
475527 description : Successfully recorded the project view.
528+ " 409 " :
529+ $ref : " #/components/responses/ResourceMoved"
476530
477531 /project/{owner}/{name}/liking :
478532 post :
@@ -496,6 +550,8 @@ paths:
496550 responses :
497551 " 204 " :
498552 description : Successfully liked the project.
553+ " 409 " :
554+ $ref : " #/components/responses/ResourceMoved"
499555 get :
500556 tags :
501557 - Projects
@@ -519,6 +575,8 @@ paths:
519575 description : The project is liked by the authenticated user.
520576 " 404 " :
521577 description : The project is not liked by the authenticated user.
578+ " 301 " :
579+ $ref : " #/components/responses/MovedPermanently"
522580 delete :
523581 tags :
524582 - Projects
@@ -540,6 +598,8 @@ paths:
540598 responses :
541599 " 204 " :
542600 description : Successfully unliked the project.
601+ " 409 " :
602+ $ref : " #/components/responses/ResourceMoved"
543603
544604 /project-release :
545605 post :
@@ -558,6 +618,8 @@ paths:
558618 - description
559619 properties :
560620 projectFullName :
621+ description : |
622+ Historical project routes return `40901` with a `canonical` payload.
561623 $ref : " #/components/schemas/ProjectRelease/properties/projectFullName"
562624 name :
563625 $ref : " #/components/schemas/ProjectRelease/properties/name"
@@ -572,6 +634,17 @@ paths:
572634 application/json :
573635 schema :
574636 $ref : " #/components/schemas/ProjectRelease"
637+ " 409 " :
638+ description : |
639+ Returned when `projectFullName` references a historical project route.
640+
641+ The response includes a `canonical` payload for `projectFullName`.
642+
643+ Clients may update the request and resubmit it explicitly.
644+ content :
645+ application/json :
646+ schema :
647+ $ref : " #/components/schemas/MovedResourceError"
575648
576649 /project-releases/list :
577650 get :
@@ -582,7 +655,10 @@ paths:
582655 security : []
583656 parameters :
584657 - name : projectFullName
585- description : Filter releases by the full name of the associated project.
658+ description : |
659+ Filter releases by the full name of the associated project.
660+
661+ Historical project routes are accepted and transparently normalized to the canonical route.
586662 in : query
587663 schema :
588664 $ref : " #/components/schemas/ProjectRelease/properties/projectFullName"
@@ -650,6 +726,8 @@ paths:
650726 application/json :
651727 schema :
652728 $ref : " #/components/schemas/ProjectRelease"
729+ " 301 " :
730+ $ref : " #/components/responses/MovedPermanently"
653731
654732 /asset :
655733 post :
@@ -746,6 +824,7 @@ paths:
746824 Filter assets by owner's username.
747825
748826 Defaults to the authenticated user if not specified. Use `*` to include assets from all users.
827+ Historical usernames are accepted and transparently normalized to the canonical username.
749828 in : query
750829 schema :
751830 $ref : " #/components/schemas/User/properties/username"
@@ -1041,6 +1120,7 @@ paths:
10411120 Filter courses by the owner's username.
10421121
10431122 Defaults to the authenticated user if not specified. Use `*` to include courses from all users.
1123+ Historical usernames are accepted and transparently normalized to the canonical username.
10441124 in : query
10451125 schema :
10461126 $ref : " #/components/schemas/User/properties/username"
@@ -1234,6 +1314,7 @@ paths:
12341314 Filter course serieses by the owner's username.
12351315
12361316 Defaults to the authenticated user if not specified. Use `*` to include course series from all users.
1317+ Historical usernames are accepted and transparently normalized to the canonical username.
12371318 in : query
12381319 schema :
12391320 $ref : " #/components/schemas/User/properties/username"
@@ -2444,6 +2525,37 @@ components:
24442525 bearerFormat : JWT
24452526 description : Access token, in the format `Bearer {token}`.
24462527
2528+ responses :
2529+ MovedPermanently :
2530+ description : Requested resource moved to its canonical route.
2531+ headers :
2532+ Location :
2533+ description : Canonical route of the requested resource.
2534+ schema :
2535+ type : string
2536+ Cache-Control :
2537+ description : |
2538+ Cache policy for canonical redirects.
2539+
2540+ `no-cache` requires revalidation before reuse because historical routes may later be reused by different
2541+ resources.
2542+ schema :
2543+ type : string
2544+ example : no-cache
2545+ ResourceMoved :
2546+ description : |
2547+ Requested resource moved to its canonical route.
2548+
2549+ Returned on non-`GET` and non-`HEAD` requests.
2550+
2551+ The response includes a `canonical` payload with the canonical route.
2552+
2553+ Clients may update the request and resubmit it explicitly.
2554+ content :
2555+ application/json :
2556+ schema :
2557+ $ref : " #/components/schemas/MovedResourceError"
2558+
24472559 schemas :
24482560 Model :
24492561 type : object
@@ -2468,6 +2580,67 @@ components:
24682580 examples :
24692581 - 2006-01-02T15:04:05Z07:00
24702582
2583+ MovedResourceCanonical :
2584+ description : |
2585+ Canonical route information for a moved resource.
2586+
2587+ User routes include `path` and `username`.
2588+
2589+ Project routes include `path`, `owner`, and `name`.
2590+
2591+ Project release routes include `path`, `owner`, `name`, and `release`.
2592+ type : object
2593+ required :
2594+ - path
2595+ properties :
2596+ path :
2597+ description : Canonical route path of the requested resource.
2598+ type : string
2599+ examples :
2600+ - /project/john/NiuXiaoQi
2601+ username :
2602+ description : Canonical username of the moved user route.
2603+ type : string
2604+ examples :
2605+ - john
2606+ owner :
2607+ description : Canonical owner username of the moved project or project release route.
2608+ type : string
2609+ examples :
2610+ - john
2611+ name :
2612+ description : Canonical project name of the moved project or project release route.
2613+ type : string
2614+ examples :
2615+ - NiuXiaoQi
2616+ release :
2617+ description : Canonical release name of the moved project release route.
2618+ type : string
2619+ examples :
2620+ - v1.2.3
2621+
2622+ MovedResourceError :
2623+ description : Error payload for a moved resource route.
2624+ type : object
2625+ required :
2626+ - code
2627+ - msg
2628+ - canonical
2629+ properties :
2630+ code :
2631+ description : Stable error code for moved resources.
2632+ type : integer
2633+ format : int32
2634+ enum :
2635+ - 40901
2636+ msg :
2637+ description : Human-readable moved resource error message.
2638+ type : string
2639+ enum :
2640+ - Resource moved
2641+ canonical :
2642+ $ref : " #/components/schemas/MovedResourceCanonical"
2643+
24712644 Visibility :
24722645 description : Visibility setting for resources.
24732646 type : string
@@ -2607,6 +2780,16 @@ components:
26072780 type : string
26082781 examples :
26092782 - NiuXiaoQi
2783+ type :
2784+ description : |
2785+ Type of the project.
2786+
2787+ When omitted in legacy data, it should be interpreted as `game` for backward compatibility.
2788+ type : string
2789+ enum :
2790+ - game
2791+ examples :
2792+ - game
26102793 displayName :
26112794 description : Display name of the project.
26122795 type : string
0 commit comments