Skip to content

Commit bf22f96

Browse files
V1NAY8sethmlarson
authored andcommitted
[8.0] Skip '$body' key when fetching response attributes
1 parent aad778f commit bf22f96

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

dev-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ isort
1515
black
1616
twine
1717
build
18+
nox
1819

1920
# No wheels for Python 3.10 yet!
2021
numpy; python_version<"3.10"

test_elasticsearch/test_server/test_rest_api_spec.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,11 @@ def _lookup(self, path):
467467
for step in path.split("."):
468468
if not step:
469469
continue
470+
# We check body again to handle E.g. '$body.$backing_index.data_stream'
471+
if step.startswith("$body"):
472+
continue
470473
step = step.replace("\1", ".")
471474
step = self._resolve(step)
472-
473475
if (
474476
isinstance(step, string_types)
475477
and step.isdigit()

0 commit comments

Comments
 (0)