From 406e7e1ea2bdeb0ebcd01252883626f9a240ecf3 Mon Sep 17 00:00:00 2001 From: Amanda Martin <290842976+amanda-vapi@users.noreply.github.com> Date: Thu, 8 Oct 2026 14:41:59 -0700 Subject: [PATCH] Correct Python SDK generation inputs --- .github/workflows/release-python-sdk.yml | 6 ++- fern/apis/api/openapi-overrides.yml | 15 ------- ...openapi-parameter-descriptions-overlay.yml | 41 ++++++++++++++++++- 3 files changed, 44 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release-python-sdk.yml b/.github/workflows/release-python-sdk.yml index 2942139e3..a5064a11b 100644 --- a/.github/workflows/release-python-sdk.yml +++ b/.github/workflows/release-python-sdk.yml @@ -69,10 +69,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v7 - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v7 + with: + package-manager-cache: false - name: Download Fern run: npm install -g fern-api diff --git a/fern/apis/api/openapi-overrides.yml b/fern/apis/api/openapi-overrides.yml index 1f464c74f..8c0094bb4 100644 --- a/fern/apis/api/openapi-overrides.yml +++ b/fern/apis/api/openapi-overrides.yml @@ -3591,13 +3591,6 @@ components: properties: provider: description: Selects Together AI as the credential provider. - CreateTrieveCredentialDTO: - title: CreateTrieveCredentialDTO - description: >- - Credentials for authenticating knowledge-base requests with Trieve. - properties: - provider: - description: Selects Trieve as the credential provider. CreateTwilioCredentialDTO: title: CreateTwilioCredentialDTO description: >- @@ -4025,8 +4018,6 @@ components: description: >- The inclusive lower creation-time boundary applied to the result set. - TrieveKnowledgeBaseImport: - title: TrieveKnowledgeBaseImport TestSuiteTestScorerAI: title: TestSuiteTestScorerAI TestSuiteTestVoice: @@ -4495,14 +4486,8 @@ components: description: >- Fields used to update a GoHighLevel contact-retrieval tool, including its spoken messages and rejection plan. - CreateTrieveKnowledgeBaseDTO: - title: CreateTrieveKnowledgeBaseDTO - TrieveKnowledgeBase: - title: TrieveKnowledgeBase CustomKnowledgeBase: title: CustomKnowledgeBase - UpdateTrieveKnowledgeBaseDTO: - title: UpdateTrieveKnowledgeBaseDTO UpdateCustomKnowledgeBaseDTO: title: UpdateCustomKnowledgeBaseDTO CreateTestSuiteTestVoiceDto: diff --git a/fern/apis/api/openapi-parameter-descriptions-overlay.yml b/fern/apis/api/openapi-parameter-descriptions-overlay.yml index cfdad8bf1..4ee7d646c 100644 --- a/fern/apis/api/openapi-parameter-descriptions-overlay.yml +++ b/fern/apis/api/openapi-parameter-descriptions-overlay.yml @@ -1,8 +1,47 @@ overlay: 1.0.0 info: - title: Document API parameters + title: Document API parameters and preserve response parsing version: 1.0.0 actions: + # Python parses undiscriminated union members in order. The preview member + # has no required fields and accepts extras, so it must follow the rerun + # member to preserve workflowId parsing. Remove first to replace the array + # without merging its members with the original schemas. + - target: $.paths['/structured-output/run'].post.responses['200'].content['application/json'].schema.oneOf + remove: true + - target: $.paths['/structured-output/run'].post.responses['200'].content['application/json'].schema + update: + oneOf: + - title: StructuredOutputRerunResponse + $ref: '#/components/schemas/StructuredOutputRerunResponse' + - title: StructuredOutputRunPreviewResponse + allOf: + - $ref: '#/components/schemas/StructuredOutputRunPreviewResponse' + - additionalProperties: + $ref: '#/components/schemas/StructuredOutputRunResult' + # These variants are present in the API's oneOf lists. Their schemas declare + # the exact discriminator values below; include them in the mappings too. + - target: $.paths['/tool'].post.requestBody.content['application/json'].schema.discriminator.mapping + update: + code: '#/components/schemas/CreateCodeToolDTO' + - target: $.paths['/tool/{id}'].patch.requestBody.content['application/json'].schema.discriminator.mapping + update: + code: '#/components/schemas/UpdateCodeToolDTO' + - target: $.paths['/tool'].get.responses['200'].content['application/json'].schema.items.discriminator.mapping + update: + ghl: '#/components/schemas/GhlTool' + - target: $.paths['/tool'].post.responses['201'].content['application/json'].schema.discriminator.mapping + update: + ghl: '#/components/schemas/GhlTool' + - target: $.paths['/tool/{id}'].get.responses['200'].content['application/json'].schema.discriminator.mapping + update: + ghl: '#/components/schemas/GhlTool' + - target: $.paths['/tool/{id}'].patch.responses['200'].content['application/json'].schema.discriminator.mapping + update: + ghl: '#/components/schemas/GhlTool' + - target: $.paths['/tool/{id}'].delete.responses['200'].content['application/json'].schema.discriminator.mapping + update: + ghl: '#/components/schemas/GhlTool' # Path parameters - target: $.paths['/assistant/{id}'].*.parameters[?(@.name == 'id' && @.in == 'path')] update: