From c86a9fe864c74ba42eaf89d2f96a94facd352a7a Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Thu, 29 Aug 2024 10:22:50 +0300 Subject: [PATCH] docs-util: fix removal of manually-added schemas in clean script (#8840) --- .../packages/docs-generator/src/commands/clean-oas.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/www/utils/packages/docs-generator/src/commands/clean-oas.ts b/www/utils/packages/docs-generator/src/commands/clean-oas.ts index 3a5486eee61f0..e2b5ad1679c97 100644 --- a/www/utils/packages/docs-generator/src/commands/clean-oas.ts +++ b/www/utils/packages/docs-generator/src/commands/clean-oas.ts @@ -20,6 +20,12 @@ import parseOas from "../utils/parse-oas.js" const OAS_PREFIX_REGEX = /@oas \[(?(get|post|delete))\] (?.+)/ +const ignoreSchemas = [ + "AuthResponse", + "AuthAdminSessionResponse", + "AuthStoreSessionResponse", +] + export default async function () { const oasOutputBasePath = getOasOutputBasePath() const oasOperationsPath = path.join(oasOutputBasePath, "operations") @@ -274,7 +280,10 @@ export default async function () { // clean up schemas allSchemas.forEach((schemaName) => { - if (referencedSchemas.has(schemaName)) { + if ( + referencedSchemas.has(schemaName) || + ignoreSchemas.includes(schemaName) + ) { return }