Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optmize: backward compatiblity for enum #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sczlog
Copy link
Collaborator

@Sczlog Sczlog commented Jun 6, 2024

  • add X_UNSUPPORTED_ENUM for enum

主要的实现逻辑是:

  1. 对每个枚举新增一项占位枚举 ${EnumName}_UNSUPPORTED_ENUM
  2. 反序列化 enum 时,如果接收到的 enum 并不属于任意已知 enum,就反序列化成占位枚举而非报错
  3. 允许使用占位枚举作为请求体的一部分,但是请求会返回 400 错误。

- add X_UNSUPPORTED_ENUM for enum
@Sczlog Sczlog force-pushed the java-sdk-2.15.1-2024-06-06T03-31-03.743Z branch from 5634ef6 to 6babaa7 Compare June 6, 2024 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant