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: 9e5d9f4b60
ℹ️ 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.
Disambiguate auth oneOf parsing before raising multi-match
GenericConnectorAuth.from_json increments match for every schema that validates and then raises on match > 1, but multiple auth schemas are currently overlapping (for example, BearerTokenAuthentication and OtherTokenAuthentication have the same required shape, and OauthCodeAuthentication payloads also satisfy OauthClientCredentialsAuthentication because type is not constrained per model and extra="allow"). As a result, valid connector payloads from the API can fail deserialization with a "Multiple matches found" ValueError, breaking reads of connectors/operations that include these auth types.
Useful? React with 👍 / 👎.
No description provided.