diff options
author | Puyodead1 <puyodead@proton.me> | 2023-03-25 20:21:13 -0400 |
---|---|---|
committer | Puyodead1 <puyodead@proton.me> | 2023-04-13 15:41:23 -0400 |
commit | 0d666732c61ce98fe775bc5c34ebbef11b839ec2 (patch) | |
tree | 82ff6d043c95c446698093cf494b1b5c946883fc | |
parent | oapi: root level routes (diff) | |
download | server-0d666732c61ce98fe775bc5c34ebbef11b839ec2.tar.xz |
oapi: bug fixes
-rw-r--r-- | assets/openapi.json | 110 | ||||
-rw-r--r-- | assets/schemas.json | 1350 | ||||
-rw-r--r-- | scripts/schema.js | 2 | ||||
-rw-r--r-- | src/gateway/opcodes/LazyRequest.ts | 4 | ||||
-rw-r--r-- | src/util/interfaces/Activity.ts | 2 | ||||
-rw-r--r-- | src/util/schemas/AckBulkSchema.ts | 12 | ||||
-rw-r--r-- | src/util/schemas/IdentifySchema.ts | 6 | ||||
-rw-r--r-- | src/util/schemas/LazyRequestSchema.ts | 7 | ||||
-rw-r--r-- | src/util/schemas/MemberChangeProfileSchema.ts | 8 | ||||
-rw-r--r-- | src/util/schemas/UserProfileModifySchema.ts | 8 |
10 files changed, 481 insertions, 1028 deletions
diff --git a/assets/openapi.json b/assets/openapi.json index a45cafa2..27a2f973 100644 --- a/assets/openapi.json +++ b/assets/openapi.json @@ -35,30 +35,26 @@ "properties": { "read_states": { "type": "array", - "items": [ - { - "type": "object", - "properties": { - "channel_id": { - "type": "string" - }, - "message_id": { - "type": "string" - }, - "read_state_type": { - "type": "integer" - } + "items": { + "type": "object", + "properties": { + "channel_id": { + "type": "string" }, - "additionalProperties": false, - "required": [ - "channel_id", - "message_id", - "read_state_type" - ] - } - ], - "minItems": 1, - "maxItems": 1 + "message_id": { + "type": "string" + }, + "read_state_type": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "channel_id", + "message_id", + "read_state_type" + ] + } } }, "required": [ @@ -515,13 +511,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -4474,17 +4466,12 @@ "type": "integer" }, "shard": { - "type": "array", - "items": [ - { - "type": "number" - }, - { - "type": "number" - } - ], "minItems": 2, - "maxItems": 2 + "maxItems": 2, + "type": "array", + "items": { + "type": "number" + } }, "guild_subscriptions": { "type": "boolean" @@ -4603,16 +4590,9 @@ "type": "array", "items": { "type": "array", - "items": [ - { - "type": "integer" - }, - { - "type": "integer" - } - ], - "minItems": 2, - "maxItems": 2 + "items": { + "type": "integer" + } } } }, @@ -4687,17 +4667,12 @@ "type": "string" }, "theme_colors": { - "type": "array", - "items": [ - { - "type": "integer" - }, - { - "type": "integer" - } - ], "minItems": 2, - "maxItems": 2 + "maxItems": 2, + "type": "array", + "items": { + "type": "integer" + } } } }, @@ -5472,17 +5447,12 @@ "type": "string" }, "theme_colors": { - "type": "array", - "items": [ - { - "type": "integer" - }, - { - "type": "integer" - } - ], "minItems": 2, - "maxItems": 2 + "maxItems": 2, + "type": "array", + "items": { + "type": "integer" + } } } }, diff --git a/assets/schemas.json b/assets/schemas.json index 098fbaa2..3bce63f8 100644 --- a/assets/schemas.json +++ b/assets/schemas.json @@ -4,30 +4,26 @@ "properties": { "read_states": { "type": "array", - "items": [ - { - "type": "object", - "properties": { - "channel_id": { - "type": "string" - }, - "message_id": { - "type": "string" - }, - "read_state_type": { - "type": "integer" - } + "items": { + "type": "object", + "properties": { + "channel_id": { + "type": "string" }, - "additionalProperties": false, - "required": [ - "channel_id", - "message_id", - "read_state_type" - ] - } - ], - "minItems": 1, - "maxItems": 1 + "message_id": { + "type": "string" + }, + "read_state_type": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "channel_id", + "message_id", + "read_state_type" + ] + } } }, "additionalProperties": false, @@ -627,13 +623,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -4481,13 +4473,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -8335,13 +8323,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -12184,13 +12168,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -16069,13 +16049,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -19923,13 +19899,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -23768,13 +23740,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -27616,13 +27584,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -31473,13 +31437,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -35318,13 +35278,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -39163,13 +39119,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -43027,13 +42979,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -46875,13 +46823,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -50783,13 +50727,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -54650,13 +54590,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -58317,17 +58253,12 @@ "type": "integer" }, "shard": { - "type": "array", - "items": [ - { - "type": "bigint" - }, - { - "type": "bigint" - } - ], "minItems": 2, - "maxItems": 2 + "maxItems": 2, + "type": "array", + "items": { + "type": "bigint" + } }, "guild_subscriptions": { "type": "boolean" @@ -58657,13 +58588,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -62520,13 +62447,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -66108,16 +66031,9 @@ "type": "array", "items": { "type": "array", - "items": [ - { - "type": "integer" - }, - { - "type": "integer" - } - ], - "minItems": 2, - "maxItems": 2 + "items": { + "type": "integer" + } } } }, @@ -66403,13 +66319,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -70261,13 +70173,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -73856,17 +73764,12 @@ "type": "string" }, "theme_colors": { - "type": "array", - "items": [ - { - "type": "integer" - }, - { - "type": "integer" - } - ], "minItems": 2, - "maxItems": 2 + "maxItems": 2, + "type": "array", + "items": { + "type": "integer" + } } }, "additionalProperties": false, @@ -74125,13 +74028,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -77979,13 +77878,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -81821,13 +81716,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -85774,13 +85665,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -89724,13 +89611,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -93569,13 +93452,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -97422,13 +97301,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -101268,13 +101143,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -105114,13 +104985,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -108989,13 +108856,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -112835,13 +112698,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -116680,13 +116539,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -120540,13 +120395,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -124389,13 +124240,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -128312,13 +128159,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -132157,13 +132000,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -136002,13 +135841,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -139844,13 +139679,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -143692,13 +143523,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -147550,13 +147377,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -151392,13 +151215,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -155283,13 +155102,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -159160,13 +158975,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -163002,13 +162813,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -166600,17 +166407,12 @@ "type": "string" }, "theme_colors": { - "type": "array", - "items": [ - { - "type": "integer" - }, - { - "type": "integer" - } - ], "minItems": 2, - "maxItems": 2 + "maxItems": 2, + "type": "array", + "items": { + "type": "integer" + } } }, "additionalProperties": false, @@ -166869,13 +166671,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -170825,13 +170623,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -174666,13 +174460,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -178546,13 +178336,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -182411,13 +182197,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -186331,13 +186113,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -190173,13 +189951,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -194023,13 +193797,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -197863,13 +197633,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -201709,13 +201475,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -205555,13 +205317,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -209401,13 +209159,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -213279,13 +213033,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -217129,13 +216879,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -220969,13 +220715,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -224803,13 +224545,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -228637,13 +228375,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -232471,13 +232205,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -236307,13 +236037,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -240153,13 +239879,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -243989,13 +243711,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -247825,13 +247543,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -251661,13 +251375,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -255518,13 +255228,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -259354,13 +259060,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -263225,13 +262927,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -267067,13 +266765,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -270962,13 +270656,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -274807,13 +274497,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -278681,13 +278367,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -282517,13 +282199,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -286359,13 +286037,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -290280,13 +289954,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -294116,13 +293786,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -297952,13 +297618,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -301788,13 +301450,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -305637,13 +305295,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -309479,13 +309133,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -313321,13 +312971,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -317170,13 +316816,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -321012,13 +320654,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -324848,13 +324486,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -328684,13 +328318,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -332520,13 +332150,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -336366,13 +335992,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -340208,13 +339830,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -344044,13 +343662,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -347961,13 +347575,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -351814,13 +351424,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -355668,13 +355274,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -359572,13 +359174,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -363435,13 +363033,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -367297,13 +366891,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -371166,13 +370756,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -375029,13 +374615,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -378871,13 +378453,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -382707,13 +382285,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -386577,13 +386151,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -390459,13 +390029,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -394295,13 +393861,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -398141,13 +397703,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -401983,13 +401541,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -405832,13 +405386,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -409689,13 +409239,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -413539,13 +413085,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -417393,13 +416935,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -421247,13 +420785,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -425107,13 +424641,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -428940,13 +428470,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -432874,13 +432400,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -436811,13 +436333,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -440647,13 +440165,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -444483,13 +443997,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -448319,13 +447829,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -452165,13 +451671,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -456011,13 +455513,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -459844,13 +459342,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -463689,13 +463183,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -467531,13 +467021,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -471373,13 +470859,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -475209,13 +474691,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false @@ -479057,13 +478535,9 @@ }, "size": { "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "integer" + } } }, "additionalProperties": false diff --git a/scripts/schema.js b/scripts/schema.js index bb3e9ddc..ef43d80c 100644 --- a/scripts/schema.js +++ b/scripts/schema.js @@ -135,7 +135,7 @@ function main() { definitions = { ...definitions, [name]: { ...part } }; } - modify(definitions); + // modify(definitions); fs.writeFileSync(schemaPath, JSON.stringify(definitions, null, 4)); } diff --git a/src/gateway/opcodes/LazyRequest.ts b/src/gateway/opcodes/LazyRequest.ts index 64e50d92..cde91a75 100644 --- a/src/gateway/opcodes/LazyRequest.ts +++ b/src/gateway/opcodes/LazyRequest.ts @@ -267,7 +267,9 @@ export async function onLazyRequest(this: WebSocket, { d }: Payload) { if (!Array.isArray(ranges)) throw new Error("Not a valid Array"); const member_count = await Member.count({ where: { guild_id } }); - const ops = await Promise.all(ranges.map((x) => getMembers(guild_id, x))); + const ops = await Promise.all( + ranges.map((x) => getMembers(guild_id, x as [number, number])), + ); // TODO: unsubscribe member_events that are not in op.members diff --git a/src/util/interfaces/Activity.ts b/src/util/interfaces/Activity.ts index 7654ba90..0227f242 100644 --- a/src/util/interfaces/Activity.ts +++ b/src/util/interfaces/Activity.ts @@ -36,7 +36,7 @@ export interface Activity { }; party?: { id?: string; - size?: [number]; // used to show the party's current and maximum size // TODO: array length 2 + size?: number[]; // used to show the party's current and maximum size // TODO: array length 2 }; assets?: { large_image?: string; // the id for a large asset of the activity, usually a snowflake diff --git a/src/util/schemas/AckBulkSchema.ts b/src/util/schemas/AckBulkSchema.ts index cf6dc597..5604c2fc 100644 --- a/src/util/schemas/AckBulkSchema.ts +++ b/src/util/schemas/AckBulkSchema.ts @@ -17,11 +17,9 @@ */ export interface AckBulkSchema { - read_states: [ - { - channel_id: string; - message_id: string; - read_state_type: number; // WHat is this? - }, - ]; + read_states: { + channel_id: string; + message_id: string; + read_state_type: number; // WHat is this? + }[]; } diff --git a/src/util/schemas/IdentifySchema.ts b/src/util/schemas/IdentifySchema.ts index fb48c2a4..cb967aed 100644 --- a/src/util/schemas/IdentifySchema.ts +++ b/src/util/schemas/IdentifySchema.ts @@ -109,7 +109,11 @@ export interface IdentifySchema { compress?: boolean; large_threshold?: number; largeThreshold?: number; - shard?: [bigint, bigint]; + /** + * @minItems 2 + * @maxItems 2 + */ + shard?: bigint[]; // puyo: changed from [bigint, bigint] because it breaks openapi guild_subscriptions?: boolean; capabilities?: number; client_state?: { diff --git a/src/util/schemas/LazyRequestSchema.ts b/src/util/schemas/LazyRequestSchema.ts index f69ae1f7..ee52d66c 100644 --- a/src/util/schemas/LazyRequestSchema.ts +++ b/src/util/schemas/LazyRequestSchema.ts @@ -19,7 +19,12 @@ export interface LazyRequestSchema { guild_id: string; channels?: { - [key: string]: [number, number][]; + /** + * @items.type integer + * @minItems 2 + * @maxItems 2 + */ + [key: string]: number[][]; // puyo: changed from [number, number] because it breaks openapi }; activities?: boolean; threads?: boolean; diff --git a/src/util/schemas/MemberChangeProfileSchema.ts b/src/util/schemas/MemberChangeProfileSchema.ts index e955a0f1..06505ab9 100644 --- a/src/util/schemas/MemberChangeProfileSchema.ts +++ b/src/util/schemas/MemberChangeProfileSchema.ts @@ -21,9 +21,9 @@ export interface MemberChangeProfileSchema { nick?: string; bio?: string; pronouns?: string; - - /* - * @items.type integer + /** + * @minItems 2 + * @maxItems 2 */ - theme_colors?: [number, number]; + theme_colors?: number[]; // puyo: changed from [number, number] because it breaks openapi } diff --git a/src/util/schemas/UserProfileModifySchema.ts b/src/util/schemas/UserProfileModifySchema.ts index d49fe326..6f6777dd 100644 --- a/src/util/schemas/UserProfileModifySchema.ts +++ b/src/util/schemas/UserProfileModifySchema.ts @@ -21,9 +21,9 @@ export interface UserProfileModifySchema { accent_color?: number | null; banner?: string | null; pronouns?: string; - - /* - * @items.type integer + /** + * @minItems 2 + * @maxItems 2 */ - theme_colors?: [number, number]; + theme_colors?: number[]; // puyo: changed from [number, number] because it breaks openapi } |