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
Open
Fix effective_mapping field to remove _doc wrapper in data stream API responses#7augment-app-staging[bot] wants to merge 1 commit intomainfrom
augment-app-staging[bot] wants to merge 1 commit intomainfrom
Conversation
… 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
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.
Summary
This PR fixes the
effective_mappingfield in the get data stream API response which had a_docwrapper at the top level that doesn't match the specification.Changes
DataStream.getEffectiveMappings()to strip the_docwrapper from the merged mapping before returning it_docwrapperDetails
The fix ensures that
effective_mappingsnow returns:{"properties": {...}}instead of:
{"_doc": {"properties": {...}}}This aligns the response structure with the API specification and unit test expectations.
Testing
All tests pass:
GetDataStreamMappingsActionTestsGetDataStreamActionTestsDataStreamTestsUpdateDataStreamMappingsActionResponseTestsRelated
Note: This PR was automatically created by Augment Agent. Please review carefully before merging.