From c97294aee447ceb298b4f18bd7c2718d35bdf3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Tue, 18 Apr 2023 10:17:23 +0200 Subject: [PATCH] Fix openapi tests (#3549) ## About the changes Update tests due to fixes introduced in https://github.com/Unleash/unleash/commit/2da279b7fbda59f8d8199e4f4fdc2e86d0c1cea8 This PR removes the fixes from the exceptions' list --- src/lib/openapi/meta-schema-rules.test.ts | 4 ---- src/lib/openapi/util/openapi-tags.ts | 6 +++++- .../e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/openapi/meta-schema-rules.test.ts b/src/lib/openapi/meta-schema-rules.test.ts index 1d03c409d8..74e5a1e854 100644 --- a/src/lib/openapi/meta-schema-rules.test.ts +++ b/src/lib/openapi/meta-schema-rules.test.ts @@ -100,7 +100,6 @@ const metaRules: Rule[] = [ 'contextFieldSchema', 'createApiTokenSchema', 'createFeatureSchema', - 'createFeatureStrategySchema', 'createInvitedUserSchema', 'createUserSchema', 'emailSchema', @@ -166,7 +165,6 @@ const metaRules: Rule[] = [ 'splashSchema', 'stateSchema', 'strategiesSchema', - 'strategySchema', 'tagTypeSchema', 'tagTypesSchema', 'tagWithVersionSchema', @@ -240,7 +238,6 @@ const metaRules: Rule[] = [ 'featureMetricsSchema', 'featureSchema', 'featuresSchema', - 'featureStrategySchema', 'featureStrategySegmentSchema', 'featureTypeSchema', 'featureTypesSchema', @@ -291,7 +288,6 @@ const metaRules: Rule[] = [ 'splashSchema', 'stateSchema', 'strategiesSchema', - 'strategySchema', 'tagTypeSchema', 'tagTypesSchema', 'tagWithVersionSchema', diff --git a/src/lib/openapi/util/openapi-tags.ts b/src/lib/openapi/util/openapi-tags.ts index f83ff1ebdc..d48064d5ad 100644 --- a/src/lib/openapi/util/openapi-tags.ts +++ b/src/lib/openapi/util/openapi-tags.ts @@ -7,7 +7,11 @@ const OPENAPI_TAGS = [ description: 'Create, update, and delete [Unleash addons](https://docs.getunleash.io/addons).', }, - { name: 'Admin UI', description: 'Configure the Unleash Admin UI.' }, + { + name: 'Admin UI', + description: + 'Configure the Unleash Admin UI. Why did you enable an experimental feature?', + }, { name: 'API tokens', description: diff --git a/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap b/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap index dd66802c8d..77c759380d 100644 --- a/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap +++ b/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap @@ -9618,7 +9618,7 @@ If the provided project does not exist, the list of events will be empty.", "name": "Addons", }, { - "description": "Configure the Unleash Admin UI.", + "description": "Configure the Unleash Admin UI. Why did you enable an experimental feature?", "name": "Admin UI", }, {