-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
384a1f1
commit b30f481
Showing
6 changed files
with
221 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
11 changes: 11 additions & 0 deletions
11
src/plugins/data_views/docs/openapi/components/examples/create_runtime_field_request.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
summary: Create a runtime field. | ||
value: | ||
{ | ||
"name": "runtimeFoo", | ||
"runtimeField": { | ||
"type": "long", | ||
"script": { | ||
"source": 'emit(doc["foo"].value)' | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/plugins/data_views/docs/openapi/components/examples/create_runtime_field_response.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
summary: The API returns created runtime field object array and updated data view object. | ||
value: | ||
{ | ||
"data_view": {...}, | ||
"fields": [...] | ||
} |
This file contains 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
45 changes: 45 additions & 0 deletions
45
...lugins/data_views/docs/openapi/paths/api@data_views@data_view@{viewid}@runtime_field.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
post: | ||
summary: Creates a runtime field. | ||
operationId: createRuntimeField | ||
description: > | ||
This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. | ||
tags: | ||
- data views | ||
parameters: | ||
- $ref: '../components/headers/kbn_xsrf.yaml' | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
data_view_id: | ||
description: The ID of the data view. | ||
type: string | ||
required: true | ||
space_id: | ||
description: An identifier for the space. If space_id is not provided in the URL, the default space is used. | ||
type: string | ||
required: false | ||
examples: | ||
createRuntimeFieldRequest: | ||
$ref: '../components/examples/create_runtime_field_request.yaml' | ||
responses: | ||
'200': | ||
description: Indicates a successful call. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../components/examples/create_runtime_field_response.yaml' | ||
'400': | ||
description: Bad request | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../components/schemas/400_response.yaml' | ||
servers: | ||
- url: https://localhost:5601 | ||
|
||
servers: | ||
- url: https://localhost:5601 |