Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f90019119
ℹ️ 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".
| case "bearer": | ||
| deserialized = tree.traverse(jp.getCodec()).readValueAs(BearerTokenAuthentication.class); | ||
| newGenericConnectorAuth.setActualInstance(deserialized); | ||
| return newGenericConnectorAuth; | ||
| case "oauth_client_credentials": |
There was a problem hiding this comment.
Align discriminator values with AuthenticationType enum
The GenericConnectorAuth discriminator switch uses values like bearer, oauth_code, and oauth_client_credentials, but the AuthenticationType enum in this module serializes to hyphenated values like bearer-token, oauth-auth-code, and oauth-client-credentials. If the API returns those enum values (or the client sends them), the switch won’t match and the deserializer falls back to schema matching, which can yield multiple matches and throw Failed deserialization for GenericConnectorAuth. Consider updating the discriminator mappings to the enum values (or vice‑versa) so responses with type: bearer-token etc. deserialize reliably.
Useful? React with 👍 / 👎.
No description provided.