From 2db02ec25517234deceedc33649f79838c389a60 Mon Sep 17 00:00:00 2001 From: Hampus Kraft Date: Tue, 17 Feb 2026 13:58:14 +0000 Subject: [PATCH] fix(openapi): incorrect types on some fields --- fluxer_docs/api-reference/openapi.json | 54 ++++++++++++++++--- .../schema/src/domains/oauth/OAuthSchemas.tsx | 12 ++--- 2 files changed, 54 insertions(+), 12 deletions(-) diff --git a/fluxer_docs/api-reference/openapi.json b/fluxer_docs/api-reference/openapi.json index 1bc050c3..cfeebd33 100644 --- a/fluxer_docs/api-reference/openapi.json +++ b/fluxer_docs/api-reference/openapi.json @@ -68463,11 +68463,25 @@ "description": "The name of the application" }, "icon": { - "type": "null", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The icon hash of the application" }, "description": { - "type": "null", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The description of the application" }, "bot_public": { @@ -77063,11 +77077,25 @@ "description": "The name of the application" }, "icon": { - "type": "null", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The icon hash of the application" }, "description": { - "type": "null", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The description of the application" }, "bot_public": { @@ -77239,7 +77267,14 @@ "description": "The icon hash of the application" }, "description": { - "type": "null", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The description of the application" }, "bot_public": { @@ -77585,7 +77620,14 @@ "description": "The icon hash of the application" }, "description": { - "type": "null", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The description of the application" }, "redirect_uris": { diff --git a/packages/schema/src/domains/oauth/OAuthSchemas.tsx b/packages/schema/src/domains/oauth/OAuthSchemas.tsx index b30724fe..0e90a116 100644 --- a/packages/schema/src/domains/oauth/OAuthSchemas.tsx +++ b/packages/schema/src/domains/oauth/OAuthSchemas.tsx @@ -267,8 +267,8 @@ export const OAuth2MeResponse = z.object({ .object({ id: SnowflakeStringType.describe('The unique identifier of the application'), name: z.string().describe('The name of the application'), - icon: z.null().describe('The icon hash of the application'), - description: z.null().describe('The description of the application'), + icon: z.string().nullable().describe('The icon hash of the application'), + description: z.string().nullable().describe('The description of the application'), bot_public: z.boolean().describe('Whether the bot can be invited by anyone'), bot_require_code_grant: z.boolean().describe('Whether the bot requires OAuth2 code grant'), flags: createBitflagInt32Type(ApplicationFlags, 'The application flags', undefined, 'ApplicationFlags'), @@ -300,7 +300,7 @@ export const ApplicationPublicResponse = z.object({ id: SnowflakeStringType.describe('The unique identifier of the application'), name: z.string().describe('The name of the application'), icon: z.string().nullable().describe('The icon hash of the application'), - description: z.null().describe('The description of the application'), + description: z.string().nullable().describe('The description of the application'), redirect_uris: z.array(z.string()).max(20).describe('The registered redirect URIs for OAuth2'), scopes: z.array(z.string()).max(50).describe('The available OAuth2 scopes'), bot_public: z.boolean().describe('Whether the bot can be invited by anyone'), @@ -312,8 +312,8 @@ export type ApplicationPublicResponse = z.infer