Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions docs/models/rowfilteringoperation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
value: models.RowFilteringOperationEqual = /* values here */
```

### `models.RowFilteringOperationNot1`
### `models.RowFilteringOperationNot`

```python
value: models.RowFilteringOperationNot1 = /* values here */
value: models.RowFilteringOperationNot = /* values here */
```

9 changes: 9 additions & 0 deletions docs/models/rowfilteringoperationnot.md
Original file line number Diff line number Diff line change
@@ -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 |
21 changes: 15 additions & 6 deletions overlays/python_speakeasy.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# 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:
# 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()
# 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:
$ref: "#/components/schemas/RowFilteringOperationEqual"
Comment on lines +10 to +22
25 changes: 15 additions & 10 deletions src/airbyte_api/models/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -4923,9 +4926,7 @@
ZendeskTalkCredentials,
ZendeskTalkCredentialsTypedDict,
ZendeskTalkTypedDict,
) # Pydantic models with forward references
RowFilteringOperationNot1.model_rebuild()

)

__all__ = [
"APIAccessToken",
Expand Down Expand Up @@ -7088,8 +7089,8 @@
"RowFilteringOperation",
"RowFilteringOperationEqual",
"RowFilteringOperationEqualTypedDict",
"RowFilteringOperationNot1",
"RowFilteringOperationNot1TypedDict",
"RowFilteringOperationNot",
"RowFilteringOperationNotTypedDict",
"RowFilteringOperationType",
"RowFilteringOperationTypedDict",
"Rss",
Expand Down Expand Up @@ -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",
Expand Down
16 changes: 7 additions & 9 deletions src/airbyte_api/models/rowfilteringoperation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
]
24 changes: 24 additions & 0 deletions src/airbyte_api/models/rowfilteringoperationnot.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Old rowfilteringoperationnot_1.py file not deleted — dead code left behind

The old file src/airbyte_api/models/rowfilteringoperationnot_1.py still exists on disk but is no longer imported or referenced by anything in the codebase. The __init__.py no longer maps RowFilteringOperationNot1 in its lazy loading dict or __all__ list. The file is harmless dead code, but it could confuse contributors. Its companion doc docs/models/rowfilteringoperationnot1.md also remains. This likely happened because Speakeasy's generation step adds/modifies files but doesn't automatically remove files from a previous generation run. Consider deleting both stale files, or adding a cleanup step to the generation pipeline.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☑️ Resolved in PR #187. Removed both stale files (rowfilteringoperationnot_1.py and rowfilteringoperationnot1.md). Confirmed zero references to RowFilteringOperationNot1 in the codebase.

Original file line number Diff line number Diff line change
@@ -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
Comment on lines +20 to +24
Loading