From bb4c8933c9292dfc91c2638c6d86c9daee934cc2 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 05:30:18 +0000 Subject: [PATCH 1/4] experiment: overlay rename RowFilteringOperationNot to RowFilteringOperationNotCondition Co-Authored-By: AJ Steers --- .speakeasy/workflow.yaml | 6 ++---- overlays/python_speakeasy.yaml | 15 +++++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 8c59cbfc..950e91c1 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -8,10 +8,8 @@ sources: airbyte-api: inputs: - location: https://raw.githubusercontent.com/airbytehq/airbyte-platform/refs/heads/main/airbyte-api/server-api/src/main/openapi/api_sdk.yaml - # Uncomment when the overlay has real actions (empty overlays produce - # an empty document in Speakeasy CLI, which fails linting): - # overlays: - # - location: ./overlays/python_speakeasy.yaml + overlays: + - location: ./overlays/python_speakeasy.yaml registry: location: registry.speakeasyapi.dev/airbyte/airbyte-prod/my-source targets: diff --git a/overlays/python_speakeasy.yaml b/overlays/python_speakeasy.yaml index 4df51196..c8ae3eb5 100644 --- a/overlays/python_speakeasy.yaml +++ b/overlays/python_speakeasy.yaml @@ -1,13 +1,16 @@ # Speakeasy overlay for Python SDK-specific customizations. # Applied on top of the upstream API spec before code generation. -# -# This file is currently a no-op placeholder. Add overlay actions here -# when Python SDK-specific schema tweaks are needed. -# # See: https://www.speakeasy.com/docs/customize-sdks/overlays overlay: 1.0.0 info: title: Python SDK Overlay - version: 0.0.0 -actions: [] + version: 0.0.1 +actions: + # Rename RowFilteringOperationNot to avoid name collision with the + # discriminator tag "NOT" in the RowFilteringOperation union. + # Without this, Speakeasy appends a "1" suffix and generates a + # TYPE_CHECKING circular import that breaks Pydantic model_rebuild(). + - target: "$.components.schemas.RowFilteringOperationNot" + update: + x-speakeasy-name-override: RowFilteringOperationNotCondition From 816ae8e06e6018d62a69e036d3878b0d975790d0 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 05:39:52 +0000 Subject: [PATCH 2/4] experiment: overlay to break circular ref in RowFilteringOperationNot Co-Authored-By: AJ Steers --- overlays/python_speakeasy.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/overlays/python_speakeasy.yaml b/overlays/python_speakeasy.yaml index c8ae3eb5..384e9961 100644 --- a/overlays/python_speakeasy.yaml +++ b/overlays/python_speakeasy.yaml @@ -7,10 +7,13 @@ info: title: Python SDK Overlay version: 0.0.1 actions: - # Rename RowFilteringOperationNot to avoid name collision with the - # discriminator tag "NOT" in the RowFilteringOperation union. - # Without this, Speakeasy appends a "1" suffix and generates a - # TYPE_CHECKING circular import that breaks Pydantic model_rebuild(). - - target: "$.components.schemas.RowFilteringOperationNot" + # Break the circular $ref: RowFilteringOperationNot.conditions references + # RowFilteringOperation, which references RowFilteringOperationNot again. + # This causes Speakeasy to use TYPE_CHECKING imports and miss model_rebuild() + # calls for dependent models (ConnectionResponse, StreamConfigurations, etc.). + # + # Fix: point conditions.items directly at RowFilteringOperationEqual, + # removing the recursion. NOT(NOT(x)) = x, so nested NOT is redundant. + - target: "$.components.schemas.RowFilteringOperationNot.properties.conditions.items" update: - x-speakeasy-name-override: RowFilteringOperationNotCondition + $ref: "#/components/schemas/RowFilteringOperationEqual" From eb4a0a359e8660f43ae96fdb98104fe46eea4c44 Mon Sep 17 00:00:00 2001 From: "octavia-bot[bot]" Date: Tue, 23 Jun 2026 05:43:33 +0000 Subject: [PATCH 3/4] chore: regenerate SDK with Speakeasy --- docs/models/rowfilteringoperation.md | 4 +-- docs/models/rowfilteringoperationnot.md | 9 +++++++ src/airbyte_api/models/__init__.py | 25 +++++++++++-------- .../models/rowfilteringoperation.py | 16 ++++++------ .../models/rowfilteringoperationnot.py | 24 ++++++++++++++++++ 5 files changed, 57 insertions(+), 21 deletions(-) create mode 100644 docs/models/rowfilteringoperationnot.md create mode 100644 src/airbyte_api/models/rowfilteringoperationnot.py diff --git a/docs/models/rowfilteringoperation.md b/docs/models/rowfilteringoperation.md index 41336c04..3bd54eb2 100644 --- a/docs/models/rowfilteringoperation.md +++ b/docs/models/rowfilteringoperation.md @@ -9,9 +9,9 @@ value: models.RowFilteringOperationEqual = /* values here */ ``` -### `models.RowFilteringOperationNot1` +### `models.RowFilteringOperationNot` ```python -value: models.RowFilteringOperationNot1 = /* values here */ +value: models.RowFilteringOperationNot = /* values here */ ``` diff --git a/docs/models/rowfilteringoperationnot.md b/docs/models/rowfilteringoperationnot.md new file mode 100644 index 00000000..4bb12837 --- /dev/null +++ b/docs/models/rowfilteringoperationnot.md @@ -0,0 +1,9 @@ +# RowFilteringOperationNot + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `conditions` | List[[models.RowFilteringOperationEqual](../models/rowfilteringoperationequal.md)] | :heavy_check_mark: | Conditions to evaluate with the NOT operator. | +| `type` | [models.RowFilteringOperationType](../models/rowfilteringoperationtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/src/airbyte_api/models/__init__.py b/src/airbyte_api/models/__init__.py index 41de7f05..18ae114b 100644 --- a/src/airbyte_api/models/__init__.py +++ b/src/airbyte_api/models/__init__.py @@ -1,10 +1,5 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from .rowfilteringoperation import RowFilteringOperation, RowFilteringOperationTypedDict -from .rowfilteringoperationnot_1 import ( - RowFilteringOperationNot1, - RowFilteringOperationNot1TypedDict, -) from typing import Any, TYPE_CHECKING from airbyte_api.utils.dynamic_imports import lazy_getattr, lazy_dir @@ -1604,10 +1599,18 @@ RowFilteringMapperConfiguration, RowFilteringMapperConfigurationTypedDict, ) + from .rowfilteringoperation import ( + RowFilteringOperation, + RowFilteringOperationTypedDict, + ) from .rowfilteringoperationequal import ( RowFilteringOperationEqual, RowFilteringOperationEqualTypedDict, ) + from .rowfilteringoperationnot import ( + RowFilteringOperationNot, + RowFilteringOperationNotTypedDict, + ) from .rowfilteringoperationtype import RowFilteringOperationType from .salesforce import Salesforce, SalesforceTypedDict from .scheduletypeenum import ScheduleTypeEnum @@ -4923,9 +4926,7 @@ ZendeskTalkCredentials, ZendeskTalkCredentialsTypedDict, ZendeskTalkTypedDict, - ) # Pydantic models with forward references -RowFilteringOperationNot1.model_rebuild() - + ) __all__ = [ "APIAccessToken", @@ -7088,8 +7089,8 @@ "RowFilteringOperation", "RowFilteringOperationEqual", "RowFilteringOperationEqualTypedDict", - "RowFilteringOperationNot1", - "RowFilteringOperationNot1TypedDict", + "RowFilteringOperationNot", + "RowFilteringOperationNotTypedDict", "RowFilteringOperationType", "RowFilteringOperationTypedDict", "Rss", @@ -11032,8 +11033,12 @@ "ResourceRequirementsTypedDict": ".resourcerequirements", "RowFilteringMapperConfiguration": ".rowfilteringmapperconfiguration", "RowFilteringMapperConfigurationTypedDict": ".rowfilteringmapperconfiguration", + "RowFilteringOperation": ".rowfilteringoperation", + "RowFilteringOperationTypedDict": ".rowfilteringoperation", "RowFilteringOperationEqual": ".rowfilteringoperationequal", "RowFilteringOperationEqualTypedDict": ".rowfilteringoperationequal", + "RowFilteringOperationNot": ".rowfilteringoperationnot", + "RowFilteringOperationNotTypedDict": ".rowfilteringoperationnot", "RowFilteringOperationType": ".rowfilteringoperationtype", "Salesforce": ".salesforce", "SalesforceTypedDict": ".salesforce", diff --git a/src/airbyte_api/models/rowfilteringoperation.py b/src/airbyte_api/models/rowfilteringoperation.py index c4c28598..a0a09172 100644 --- a/src/airbyte_api/models/rowfilteringoperation.py +++ b/src/airbyte_api/models/rowfilteringoperation.py @@ -5,28 +5,26 @@ RowFilteringOperationEqual, RowFilteringOperationEqualTypedDict, ) +from .rowfilteringoperationnot import ( + RowFilteringOperationNot, + RowFilteringOperationNotTypedDict, +) from airbyte_api.utils import get_discriminator from pydantic import Discriminator, Tag -from typing import TYPE_CHECKING, Union +from typing import Union from typing_extensions import Annotated, TypeAliasType -if TYPE_CHECKING: - from .rowfilteringoperationnot_1 import ( - RowFilteringOperationNot1, - RowFilteringOperationNot1TypedDict, - ) - RowFilteringOperationTypedDict = TypeAliasType( "RowFilteringOperationTypedDict", - Union["RowFilteringOperationNot1TypedDict", RowFilteringOperationEqualTypedDict], + Union[RowFilteringOperationNotTypedDict, RowFilteringOperationEqualTypedDict], ) RowFilteringOperation = Annotated[ Union[ Annotated[RowFilteringOperationEqual, Tag("EQUAL")], - Annotated["RowFilteringOperationNot1", Tag("NOT")], + Annotated[RowFilteringOperationNot, Tag("NOT")], ], Discriminator(lambda m: get_discriminator(m, "type", "type")), ] diff --git a/src/airbyte_api/models/rowfilteringoperationnot.py b/src/airbyte_api/models/rowfilteringoperationnot.py new file mode 100644 index 00000000..9cbca8a5 --- /dev/null +++ b/src/airbyte_api/models/rowfilteringoperationnot.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .rowfilteringoperationequal import ( + RowFilteringOperationEqual, + RowFilteringOperationEqualTypedDict, +) +from .rowfilteringoperationtype import RowFilteringOperationType +from airbyte_api.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class RowFilteringOperationNotTypedDict(TypedDict): + conditions: List[RowFilteringOperationEqualTypedDict] + r"""Conditions to evaluate with the NOT operator.""" + type: RowFilteringOperationType + + +class RowFilteringOperationNot(BaseModel): + conditions: List[RowFilteringOperationEqual] + r"""Conditions to evaluate with the NOT operator.""" + + type: RowFilteringOperationType From b54f2d9ade1e7559b39ca07c19681b8a5bdb29ed Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 05:53:42 +0000 Subject: [PATCH 4/4] chore: add issue reference to overlay workaround comment Co-Authored-By: AJ Steers --- overlays/python_speakeasy.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlays/python_speakeasy.yaml b/overlays/python_speakeasy.yaml index 384e9961..b82f9e5a 100644 --- a/overlays/python_speakeasy.yaml +++ b/overlays/python_speakeasy.yaml @@ -7,6 +7,9 @@ info: title: Python SDK Overlay version: 0.0.1 actions: + # Workaround for Speakeasy circular-ref model_rebuild() bug. + # See: https://github.com/airbytehq/airbyte-api-python-sdk/issues/186 + # # Break the circular $ref: RowFilteringOperationNot.conditions references # RowFilteringOperation, which references RowFilteringOperationNot again. # This causes Speakeasy to use TYPE_CHECKING imports and miss model_rebuild()