Skip to content

Commit c6814ea

Browse files
committed
Add examples
1 parent ba6f695 commit c6814ea

8 files changed

+40
-44
lines changed

docs/overlays/elasticsearch-shared-overlays.yaml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,9 +1358,19 @@ actions:
13581358
content:
13591359
application/json:
13601360
examples:
1361-
searchApplicationsListResponseExample1:
1362-
$ref: "../../specification/search_application/list/SearchApplicationsListResponseExample1.yaml"
1361+
getBehavioralAnalyticsCollectionsResponseExample1:
1362+
$ref: "../../specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponseExample1.yaml"
13631363
## Examples for search applications
1364+
- target: "$.paths['/_application/search_application']['get']"
1365+
description: "Add examples for get search applications operation"
1366+
update:
1367+
responses:
1368+
200:
1369+
content:
1370+
application/json:
1371+
examples:
1372+
getSearchApplicationsResponseExample1:
1373+
$ref: "../../specification/search_application/list/SearchApplicationsListResponseExample1.yaml"
13641374
- target: "$.paths['/_application/search_application/{name}']['get']"
13651375
description: "Add examples for get search application details operation"
13661376
update:
@@ -1369,7 +1379,7 @@ actions:
13691379
content:
13701380
application/json:
13711381
examples:
1372-
getSearchApplicationRequestExample1:
1382+
getSearchApplicationResponseExample1:
13731383
$ref: "../../specification/search_application/get/SearchApplicationGetResponseExample1.yaml"
13741384
- target: "$.paths['/_application/search_application/{name}']['put']"
13751385
description: "Add examples for create search application operation"
@@ -1380,3 +1390,11 @@ actions:
13801390
examples:
13811391
putSearchApplicationRequestExample1:
13821392
$ref: "../../specification/search_application/put/SearchApplicationPutRequestExample1.yaml"
1393+
- target: "$.components['requestBodies']['search_application.search']"
1394+
description: "Add example for search application search request"
1395+
update:
1396+
content:
1397+
application/json:
1398+
examples:
1399+
searchApplicationSearchRequestExample1:
1400+
$ref: "../../specification/search_application/search/SearchApplicationsSearchRequestExample1.yaml"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# summary: behavioral-analytics/apis/list-analytics-collection.asciidoc:112
2+
description: A successful response from `GET _application/analytics/my*`
3+
# type: response
4+
# response_code: ''
5+
value:
6+
"{\n \"my_analytics_collection\": {\n \"event_data_stream\": {\n \
7+
\ \"name\": \"behavioral_analytics-events-my_analytics_collection\"\n \
8+
\ }\n },\n \"my_analytics_collection2\": {\n \"event_data_stream\": {\n \
9+
\ \"name\": \"behavioral_analytics-events-my_analytics_collection2\"\n \
10+
\ }\n }\n}"
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# summary: behavioral-analytics/apis/list-analytics-collection.asciidoc:112
2-
description: A successful response from `GET _application/analytics/my*`
1+
# summary: search-application/apis/list-search-applications.asciidoc:108
2+
description: A succesful response from `GET _application/search_application?from=0&size=3&q=app*` returns the first three search applications whose names start with `app`.
33
# type: response
44
# response_code: ''
55
value:
6-
"{\n \"my_analytics_collection\": {\n \"event_data_stream\": {\n \
7-
\ \"name\": \"behavioral_analytics-events-my_analytics_collection\"\n \
8-
\ }\n },\n \"my_analytics_collection2\": {\n \"event_data_stream\": {\n \
9-
\ \"name\": \"behavioral_analytics-events-my_analytics_collection2\"\n \
10-
\ }\n }\n}"
6+
"{\n \"count\": 2,\n \"results\": [\n {\n \"name\": \"app-1\",\n\
7+
\ \"updated_at_millis\": 1690981129366\n },\n {\n \"name\": \"app-2\"\
8+
,\n \"updated_at_millis\": 1691501823939\n }\n ]\n}"

specification/search_application/list/SearchApplicationsListResponseExample2.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

specification/search_application/put_behavioral_analytics/autoscalingApisPutAutoscalingPolicyRequestExample1.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

specification/search_application/search/SearchApplicationsSearchRequestExample1.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
summary: search-application/apis/search-application-search.asciidoc:125
2-
method_request: POST _application/search_application/my-app/_search
3-
description: ''
4-
type: request
1+
# summary: search-application/apis/search-application-search.asciidoc:125
2+
# method_request: POST _application/search_application/my-app/_search
3+
description: Use `POST _application/search_application/my-app/_search` to run a search against a search application called `my-app` that uses a search template.
4+
# type: request
55
value:
66
"{\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\"\
77
: [\n {\"name\": \"title\", \"boost\": 5},\n {\"name\": \"description\"\

specification/search_application/search/SearchApplicationsSearchResponseExample1.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

specification/search_application/search/SearchApplicationsSearchResponseExample2.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)