From 712f5a681d2fbdee8d3004a3a139a506379a466e Mon Sep 17 00:00:00 2001 From: Oz Balas Date: Thu, 5 Mar 2026 10:26:30 +0200 Subject: [PATCH 1/3] ficed readme --- .github/workflows/build-docs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index 9213db03..d31e2d5f 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Wire README into v2 OpenAPI spec + run: perl -i -pe 's/Placeholder for automatic documentation injection from README\.md/\n \$ref: README.md/' v2/openapi/fb-unified-openapi.yaml - name: Build redoc for v1 run: npx @redocly/cli build-docs openapi.yaml --output index.html - name: Build redoc for v2 From f697008c7e6b4600b810d354c6a252a5ea1fa50b Mon Sep 17 00:00:00 2001 From: Oz Balas Date: Thu, 5 Mar 2026 10:43:27 +0200 Subject: [PATCH 2/3] fixed readme --- .github/workflows/build-docs.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index d31e2d5f..e35b4d61 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -11,7 +11,8 @@ jobs: steps: - uses: actions/checkout@v3 - name: Wire README into v2 OpenAPI spec - run: perl -i -pe 's/Placeholder for automatic documentation injection from README\.md/\n \$ref: README.md/' v2/openapi/fb-unified-openapi.yaml + run: | + perl -i -pe 's/Placeholder for automatic documentation injection from README\.md/\n $$ref: README.md/' v2/openapi/fb-unified-openapi.yaml - name: Build redoc for v1 run: npx @redocly/cli build-docs openapi.yaml --output index.html - name: Build redoc for v2 From b786ff07f742b89ac579e3d6b710d489882d0fe1 Mon Sep 17 00:00:00 2001 From: Oz Balas Date: Tue, 10 Mar 2026 10:40:34 +0200 Subject: [PATCH 3/3] update --- .github/workflows/build-docs.yaml | 3 --- v2/api-validator/make-unified-openapi.ts | 7 +++++++ v2/openapi/fb-unified-openapi.yaml | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index e35b4d61..9213db03 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -10,9 +10,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Wire README into v2 OpenAPI spec - run: | - perl -i -pe 's/Placeholder for automatic documentation injection from README\.md/\n $$ref: README.md/' v2/openapi/fb-unified-openapi.yaml - name: Build redoc for v1 run: npx @redocly/cli build-docs openapi.yaml --output index.html - name: Build redoc for v2 diff --git a/v2/api-validator/make-unified-openapi.ts b/v2/api-validator/make-unified-openapi.ts index 474be0d4..c90eab04 100644 --- a/v2/api-validator/make-unified-openapi.ts +++ b/v2/api-validator/make-unified-openapi.ts @@ -6,6 +6,7 @@ import { dump as dumpYaml, load as loadYaml } from 'js-yaml'; const TARGET_OPENAPI_PATH = config.getUnifiedOpenApiPathname(); const IGNORE_PATH_LABEL = 'Private'; +const README_PLACEHOLDER = 'Placeholder for automatic documentation injection from README.md'; interface OpenAPI { openapi: string; @@ -97,6 +98,12 @@ async function makeUnifiedOpenApi() { console.log(`📦 Component [\x1b[33m ${extractServiceName(openApiPath)} \x1b[0m] added`); } + // Replace placeholder with README reference (same dir as unified spec) + const description = completeOpenAPI.info?.description; + if (typeof description === 'string' && description.trim() === README_PLACEHOLDER) { + completeOpenAPI.info.description = { $ref: 'README.md' }; + } + let resultYaml: string = dumpYaml(completeOpenAPI, { noRefs: true, noCompatMode: true, diff --git a/v2/openapi/fb-unified-openapi.yaml b/v2/openapi/fb-unified-openapi.yaml index 4679ae14..cd2bca15 100644 --- a/v2/openapi/fb-unified-openapi.yaml +++ b/v2/openapi/fb-unified-openapi.yaml @@ -14,7 +14,8 @@ info: license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html - description: Placeholder for automatic documentation injection from README.md + description: + $ref: README.md tags: - name: capabilities description: Server capabilities discovery operations.