From ece5a1a7e790c1f815f26010d3c9b7b0783a0f8c Mon Sep 17 00:00:00 2001
From: b-long <b-long@users.noreply.github.com>
Date: Fri, 13 Jun 2025 15:30:54 -0400
Subject: [PATCH 1/3] Add 'npm run gen-api-docs-all' to 'build' target

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 7d548127..eec2c2ca 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
   "scripts": {
     "docusaurus": "docusaurus",
     "start": "docusaurus start",
-    "build": "docusaurus build",
+    "build": "npm run gen-api-docs-all && docusaurus build",
     "swizzle": "docusaurus swizzle",
     "deploy": "docusaurus deploy",
     "clear": "docusaurus clear",

From fc0c5d5cee3902d8fba93fdfaf8f4f91c27f9b59 Mon Sep 17 00:00:00 2001
From: b-long <b-long@users.noreply.github.com>
Date: Fri, 13 Jun 2025 15:35:29 -0400
Subject: [PATCH 2/3] Extract 'OUTPUT_PREFIX' variable

---
 preprocessing.ts | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/preprocessing.ts b/preprocessing.ts
index 90e10773..002b02e0 100644
--- a/preprocessing.ts
+++ b/preprocessing.ts
@@ -6,6 +6,9 @@ import type * as OpenApiPlugin from "docusaurus-plugin-openapi-docs";
 // Boolean to control whether we add '[Preprocessed on' timestamp ']' to the description
 const ADD_TIMESTAMP_TO_DESCRIPTION = false;
 
+// The location prefix of built OpenAPI documentation
+const OUTPUT_PREFIX = 'docs/SDK-OpenAPI';
+
 // Read BUILD_OPENAPI_SAMPLES once
 const BUILD_OPENAPI_SAMPLES = process.env.BUILD_OPENAPI_SAMPLES === '1';
 
@@ -28,7 +31,7 @@ let openApiSpecsArray: ApiSpecDefinition[] = [
     {
         id: "Well-Known Configuration",
         specPath: "./specs/wellknownconfiguration/wellknown_configuration.openapi.yaml",
-        outputDir: "docs/SDK-OpenAPI/wellknownconfiguration",
+        outputDir: `${OUTPUT_PREFIX}/wellknownconfiguration`,
         sidebarOptions: {
             groupPathsBy: "tag",
             categoryLinkSource: "info",
@@ -37,7 +40,7 @@ let openApiSpecsArray: ApiSpecDefinition[] = [
     {
         id: "V1 Authorization",
         specPath: "./specs/authorization/authorization.openapi.yaml",
-        outputDir: "docs/SDK-OpenAPI/authorization/v1",
+        outputDir: `${OUTPUT_PREFIX}/authorization/v1`,
         // specPathModified is auto-generated if not specified
         sidebarOptions: {
             groupPathsBy: "tag",
@@ -47,7 +50,7 @@ let openApiSpecsArray: ApiSpecDefinition[] = [
     {
         id: "V2 Authorization",
         specPath: "./specs/authorization/v2/authorization.openapi.yaml",
-        outputDir: "docs/SDK-OpenAPI/authorization/v2",
+        outputDir: `${OUTPUT_PREFIX}/authorization/v2`,
         // Example of custom modified path:
         specPathModified: "./specs-processed/authorization/v2/authorization.openapi.yaml",
         sidebarOptions: {
@@ -58,7 +61,7 @@ let openApiSpecsArray: ApiSpecDefinition[] = [
     {
         id: "V1 Entity Resolution",
         specPath: "./specs/entityresolution/entity_resolution.openapi.yaml",
-        outputDir: "docs/SDK-OpenAPI/entityresolution/v1",
+        outputDir: `${OUTPUT_PREFIX}/entityresolution/v1`,
         sidebarOptions: {
             groupPathsBy: "tag",
             categoryLinkSource: "info",
@@ -67,7 +70,7 @@ let openApiSpecsArray: ApiSpecDefinition[] = [
     {
         id: "V2 Entity Resolution",
         specPath: "./specs/entityresolution/v2/entity_resolution.openapi.yaml",
-        outputDir: "docs/SDK-OpenAPI/entityresolution/v2",
+        outputDir: `${OUTPUT_PREFIX}/entityresolution/v2`,
         sidebarOptions: {
             groupPathsBy: "tag",
             categoryLinkSource: "info",
@@ -76,7 +79,7 @@ let openApiSpecsArray: ApiSpecDefinition[] = [
     {
         id: "kas",
         specPath: "./specs/kas/kas.openapi.yaml",
-        outputDir: "docs/SDK-OpenAPI/kas",
+        outputDir: `${OUTPUT_PREFIX}/kas`,
         sidebarOptions: {
             groupPathsBy: "tag",
             categoryLinkSource: "info",

From f89e896dd701cf66f6c6e5498e99b398dc98d2dd Mon Sep 17 00:00:00 2001
From: b-long <b-long@users.noreply.github.com>
Date: Fri, 13 Jun 2025 15:38:02 -0400
Subject: [PATCH 3/3] Set 'docs/OpenAPI-clients' as OUTPUT_PREFIX

---
 .gitignore       | 2 +-
 preprocessing.ts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 38ce5fd1..c6646780 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
 specs-processed/
-docs/SDK-OpenAPI/
+docs/OpenAPI-clients/
 docs/SDK-Samples/
 
 # Dependencies
diff --git a/preprocessing.ts b/preprocessing.ts
index 002b02e0..b8c12bda 100644
--- a/preprocessing.ts
+++ b/preprocessing.ts
@@ -7,7 +7,7 @@ import type * as OpenApiPlugin from "docusaurus-plugin-openapi-docs";
 const ADD_TIMESTAMP_TO_DESCRIPTION = false;
 
 // The location prefix of built OpenAPI documentation
-const OUTPUT_PREFIX = 'docs/SDK-OpenAPI';
+const OUTPUT_PREFIX = 'docs/OpenAPI-clients';
 
 // Read BUILD_OPENAPI_SAMPLES once
 const BUILD_OPENAPI_SAMPLES = process.env.BUILD_OPENAPI_SAMPLES === '1';
