From 0eaec9237bed953ed062407eff4b416ba98ff097 Mon Sep 17 00:00:00 2001 From: Reptapog <18347043+Reptapog@users.noreply.github.com> Date: Thu, 18 Jan 2024 22:29:06 -0800 Subject: [PATCH] cleaning up types --- types/open-api/generated/schemas.ts | 2 +- types/open-api/realm.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/open-api/generated/schemas.ts b/types/open-api/generated/schemas.ts index cf61932e..ec469b87 100644 --- a/types/open-api/generated/schemas.ts +++ b/types/open-api/generated/schemas.ts @@ -264,7 +264,7 @@ const Realm = z.object({ homepage: z.object({ blocks: z.array(UiBlock) }), settings: RealmSettings, realm_permissions: RealmPermissions, - boards: z.array(BoardSummary), + boards: z.array(z.union([LoggedInBoardSummary, BoardSummary])), }); const BoardActivitySummary = z.object({ last_post_at: z.union([z.string(), z.null()]), diff --git a/types/open-api/realm.yaml b/types/open-api/realm.yaml index 576dbc32..d16c183e 100644 --- a/types/open-api/realm.yaml +++ b/types/open-api/realm.yaml @@ -63,7 +63,9 @@ components: boards: type: array items: - $ref: "#/components/schemas/BoardSummary" + oneOf: + - $ref: "#/components/schemas/LoggedInBoardSummary" + - $ref: "#/components/schemas/BoardSummary" required: - id - slug