feat(generated): Changes to pipes - #163
workos-sdk-automation[bot] wants to merge 4 commits into
Conversation
|
| #[serde(untagged)] | ||
| pub enum UpdateDataIntegrationApiKeyParamsBodyOneOf { | ||
| DataIntegrationsUpsertApiKeyRequest(DataIntegrationsUpsertApiKeyRequest), | ||
| ReauthorizeDataIntegrationsUpsertApiKeyRequest(ReauthorizeDataIntegrationsUpsertApiKeyRequest), | ||
| DataIntegrationsUpsertApiKeyRequest2(DataIntegrationsUpsertApiKeyRequest2), |
There was a problem hiding this comment.
Connection selector gets dropped
When a caller deserializes an API-key reauthorization body containing connected_account_id, this untagged union selects the first variant because it accepts the required fields and ignores the extra selector and intent. The client then sends a body without those fields, so the request can rotate the compatibility connection instead of the selected one. The client-credentials union below has the same problem.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/models/_unions.rs
Line: 72-76
Comment:
**Connection selector gets dropped**
When a caller deserializes an API-key reauthorization body containing `connected_account_id`, this untagged union selects the first variant because it accepts the required fields and ignores the extra selector and intent. The client then sends a body without those fields, so the request can rotate the compatibility connection instead of the selected one. The client-credentials union below has the same problem.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| .and(path_matcher("/data-integrations/test_id/api-key")) | ||
| .respond_with( |
There was a problem hiding this comment.
Creation bodies go unchecked
The new POST round-trip tests match only the method and path, not the JSON body. They would still pass if connection_intent: add or the credential fields stopped being sent, leaving the key request contract of both creation endpoints untested. Please assert the outgoing body in these tests.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/pipes_test.rs
Line: 794-795
Comment:
**Creation bodies go unchecked**
The new POST round-trip tests match only the method and path, not the JSON body. They would still pass if `connection_intent: add` or the credential fields stopped being sent, leaving the key request contract of both creation endpoints untested. Please assert the outgoing body in these tests.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
feat(pipes): Change Pipes API surface
Triggered by workos/openapi-spec@0b0182d
BEGIN_COMMIT_OVERRIDE
feat(pipes): Change Pipes API surface (#163)
END_COMMIT_OVERRIDE