|
1 | 1 | # Speakeasy overlay for Python SDK-specific customizations. |
2 | 2 | # Applied on top of the upstream API spec before code generation. |
3 | 3 | # |
4 | | -# This file is currently a no-op placeholder. Add overlay actions here |
5 | | -# when Python SDK-specific schema tweaks are needed. |
6 | | -# |
7 | 4 | # See: https://www.speakeasy.com/docs/customize-sdks/overlays |
8 | 5 |
|
9 | 6 | overlay: 1.0.0 |
10 | 7 | info: |
11 | 8 | title: Python SDK Overlay |
12 | | - version: 0.0.0 |
13 | | -actions: [] |
| 9 | + version: 0.1.0 |
| 10 | +actions: |
| 11 | + # --------------------------------------------------------------------------- |
| 12 | + # Remove individual connector configuration schemas. |
| 13 | + # |
| 14 | + # The upstream spec defines ~600 source-* and ~90 destination-* schemas that |
| 15 | + # enumerate every connector's configuration fields. These schemas are only |
| 16 | + # reachable via the SourceConfiguration / DestinationConfiguration oneOf |
| 17 | + # unions. Replacing those unions with a generic typed-dict object eliminates |
| 18 | + # the need for all the individual connector models and shrinks the generated |
| 19 | + # SDK by ~600 Python files and ~1,800 doc files (~14 MB). |
| 20 | + # |
| 21 | + # Users pass configuration as a plain dict with a required sourceType / |
| 22 | + # destinationType discriminator; the API validates the full schema server-side. |
| 23 | + # --------------------------------------------------------------------------- |
| 24 | + |
| 25 | + # Replace SourceConfiguration oneOf (555 connector schemas) with generic object |
| 26 | + - target: "$.components.schemas.SourceConfiguration" |
| 27 | + update: |
| 28 | + description: >- |
| 29 | + The values required to configure the source. |
| 30 | + Must include a `sourceType` string identifying the connector (e.g. 'postgres', 'github'). |
| 31 | + Additional properties depend on the connector type; the API validates the full schema server-side. |
| 32 | + example: { sourceType: "postgres", host: "localhost", port: 5432 } |
| 33 | + oneOf: null |
| 34 | + type: object |
| 35 | + additionalProperties: true |
| 36 | + required: |
| 37 | + - sourceType |
| 38 | + properties: |
| 39 | + sourceType: |
| 40 | + type: string |
| 41 | + description: "The type of source connector." |
| 42 | + |
| 43 | + # Replace DestinationConfiguration oneOf (45 connector schemas) with generic object |
| 44 | + - target: "$.components.schemas.DestinationConfiguration" |
| 45 | + update: |
| 46 | + description: >- |
| 47 | + The values required to configure the destination. |
| 48 | + Must include a `destinationType` string identifying the connector (e.g. 'postgres', 'bigquery'). |
| 49 | + Additional properties depend on the connector type; the API validates the full schema server-side. |
| 50 | + example: { destinationType: "postgres", host: "localhost", port: 5432 } |
| 51 | + oneOf: null |
| 52 | + type: object |
| 53 | + additionalProperties: true |
| 54 | + required: |
| 55 | + - destinationType |
| 56 | + properties: |
| 57 | + destinationType: |
| 58 | + type: string |
| 59 | + description: "The type of destination connector." |
| 60 | + |
| 61 | + # Replace OAuthCredentialsConfiguration oneOf (~47 OAuth credential schemas) with generic object |
| 62 | + - target: "$.components.schemas.OAuthCredentialsConfiguration" |
| 63 | + update: |
| 64 | + description: "OAuth credentials configuration for the connector." |
| 65 | + example: { client_id: "your-client-id", client_secret: "your-client-secret" } |
| 66 | + oneOf: null |
| 67 | + type: object |
| 68 | + additionalProperties: true |
| 69 | + |
| 70 | + # Replace OAuthActorNames enum with a plain string (forward-compatible with new connectors) |
| 71 | + - target: "$.components.schemas.OAuthActorNames" |
| 72 | + update: |
| 73 | + enum: null |
| 74 | + type: string |
| 75 | + description: "The name of the OAuth-enabled connector (e.g. 'github', 'google-ads')." |
0 commit comments