From 8c63654cb72cd93cde0d19db92666d8eb7e1a206 Mon Sep 17 00:00:00 2001 From: Robert Sese <734194+rsese@users.noreply.github.com> Date: Mon, 9 Jun 2025 10:21:28 -0500 Subject: [PATCH 1/2] fix sourceRepos arg in openapi update-files script (#55977) --- src/rest/scripts/update-files.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest/scripts/update-files.ts b/src/rest/scripts/update-files.ts index 67d20cd6bba4..26e731ce62c4 100755 --- a/src/rest/scripts/update-files.ts +++ b/src/rest/scripts/update-files.ts @@ -50,7 +50,7 @@ program `The source repositories to get the dereferenced files from. When the source repo is ${REST_API_DESCRIPTION_ROOT}, the bundler is not run to generate the source dereferenced OpenAPI files because the ${REST_API_DESCRIPTION_ROOT} repo already contains them.`, ) .choices(['github', REST_API_DESCRIPTION_ROOT, MODELS_GATEWAY_ROOT]) - .default('github', 'github'), + .default(['github', MODELS_GATEWAY_ROOT]), ) .option( '-v --versions [VERSIONS...]', From 09e8b9f4150b71c91f7a3c6a12b6f96a17c28d3a Mon Sep 17 00:00:00 2001 From: Robert Sese <734194+rsese@users.noreply.github.com> Date: Mon, 9 Jun 2025 11:24:25 -0500 Subject: [PATCH 2/2] openapi update-files script fix, should be `includes` plural (#55985) --- src/rest/scripts/update-files.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest/scripts/update-files.ts b/src/rest/scripts/update-files.ts index 26e731ce62c4..c3ff19c1188b 100755 --- a/src/rest/scripts/update-files.ts +++ b/src/rest/scripts/update-files.ts @@ -236,7 +236,7 @@ async function validateInputParameters(): Promise { // The `--decorate-only` option cannot be used // with the `--include-deprecated` or `--include-unpublished` options - if ((includeDeprecated || includeUnpublished) && !sourceRepos.include('github')) { + if ((includeDeprecated || includeUnpublished) && !sourceRepos.includes('github')) { const errorMsg = `🛑 You cannot use the decorate-only option with include-unpublished or include-deprecated because the include-unpublished and include-deprecated options are only available when running the bundler. The decorate-only option skips running the bundler.\nPlease reach out to #docs-engineering if a new use case should be supported.` throw new Error(errorMsg) }