Skip to content

fix: make enum value deserialization forward compatible#7

Merged
mcnulty-fp merged 1 commit into
test/INTER-1819-improvementsfrom
fix/INTER-1819-future-enum-values
Feb 27, 2026
Merged

fix: make enum value deserialization forward compatible#7
mcnulty-fp merged 1 commit into
test/INTER-1819-improvementsfrom
fix/INTER-1819-future-enum-values

Conversation

@mcnulty-fp

Copy link
Copy Markdown
Contributor
  • Configure openapi-generator with enumUnknownDefaultCase option. This adds an unused enum value to the template data/hash that can be used to substitute a placeholder value for all enums.
  • Update templates to add a UNSUPPORTED_VALUE_SDK_UPGRADE_REQUIRED value that is used when deserializing an enum value that is unknown to the SDK. This allows events with new enum values to be deserialized without failing deserialization.
  • Add unit tests to confirm enum value deserialization is forward compatible

Naming (UNSUPPORTED_VALUE_SDK_UPGRADE_REQUIRED 🤔 ) and approach definitely up for debate. LMKWYT!

- Configure openapi-generator with `enumUnknownDefaultCase` option. This
  adds an unused enum value to the template data/hash that can be
  used to substitute a placeholder value for all enums.
- Update templates to add a `UNSUPPORTED_VALUE_SDK_UPGRADE_REQUIRED`
  value that is used when deserializing an enum value that is
  unknown to the SDK. This allows events with new enum values to
  be deserialized without failing deserialization.
- Add unit tests to confirm enum value deserialization is forward
  compatible
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Following releases will be created using changesets from this PR:

java-sdk@8.0.0-rc.1

Patch Changes

  • Change root package from com.fingerprint to com.fingerprint.v4 (7ba8295)

@mcnulty-fp
mcnulty-fp merged commit 4d3f397 into test/INTER-1819-improvements Feb 27, 2026
14 of 15 checks passed
@mcnulty-fp
mcnulty-fp deleted the fix/INTER-1819-future-enum-values branch February 27, 2026 14:28
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.

2 participants