Skip to content

Commit

Permalink
Type mapping removal for 2.0 (#52)
Browse files Browse the repository at this point in the history
* Removing type mappings for 2.0

Signed-off-by: Vacha Shah <vachshah@amazon.com>

* Remove include-type-name parameter

Signed-off-by: Vacha Shah <vachshah@amazon.com>

* Fixing tests to use correct yaml files for test inputs

Signed-off-by: Vacha Shah <vachshah@amazon.com>

* Add OpenSearch 2.0 to the test matrix

Signed-off-by: Vacha Shah <vachshah@amazon.com>

* Handling opendistro tests for yaml docs

Signed-off-by: Vacha Shah <vachshah@amazon.com>

* Addressing comments

Signed-off-by: Vacha Shah <vachshah@amazon.com>
  • Loading branch information
VachaShah authored May 27, 2022
1 parent 13da93f commit 26d5b6b
Show file tree
Hide file tree
Showing 42 changed files with 15 additions and 2,171 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
- { cluster: 'opensearch', version: '1.2.4', secured: 'false' }
- { cluster: 'opensearch', version: '1.1.0', secured: 'true' }
- { cluster: 'opensearch', version: '1.1.0', secured: 'false' }
- { cluster: 'opensearch', version: '2.0.0', secured: 'true' }
- { cluster: 'opensearch', version: '2.0.0', secured: 'false' }

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ can be `to_string()`'ed and written to disk, and this is used to create much of
1. Generate as much of the client as feasible from the REST API specs

The REST API specs contain information about
- the URL parts e.g. `{index}/{type}/_search` and variants
- the URL parts e.g. `{index}/_search` and variants
- accepted HTTP methods e.g. `GET`, `POST`
- the URL query string parameters
- whether the API accepts a body
Expand Down
17 changes: 0 additions & 17 deletions api_generator/rest_specs/bulk.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,6 @@
"description":"Default index for items which don't provide one"
}
}
},
{
"path":"/{index}/{type}/_bulk",
"methods":[
"POST",
"PUT"
],
"parts":{
"index":{
"type":"string",
"description":"Default index for items which don't provide one"
},
"type":{
"type":"string",
"description":"Default document type for items which don't provide one"
}
}
}
]
},
Expand Down
21 changes: 0 additions & 21 deletions api_generator/rest_specs/count.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,6 @@
"description":"A comma-separated list of indices to restrict the results"
}
}
},
{
"path":"/{index}/{type}/_count",
"methods":[
"POST",
"GET"
],
"parts":{
"index":{
"type":"list",
"description":"A comma-separated list of indices to restrict the results"
},
"type": {
"type" : "list",
"description" : "A comma-separated list of types to restrict the results"
}
},
"deprecated": {
"version" : "7.0.0",
"description" : "Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
26 changes: 0 additions & 26 deletions api_generator/rest_specs/create.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,6 @@
"description":"The name of the index"
}
}
},
{
"path":"/{index}/{type}/{id}/_create",
"methods":[
"PUT",
"POST"
],
"parts":{
"id":{
"type":"string",
"description":"Document ID"
},
"index":{
"type":"string",
"description":"The name of the index"
},
"type":{
"type":"string",
"description":"The type of the document",
"deprecated":true
}
},
"deprecated":{
"version":"7.0.0",
"description":"Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
25 changes: 0 additions & 25 deletions api_generator/rest_specs/delete.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,6 @@
"description":"The name of the index"
}
}
},
{
"path":"/{index}/{type}/{id}",
"methods":[
"DELETE"
],
"parts":{
"id":{
"type":"string",
"description":"The document ID"
},
"index":{
"type":"string",
"description":"The name of the index"
},
"type":{
"type":"string",
"description":"The type of the document",
"deprecated":true
}
},
"deprecated":{
"version":"7.0.0",
"description":"Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
19 changes: 0 additions & 19 deletions api_generator/rest_specs/delete_by_query.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,6 @@
"description":"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
}
}
},
{
"path" : "/{index}/{type}/_delete_by_query",
"methods": ["POST"],
"parts": {
"index": {
"required": true,
"type": "list",
"description": "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
},
"type": {
"type": "list",
"description": "A comma-separated list of document types to search; leave empty to perform the operation on all types"
}
},
"deprecated": {
"version" : "7.0.0",
"description" : "Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
25 changes: 0 additions & 25 deletions api_generator/rest_specs/exists.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,6 @@
"description":"The name of the index"
}
}
},
{
"path":"/{index}/{type}/{id}",
"methods":[
"HEAD"
],
"parts":{
"id":{
"type":"string",
"description":"The document ID"
},
"index":{
"type":"string",
"description":"The name of the index"
},
"type":{
"type":"string",
"description":"The type of the document (use `_all` to fetch the first document matching the ID across all types)",
"deprecated":true
}
},
"deprecated":{
"version":"7.0.0",
"description":"Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
25 changes: 0 additions & 25 deletions api_generator/rest_specs/exists_source.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,6 @@
"description":"The name of the index"
}
}
},
{
"path":"/{index}/{type}/{id}/_source",
"methods":[
"HEAD"
],
"parts":{
"id":{
"type":"string",
"description":"The document ID"
},
"index":{
"type":"string",
"description":"The name of the index"
},
"type":{
"type":"string",
"description":"The type of the document; deprecated and optional starting with 7.0",
"deprecated":true
}
},
"deprecated":{
"version":"7.0.0",
"description":"Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
26 changes: 0 additions & 26 deletions api_generator/rest_specs/explain.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,6 @@
"description":"The name of the index"
}
}
},
{
"path":"/{index}/{type}/{id}/_explain",
"methods":[
"GET",
"POST"
],
"parts":{
"id":{
"type":"string",
"description":"The document ID"
},
"index":{
"type":"string",
"description":"The name of the index"
},
"type":{
"type":"string",
"description":"The type of the document",
"deprecated":true
}
},
"deprecated":{
"version":"7.0.0",
"description":"Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
25 changes: 0 additions & 25 deletions api_generator/rest_specs/get.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,6 @@
"description":"The name of the index"
}
}
},
{
"path":"/{index}/{type}/{id}",
"methods":[
"GET"
],
"parts":{
"id":{
"type":"string",
"description":"The document ID"
},
"index":{
"type":"string",
"description":"The name of the index"
},
"type":{
"type":"string",
"description":"The type of the document (use `_all` to fetch the first document matching the ID across all types)",
"deprecated":true
}
},
"deprecated":{
"version":"7.0.0",
"description":"Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
25 changes: 0 additions & 25 deletions api_generator/rest_specs/get_source.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,6 @@
"description":"The name of the index"
}
}
},
{
"path":"/{index}/{type}/{id}/_source",
"methods":[
"GET"
],
"parts":{
"id":{
"type":"string",
"description":"The document ID"
},
"index":{
"type":"string",
"description":"The name of the index"
},
"type":{
"type":"string",
"description":"The type of the document; deprecated and optional starting with 7.0",
"deprecated":true
}
},
"deprecated":{
"version":"7.0.0",
"description":"Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
47 changes: 0 additions & 47 deletions api_generator/rest_specs/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,53 +40,6 @@
"description":"The name of the index"
}
}
},
{
"path":"/{index}/{type}",
"methods":[
"POST"
],
"parts":{
"index":{
"type":"string",
"description":"The name of the index"
},
"type":{
"type":"string",
"description":"The type of the document",
"deprecated":true
}
},
"deprecated":{
"version":"7.0.0",
"description":"Specifying types in urls has been deprecated"
}
},
{
"path":"/{index}/{type}/{id}",
"methods":[
"PUT",
"POST"
],
"parts":{
"id":{
"type":"string",
"description":"Document ID"
},
"index":{
"type":"string",
"description":"The name of the index"
},
"type":{
"type":"string",
"description":"The type of the document",
"deprecated":true
}
},
"deprecated":{
"version":"7.0.0",
"description":"Specifying types in urls has been deprecated"
}
}
]
},
Expand Down
4 changes: 0 additions & 4 deletions api_generator/rest_specs/indices.create.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
]
},
"params":{
"include_type_name":{
"type":"boolean",
"description":"Whether a type should be expected in the body of the mappings."
},
"wait_for_active_shards":{
"type":"string",
"description":"Set the number of active shards to wait for before the operation returns."
Expand Down
Loading

0 comments on commit 26d5b6b

Please sign in to comment.