Skip to content

Fix force merge async response deserialization - #2148

Open
xujiantop-crypto wants to merge 1 commit into
opensearch-project:mainfrom
xujiantop-crypto:fix/forcemerge-async-response
Open

Fix force merge async response deserialization#2148
xujiantop-crypto wants to merge 1 commit into
opensearch-project:mainfrom
xujiantop-crypto:fix/forcemerge-async-response

Conversation

@xujiantop-crypto

Copy link
Copy Markdown

Description

Fix force merge response deserialization when wait_for_completion=false. The OpenAPI response now models the synchronous _shards payload and asynchronous task payload as alternatives, so generated ForcemergeResponse.shards() is nullable while synchronous responses continue to deserialize normally.

Adds regression coverage for both response shapes using the JSON-B and Jackson mappers.

Issues Resolved

Closes #2147.

Testing

  • :java-client:unitTest (616 tests, 0 failures)
  • :java-codegen:test (66 tests, 0 failures)
  • :java-client:spotlessJavaCheck
  • :java-codegen:spotlessJavaCheck

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Signed-off-by: Xu Jian <265865031+xujiantop-crypto@users.noreply.github.com>
@xujiantop-crypto
xujiantop-crypto force-pushed the fix/forcemerge-async-response branch from fbb2497 to 59cb40d Compare September 9, 2026 11:05
application/json:
schema:
allOf:
oneOf:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

[BUG] MissingRequiredPropertyException: Missing required property 'ForcemergeResponse.shards'

2 participants