Conversation
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a9f50e00d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if match > 1: | ||
| # more than 1 match | ||
| raise ValueError("Multiple matches found when deserializing the JSON string into GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. Details: " + ", ".join(error_messages)) |
There was a problem hiding this comment.
Discriminate auth schemas before oneOf match counting
In GenericConnectorAuth.from_json, payloads for token-based auth can validate against more than one schema, because BearerTokenAuthentication and OtherTokenAuthentication both accept the same shape (token + broad AuthenticationType). For valid connector responses like {"type":"bearer-token","token":"..."}, both deserializations succeed, match becomes >1, and this branch raises ValueError, which breaks deserialization for get/list connector APIs that include authentication. The oneOf selection needs to use the type discriminator (or constrain each model’s type) before applying the multi-match guard.
Useful? React with 👍 / 👎.
|
superseded by #143 |
No description provided.