fix(openapi): incorrect types on some fields

This commit is contained in:
Hampus Kraft
2026-02-17 13:58:14 +00:00
parent d5abd1a7e4
commit 2db02ec255
2 changed files with 54 additions and 12 deletions

View File

@@ -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<typeof ApplicationPublicResponse
export const ApplicationsMeResponse = z.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'),
@@ -328,7 +328,7 @@ export const OAuth2AuthorizationResponse = 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'),
bot_public: z.boolean().describe('Whether the bot can be invited by anyone'),
})
.describe('The application that was authorized'),