Fix BDD test lookup to handle oneOf wrappers for array indexing#3543
Merged
archana-asokan merged 1 commit intodatadog-api-spec/generated/5141from Mar 2, 2026
Conversation
When a oneOf schema wraps an array type, the World.lookup method needs to unwrap the getActualInstance() before casting to List. This fixes ClassCastException when BDD steps navigate paths like group_by[0].facet where group_by is now a oneOf wrapper. This matches the spec change in datadog-api-spec PR #5141.
c834d2f
into
datadog-api-spec/generated/5141
6 of 7 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a oneOf schema wraps an array type, the World.lookup method needs to unwrap the getActualInstance() before casting to List. This fixes ClassCastException when BDD steps navigate paths like group_by[0].facet where group_by is now a oneOf wrapper.
This matches the spec change in datadog-api-spec PR #5141.
What does this PR do?
Additional Notes
Review checklist
Please check relevant items below:
This PR includes all newly recorded cassettes for any modified tests.
This PR does not rely on API client schema changes.
Or, this PR relies on API schema changes and this is a Draft PR that includes tests.