Skip to content

Fix BDD test lookup to handle oneOf wrappers for array indexing#3543

Merged
archana-asokan merged 1 commit intodatadog-api-spec/generated/5141from
datadog-api-spec/test/archana.asokan/DASHB-589-group-by-fields-v2
Mar 2, 2026
Merged

Fix BDD test lookup to handle oneOf wrappers for array indexing#3543
archana-asokan merged 1 commit intodatadog-api-spec/generated/5141from
datadog-api-spec/test/archana.asokan/DASHB-589-group-by-fields-v2

Conversation

@archana-asokan
Copy link
Contributor

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.

    • The CI should be fully passing.
  • Or, this PR relies on API schema changes and this is a Draft PR that includes tests.

    • Note: CI shouldn't be run on this Draft PR, as its expected to fail without the corresponding schema changes.

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.
@archana-asokan archana-asokan requested review from a team as code owners March 2, 2026 14:09
@archana-asokan archana-asokan self-assigned this Mar 2, 2026
@archana-asokan archana-asokan added changelog/Fixed Fixed features results into a bug fix version bump dev/testing Tests related changes labels Mar 2, 2026
@archana-asokan archana-asokan merged commit c834d2f into datadog-api-spec/generated/5141 Mar 2, 2026
6 of 7 checks passed
@archana-asokan archana-asokan deleted the datadog-api-spec/test/archana.asokan/DASHB-589-group-by-fields-v2 branch March 2, 2026 14:23
@archana-asokan archana-asokan restored the datadog-api-spec/test/archana.asokan/DASHB-589-group-by-fields-v2 branch March 2, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/Fixed Fixed features results into a bug fix version bump dev/testing Tests related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant