Skip to content

fix: regenerate typed delivery attempt response union - #28

Open
mekilis wants to merge 1 commit into
mainfrom
fix/delivery-attempt-union-generation
Open

mekilis wants to merge 1 commit into
mainfrom
fix/delivery-attempt-union-generation

Conversation

@mekilis

@mekilis mekilis commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the Java compilation failure in SDK Generation run 42784373879. OpenAPI Generator 7.23.0's native client emits invalid Java for an inline array inside oneOf, including List<T>.class and getList<T>().

  • Normalize only the delivery-attempt array alternative in the temporary generation input into a named DeliveryAttemptList schema, with alias-model generation enabled only for that schema. The published OpenAPI schema and both JSON response shapes stay unchanged.
  • Derive a narrowly guarded POJO template from the checksum-verified generator JAR so the array alias retains ArrayList equality/hash behavior. No manual edits to generated Java.
  • Regenerate the SDK from the current upstream schema, preserving typed legacy arrays and cursor pages.
  • Add HTTP response-contract tests, collection equality tests, normalizer fixture tests, and CI that generates twice from one frozen spec and tests the regenerated client.

Validation

  • JDK 17 clean build and full test suite: 32 tests passed.
  • Four offline normalization fixture tests passed: targeted-only changes with constraints preserved, idempotence, unrelated operations unchanged, and conflicting schema names rejected.
  • Two successive regenerations produced identical Java trees.
  • git diff --check passed.

Compatibility

The upstream schema refresh adds optional parameters to generated Java methods and changes delivery-attempt getData() from a list to a typed union wrapper. Existing Java callers must update their calls, for example getDeliveryAttempts(projectId, deliveryId, null, null) and response.getData().getDeliveryAttemptList() for the legacy array, or getGetDeliveryAttempts200ResponseAllOfDataOneOf() for a page. Events/EventDeliveries generated signatures also gain current upstream filter parameters. This is source/binary incompatible and needs release/version review. No version bump or release is included.

@mekilis
mekilis marked this pull request as ready for review November 10, 2026 12:12
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.

1 participant