Commit 47831c3
committed
feat: Enable arbitrary input for ConnectorType enums
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.1 parent 108e239 commit 47831c3
3 files changed
+25
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
1 | 19 | | |
2 | 20 | | |
3 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
0 commit comments