From 5c81864cf27334a6d61710130fa9e2380e2bd0c6 Mon Sep 17 00:00:00 2001 From: Darcy Ye Date: Wed, 22 Jan 2025 15:26:22 +0800 Subject: [PATCH] chore: fix code --- .../saml-application/saml-applications.openapi.json | 8 ++++---- packages/core/src/routes/swagger/utils/general.ts | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/core/src/routes/saml-application/saml-applications.openapi.json b/packages/core/src/routes/saml-application/saml-applications.openapi.json index b95cf328ccf..de22e812703 100644 --- a/packages/core/src/routes/saml-application/saml-applications.openapi.json +++ b/packages/core/src/routes/saml-application/saml-applications.openapi.json @@ -1,14 +1,11 @@ { "tags": [ { - "name": "SAML Applications", + "name": "SAML applications", "description": "SAML (Security Assertion Markup Language) applications represent applications that use SAML protocol for single sign-on (SSO). These endpoints allow you to manage SAML applications, including their configurations and signing certificates." }, { "name": "Dev feature" - }, - { - "name": "Cloud only" } ], "paths": { @@ -93,6 +90,9 @@ }, "400": { "description": "Invalid request or OIDC error." + }, + "404": { + "description": "The SAML application was not found." } } } diff --git a/packages/core/src/routes/swagger/utils/general.ts b/packages/core/src/routes/swagger/utils/general.ts index cca3be9e268..6089933462d 100644 --- a/packages/core/src/routes/swagger/utils/general.ts +++ b/packages/core/src/routes/swagger/utils/general.ts @@ -139,9 +139,7 @@ const validateSupplementPaths = ( if ( isKeyInObject(operation, 'tags') && Array.isArray(operation.tags) && - !operation.tags.every( - (tag) => typeof tag === 'string' && [cloudOnlyTag, devFeatureTag].includes(tag) - ) + !operation.tags.every((tag) => typeof tag === 'string' && reservedTags.has(tag)) ) { throw new TypeError( `Cannot use \`tags\` in supplement document on path \`${path}\` and operation \`${method}\` except for tag \`${cloudOnlyTag}\` and \`${devFeatureTag}\`. Define tags in the document root instead.`