Skip to content

Conversation

@awalker4
Copy link
Collaborator

@awalker4 awalker4 commented Aug 6, 2025

Use the openapi overlay file to add x-speakeasy-unknown-values to the models for SourceConnectorType and DestinationConnectorType. This allows the client to send any string outside of the enum definitions. This provides forward compatibility in the client, we can create sources with types that don't exist yet, without requiring a new client version.

Example:

This throws an error that the type is not in our enum. Now, it just warns that this is an unknown value, but it's sent to the server anyway.

res = unstructured_client.sources.create_source(
    request={
        "create_source_connector": {
            "name": "My fancy new source",
            "type": "future_source_type",
            "config": {
                ...
                ...
            }
        }
    }
)

The change will take effect when the client regenerates and uses the new overlay config. By setting
gen.yaml to 0.42.2, the new client will propagate this version change.

Use the openapi overlay file to add `x-speakeasy-unknown-values` to the models for
`SourceConnectorType` and `DestinationConnectorType`. This allows the client to send any string
outside of the enum definitions. This provides forward compatibility in the client, we can create
sources with types that don't exist yet, without requiring a new client version.

Example:

This throws an error that the type is not in our enum. Now, it just warns that this is an unknown
value, but it's sent to the server anyway.

```
res = unstructured_client.sources.create_source(
    request={
        "create_source_connector": {
            "name": "My fancy new source",
            "type": "future_source_type",
            "config": {
                ...
                ...
            }
        }
    }
)
'''

The change will take effect when the client regenerates and uses the new overlay config. By setting
`gen.yaml` to `0.42.2`, the new client will propagate this version change.
@awalker4 awalker4 requested a review from gavinchen2025 August 6, 2025 20:04
@awalker4 awalker4 enabled auto-merge (squash) August 6, 2025 20:23
@awalker4 awalker4 merged commit 9464074 into main Aug 6, 2025
13 checks passed
@awalker4 awalker4 deleted the fix/allow-arbitrary-connector-types branch August 6, 2025 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants