You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With our library of 300+ sources and 60+ destinations, certain API endpoints should return a "configuration" that is typed to the correct source or destination class, but they don't properly deserialize into the proper classes. Instead, they attempt to deserialize into the first match alphabetically (e.g. "Airtable" instead of "Snowflake" or "MySQL").
I've worked around this by hacking a bit and getting the original raw dict object, but this has been a stumbling block for specific use cases.
Below is destination configuration. Note there is oneOf logic but no discriminator logic defined. Same for SourceConfiguration, although I'm not showing it because it is much larger.
With our library of 300+ sources and 60+ destinations, certain API endpoints should return a "configuration" that is typed to the correct source or destination class, but they don't properly deserialize into the proper classes. Instead, they attempt to deserialize into the first match alphabetically (e.g. "Airtable" instead of "Snowflake" or "MySQL").
I've worked around this by hacking a bit and getting the original raw dict object, but this has been a stumbling block for specific use cases.
Workaround logic is here:
https://github.com/airbytehq/PyAirbyte/blob/f7b88eba400d7aa768c8c370cfbac6f18dfc61c6/airbyte/_util/api_util.py#L577-L597
Speakeasy has some docs on how to set up discriminator logic here:
Example code from the docs:
In our case, the descriminating property does exist in the data as
sourceType
anddestinationType
, but it is not defined with the above syntax.Here is an example declaration which shows
sourceType
should be ready to leverage if we reference it in thedescriminator
declaration:Current it does not appear that we define any descriminator logic to
DestinationConfiguration
orSourceConfiguration
.Below is destination configuration. Note there is
oneOf
logic but no discriminator logic defined. Same forSourceConfiguration
, although I'm not showing it because it is much larger.Show/Hide
https://raw.githubusercontent.com/airbytehq/airbyte-platform/refs/heads/main/airbyte-api/server-api/src/main/openapi/api_sdk.yaml
Proposed fix
To resolve, we should add this text to the
DestinationConfiguration
declaration in the OpenAPI spec:and similarly for sources:
The text was updated successfully, but these errors were encountered: