[7.x] Backport overrides for typeless APIs

This commit is contained in:
Seth Michael Larson
2020-05-26 08:23:21 -05:00
committed by Seth Michael Larson
parent a3e103b00e
commit 1773bd17be
13 changed files with 408 additions and 224 deletions
@@ -1 +0,0 @@
single_doc_op
@@ -0,0 +1,9 @@
{% extends "base" %}
{% block request %}
if doc_type in SKIP_IN_PATH:
path = _make_path(index, "_create", id)
else:
path = _make_path(index, doc_type, id, "_create")
return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers, body=body)
{% endblock %}
@@ -1 +0,0 @@
single_doc_op
@@ -0,0 +1,7 @@
{% extends "base" %}
{% block request %}
if doc_type in SKIP_IN_PATH:
doc_type = "_doc"
{{ super()|trim }}
{% endblock %}
@@ -1 +0,0 @@
single_doc_op
@@ -0,0 +1,7 @@
{% extends "base" %}
{% block request %}
if doc_type in SKIP_IN_PATH:
doc_type = "_doc"
{{ super()|trim }}
{% endblock %}
@@ -1 +0,0 @@
single_doc_op
@@ -0,0 +1,9 @@
{% extends "base" %}
{% block request %}
if doc_type in SKIP_IN_PATH:
path = _make_path(index, "_explain", id)
else:
path = _make_path(index, doc_type, id, "_explain")
return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers, body=body)
{% endblock %}
-1
View File
@@ -1 +0,0 @@
single_doc_op
+7
View File
@@ -0,0 +1,7 @@
{% extends "base" %}
{% block request %}
if doc_type in SKIP_IN_PATH:
doc_type = "_doc"
{{ super()|trim }}
{% endblock %}
@@ -1 +0,0 @@
single_doc_op
@@ -0,0 +1,9 @@
{% extends "base" %}
{% block request %}
if doc_type in SKIP_IN_PATH:
path = _make_path(index, "_source", id)
else:
path = _make_path(index, doc_type, id, "_source")
return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers)
{% endblock %}
@@ -0,0 +1,9 @@
{% extends "base" %}
{% block request %}
if doc_type in SKIP_IN_PATH:
path = _make_path(index, "_mtermvectors")
else:
path = _make_path(index, doc_type, "_mtermvectors")
return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers, body=body)
{% endblock %}
@@ -1,8 +0,0 @@
{% extends "base" %}
{% block request %}
if doc_type in SKIP_IN_PATH:
doc_type = "_doc"
{{ super()|trim }}
{% endblock %}
@@ -1 +0,0 @@
single_doc_op
@@ -0,0 +1,9 @@
{% extends "base" %}
{% block request %}
if doc_type in SKIP_IN_PATH:
path = _make_path(index, "_termvectors", id)
else:
path = _make_path(index, doc_type, id, "_termvectors")
return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers, body=body)
{% endblock %}
@@ -1 +0,0 @@
single_doc_op
@@ -0,0 +1,9 @@
{% extends "base" %}
{% block request %}
if doc_type in SKIP_IN_PATH:
path = _make_path(index, "_update", id)
else:
path = _make_path(index, doc_type, id, "_update")
return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers, body=body)
{% endblock %}