From def50a6ce67d774023897dcffd21da1146d46a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Thu, 7 Sep 2023 11:37:26 +0200 Subject: [PATCH 1/2] Fix api token schema --- src/lib/openapi/spec/api-token-schema.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/lib/openapi/spec/api-token-schema.ts b/src/lib/openapi/spec/api-token-schema.ts index 162d2cd4246c..3a5ed742c87f 100644 --- a/src/lib/openapi/spec/api-token-schema.ts +++ b/src/lib/openapi/spec/api-token-schema.ts @@ -5,14 +5,7 @@ export const apiTokenSchema = { $id: '#/components/schemas/apiTokenSchema', type: 'object', additionalProperties: false, - required: [ - 'secret', - 'tokenName', - 'type', - 'project', - 'projects', - 'createdAt', - ], + required: ['secret', 'tokenName', 'type', 'createdAt'], description: 'An overview of an [Unleash API token](https://docs.getunleash.io/reference/api-tokens-and-client-keys).', properties: { From 4730afb6f466d34e5655165710379c1af3cd8a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Thu, 7 Sep 2023 11:49:39 +0200 Subject: [PATCH 2/2] Snapshot updated --- .../api-token-schema.test.ts.snap | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/lib/openapi/spec/__snapshots__/api-token-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/api-token-schema.test.ts.snap index d1a3a22ec077..f5fa5d3a98a0 100644 --- a/src/lib/openapi/spec/__snapshots__/api-token-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/api-token-schema.test.ts.snap @@ -30,24 +30,6 @@ exports[`apiTokenSchema empty 1`] = ` }, "schemaPath": "#/required", }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'project'", - "params": { - "missingProperty": "project", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'projects'", - "params": { - "missingProperty": "projects", - }, - "schemaPath": "#/required", - }, { "instancePath": "", "keyword": "required",