From 39ce48e048dfa281272f3e53bbe06fce6b94c194 Mon Sep 17 00:00:00 2001 From: Geoffrey Ragot Date: Mon, 1 Jun 2026 10:40:13 +0200 Subject: [PATCH] fix: strip component-level servers blocks before OpenAPI merge Component specs declare their own servers block (http://localhost:8080/) which conflicts with base.yaml during the openapi-merge. This causes every operation in the generated spec to inherit an operation-level servers block, while the root-level servers from base.yaml are lost. Add a strip step that removes servers from all component specs before the merge, so only base.yaml servers survive at root level. Co-Authored-By: Claude Opus 4.6 (1M context) --- Earthfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Earthfile b/Earthfile index d523e9d006..3edbc75a3f 100644 --- a/Earthfile +++ b/Earthfile @@ -21,7 +21,7 @@ sources: build-final-spec: FROM core+base-image - RUN apk update && apk add yarn nodejs npm jq + RUN apk update && apk add yarn nodejs npm jq yq WORKDIR /src/releases COPY releases/package.* . RUN npm install @@ -42,6 +42,9 @@ build-final-spec: COPY (reconciliation+openapi/openapi.yaml) /src/ee/reconciliation/ COPY (orchestration+openapi/openapi.yaml) /src/ee/orchestration/ + # Strip component-level servers blocks so only base.yaml servers survive the merge + RUN find /src/components /src/ee -name 'openapi.yaml' -exec yq -i 'del(.servers)' {} \; + RUN npm run build RUN jq -s '.[0] * .[1]' build/generate.json openapi-overlay.json > build/latest.json ARG version=v0.0.0