Fix CurseForge apiVersion type from number to string
This commit is contained in:
parent
58d72d06fe
commit
9bc693e3a1
@ -61,7 +61,7 @@ GET https://minecraft.curseforge.com/api/game/versions
|
||||
| `gameVersionTypeID` | int | 版本类型 ID |
|
||||
| `name` | string | 版本名称(如 `1.21.5`) |
|
||||
| `slug` | string | 版本标识(如 `1-21-5`) |
|
||||
| `apiVersion` | int \| null | API 版本号 |
|
||||
| `apiVersion` | string \| null | API 版本号 |
|
||||
|
||||
> **注意:** Game Versions 列表并非仅包含游戏版本号,而是将 Mod Loader(Forge、Fabric 等)、Environment(Client、Server)甚至 Java 版本都混在一起。具体某个版本属于哪个类型,看它的 `gameVersionTypeID`,对应 [Game Version Types API](#game-version-types-api) 中的 `id`。
|
||||
|
||||
|
||||
@ -22,8 +22,8 @@ export const GameVersionSchema = z.object({
|
||||
name: z.string(),
|
||||
/** 版本标识,如 "1-21-5" */
|
||||
slug: z.string(),
|
||||
/** API 版本号,无则为 null */
|
||||
apiVersion: z.number().int().nullable(),
|
||||
/** API 版本号,无则为 null 或空字符串 */
|
||||
apiVersion: z.string().nullable(),
|
||||
});
|
||||
export type GameVersion = z.infer<typeof GameVersionSchema>;
|
||||
// endregion
|
||||
|
||||
Loading…
Reference in New Issue
Block a user