Skip to content

Fix effective_mapping field to remove _doc wrapper in data stream API responses#7

Open
augment-app-staging[bot] wants to merge 1 commit intomainfrom
eval-ec9f7915
Open

Fix effective_mapping field to remove _doc wrapper in data stream API responses#7
augment-app-staging[bot] wants to merge 1 commit intomainfrom
eval-ec9f7915

Conversation

@augment-app-staging
Copy link

Summary

This PR fixes the effective_mapping field in the get data stream API response which had a _doc wrapper at the top level that doesn't match the specification.

Changes

  • Modified DataStream.getEffectiveMappings() to strip the _doc wrapper from the merged mapping before returning it
  • Updated YAML REST tests to expect the correct format without the _doc wrapper
  • All unit tests and YAML REST tests pass with the updated format

Details

The fix ensures that effective_mappings now returns:

{"properties": {...}}

instead of:

{"_doc": {"properties": {...}}}

This aligns the response structure with the API specification and unit test expectations.

Testing

All tests pass:

  • GetDataStreamMappingsActionTests
  • GetDataStreamActionTests
  • DataStreamTests
  • UpdateDataStreamMappingsActionResponseTests
  • ✅ YAML REST tests for data stream mappings

Related

Note: This PR was automatically created by Augment Agent. Please review carefully before merging.

… responses

The effective_mapping field in the get data stream API response was incorrectly
including a _doc wrapper at the top level, which doesn't match the specification.

Changes:
- Modified DataStream.getEffectiveMappings() to strip the _doc wrapper from the
  merged mapping before returning it
- Updated YAML REST tests to expect the correct format without the _doc wrapper
- All unit tests and YAML REST tests pass with the updated format

The fix ensures that effective_mappings now returns:
  {"properties": {...}}
instead of:
  {"_doc": {"properties": {...}}}

This aligns the response structure with the API specification and unit test
expectations.

Fixes issue reported in: https://augment-wic8570.slack.com/archives/C0AG2MXKEQJ/p1772239116341799
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.

0 participants