-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixing paths, deleting not necessary code, adding validate query api …
…specs Signed-off-by: Tokesh <[email protected]>
- Loading branch information
Showing
6 changed files
with
274 additions
and
313 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,185 +0,0 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test mappings endpoints. | ||
prologues: | ||
- path: /{index} | ||
method: PUT | ||
parameters: | ||
index: games | ||
- path: /{index} | ||
method: PUT | ||
parameters: | ||
index: movies | ||
request: | ||
payload: | ||
mappings: | ||
properties: | ||
director: | ||
type: text | ||
year: | ||
type: integer | ||
location: | ||
type: ip | ||
ignore_malformed: true | ||
epilogues: | ||
- path: /movies,games | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Get mappings for an index. | ||
path: /{index}/_mapping | ||
method: GET | ||
parameters: | ||
index: movies | ||
response: | ||
status: 200 | ||
payload: | ||
movies: | ||
mappings: | ||
properties: | ||
director: | ||
type: text | ||
year: | ||
type: integer | ||
- synopsis: Get mappings for multiple indexes. | ||
path: /{index}/_mapping | ||
method: GET | ||
parameters: | ||
index: movies,games | ||
response: | ||
status: 200 | ||
payload: | ||
movies: | ||
mappings: | ||
properties: | ||
director: | ||
type: text | ||
year: | ||
type: integer | ||
games: | ||
mappings: {} | ||
- synopsis: Update mapping for an index. | ||
path: /{index}/_mapping | ||
method: PUT | ||
parameters: | ||
index: movies | ||
allow_no_indices: true | ||
expand_wildcards: all | ||
ignore_unavailable: true | ||
timeout: 10s | ||
write_index_only: true | ||
request: | ||
payload: | ||
dynamic: 'true' | ||
properties: | ||
producer: | ||
type: text | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Update mapping for an index (cluster_manager_timeout). | ||
path: /{index}/_mapping | ||
method: PUT | ||
version: '>= 2.0' | ||
parameters: | ||
index: movies | ||
cluster_manager_timeout: 1s | ||
request: | ||
payload: | ||
properties: | ||
producer: | ||
type: text | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Update mapping for an index with setting dynamic to false. | ||
path: /{index}/_mapping | ||
method: PUT | ||
parameters: | ||
index: movies | ||
allow_no_indices: true | ||
expand_wildcards: all | ||
ignore_unavailable: true | ||
timeout: 10s | ||
write_index_only: true | ||
request: | ||
payload: | ||
dynamic: 'false' | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Update mapping for an index with setting dynamic to strict. | ||
path: /{index}/_mapping | ||
method: PUT | ||
parameters: | ||
index: movies | ||
allow_no_indices: true | ||
expand_wildcards: all | ||
ignore_unavailable: true | ||
timeout: 10s | ||
write_index_only: true | ||
request: | ||
payload: | ||
dynamic: strict | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Update mapping for an index with setting dynamic to strict_allow_templates. | ||
version: '>= 2.16' | ||
path: /{index}/_mapping | ||
method: PUT | ||
parameters: | ||
index: movies | ||
allow_no_indices: true | ||
expand_wildcards: all | ||
ignore_unavailable: true | ||
timeout: 10s | ||
write_index_only: true | ||
request: | ||
payload: | ||
dynamic: strict_allow_templates | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Add new fields to index mapping. | ||
path: /{index}/_mapping | ||
method: POST | ||
parameters: | ||
index: movies | ||
request: | ||
payload: | ||
properties: | ||
genre: | ||
type: text | ||
rating: | ||
type: float | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Get specific field mappings for an index. | ||
path: /{index}/_mapping/field/{fields} | ||
method: GET | ||
parameters: | ||
index: movies | ||
fields: director,year | ||
response: | ||
status: 200 | ||
payload: | ||
movies: | ||
mappings: | ||
year: | ||
full_name: year | ||
mapping: | ||
year: | ||
type: integer | ||
director: | ||
full_name: director | ||
mapping: | ||
director: | ||
type: text | ||
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,61 @@ | ||
$schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test specific field mappings endpoints. | ||
prologues: | ||
- path: /{index} | ||
method: PUT | ||
parameters: | ||
index: movies | ||
request: | ||
payload: | ||
mappings: | ||
properties: | ||
director: | ||
type: text | ||
year: | ||
type: integer | ||
location: | ||
type: ip | ||
ignore_malformed: true | ||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Add new fields to index mapping. | ||
path: /{index}/_mapping | ||
method: POST | ||
parameters: | ||
index: movies | ||
request: | ||
payload: | ||
properties: | ||
genre: | ||
type: text | ||
rating: | ||
type: float | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Get specific field mappings for an index. | ||
path: /{index}/_mapping/field/{fields} | ||
method: GET | ||
parameters: | ||
index: movies | ||
fields: director,year | ||
response: | ||
status: 200 | ||
payload: | ||
movies: | ||
mappings: | ||
year: | ||
full_name: year | ||
mapping: | ||
year: | ||
type: integer | ||
director: | ||
full_name: director | ||
mapping: | ||
director: | ||
type: text |
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,148 @@ | ||
$schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test mappings endpoints. | ||
prologues: | ||
- path: /{index} | ||
method: PUT | ||
parameters: | ||
index: games | ||
- path: /{index} | ||
method: PUT | ||
parameters: | ||
index: movies | ||
request: | ||
payload: | ||
mappings: | ||
properties: | ||
director: | ||
type: text | ||
year: | ||
type: integer | ||
location: | ||
type: ip | ||
ignore_malformed: true | ||
epilogues: | ||
- path: /movies,games | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Get mappings for an index. | ||
path: /{index}/_mapping | ||
method: GET | ||
parameters: | ||
index: movies | ||
response: | ||
status: 200 | ||
payload: | ||
movies: | ||
mappings: | ||
properties: | ||
director: | ||
type: text | ||
year: | ||
type: integer | ||
- synopsis: Get mappings for multiple indexes. | ||
path: /{index}/_mapping | ||
method: GET | ||
parameters: | ||
index: movies,games | ||
response: | ||
status: 200 | ||
payload: | ||
movies: | ||
mappings: | ||
properties: | ||
director: | ||
type: text | ||
year: | ||
type: integer | ||
games: | ||
mappings: {} | ||
- synopsis: Update mapping for an index. | ||
path: /{index}/_mapping | ||
method: PUT | ||
parameters: | ||
index: movies | ||
allow_no_indices: true | ||
expand_wildcards: all | ||
ignore_unavailable: true | ||
timeout: 10s | ||
write_index_only: true | ||
request: | ||
payload: | ||
dynamic: 'true' | ||
properties: | ||
producer: | ||
type: text | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Update mapping for an index (cluster_manager_timeout). | ||
path: /{index}/_mapping | ||
method: PUT | ||
version: '>= 2.0' | ||
parameters: | ||
index: movies | ||
cluster_manager_timeout: 1s | ||
request: | ||
payload: | ||
properties: | ||
producer: | ||
type: text | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Update mapping for an index with setting dynamic to false. | ||
path: /{index}/_mapping | ||
method: PUT | ||
parameters: | ||
index: movies | ||
allow_no_indices: true | ||
expand_wildcards: all | ||
ignore_unavailable: true | ||
timeout: 10s | ||
write_index_only: true | ||
request: | ||
payload: | ||
dynamic: 'false' | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Update mapping for an index with setting dynamic to strict. | ||
path: /{index}/_mapping | ||
method: PUT | ||
parameters: | ||
index: movies | ||
allow_no_indices: true | ||
expand_wildcards: all | ||
ignore_unavailable: true | ||
timeout: 10s | ||
write_index_only: true | ||
request: | ||
payload: | ||
dynamic: strict | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Update mapping for an index with setting dynamic to strict_allow_templates. | ||
version: '>= 2.16' | ||
path: /{index}/_mapping | ||
method: PUT | ||
parameters: | ||
index: movies | ||
allow_no_indices: true | ||
expand_wildcards: all | ||
ignore_unavailable: true | ||
timeout: 10s | ||
write_index_only: true | ||
request: | ||
payload: | ||
dynamic: strict_allow_templates | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true |
Oops, something went wrong.