Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced existing API generator to use the OpenAPI spec as the input format #376

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9270f26
Add spec files
saimedhi Apr 6, 2023
a4be8de
Add spec files
saimedhi Apr 6, 2023
8001fbb
Update new-gen-api.py
saimedhi Apr 6, 2023
c5c4f7f
Update new-gen-api.py
saimedhi Apr 6, 2023
726ca59
Update new-gen-api.py
saimedhi Apr 10, 2023
55ab565
Update opensearch.openapi.json
saimedhi Apr 10, 2023
c96c160
Update new-gen-api.py
saimedhi Apr 12, 2023
d11eb3c
Update opensearch.openapi.json
saimedhi Apr 12, 2023
c732c85
Update new-gen-api.py
saimedhi Apr 12, 2023
7436c89
Update new-gen-api.py
saimedhi Apr 12, 2023
85ff50d
Updated
saimedhi Apr 13, 2023
a9d229a
Update new-gen-api.py
saimedhi Apr 13, 2023
6c28ab9
Update new-gen-api.py
saimedhi Apr 13, 2023
f4a6311
Update opensearch.openapi.json
saimedhi Apr 13, 2023
3e40ce8
Update new-gen-api.py
saimedhi Apr 13, 2023
32026af
Create new-gen2_test
saimedhi Apr 14, 2023
14bc3c6
Update new-gen2_test
saimedhi Apr 14, 2023
07ecff0
Rename new-gen2_test to new-gen2_test.py
saimedhi Apr 14, 2023
62ff7ad
Updated getting started to user guide
saimedhi Apr 18, 2023
952a8f0
Update new-gen2_test.py
saimedhi Apr 18, 2023
544ef07
updated
saimedhi Apr 18, 2023
82c3681
updated
saimedhi Apr 19, 2023
21e8551
updated
saimedhi Apr 19, 2023
c868c50
Update new-gen2_test.py
saimedhi Apr 19, 2023
8f2b686
Update new-gen2_test.py
saimedhi Apr 19, 2023
ffb5ac8
Updated
saimedhi Apr 19, 2023
698551e
Update new-gen2_test.py
saimedhi Apr 20, 2023
e340685
Update new-gen2_test.py
saimedhi Apr 20, 2023
0cea115
Merge branch 'opensearch-project:main' into new_code_gen_api4
saimedhi Apr 24, 2023
455cc64
updated
saimedhi Apr 24, 2023
0efa76a
updated
saimedhi Apr 24, 2023
b4d2f6e
updated
saimedhi Apr 25, 2023
be8088c
Update base
saimedhi Apr 25, 2023
63111c2
Merge branch 'opensearch-project:main' into fix/api_generator
saimedhi Apr 25, 2023
88b97a6
updated api_gen
saimedhi Apr 25, 2023
dcd468b
updated api_gen
saimedhi Apr 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
633 changes: 633 additions & 0 deletions openapi_spec/json/opensearch.openapi.json

Large diffs are not rendered by default.

1,307 changes: 1,307 additions & 0 deletions openapi_spec/json/parameters/query.json

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions openapi_spec/json/paths/(alias)._rollover.(new_index).json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"post": {
"x-endpoint-group": "indices.rollover",
"description": "Updates an alias to point to a new index when the existing index\nis considered to be too large or too old.",
"parameters": [
{
"in": "path",
"name": "alias",
"description": "The name of the alias to rollover",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "new_index",
"description": "The name of the rollover index",
"required": true,
"schema": {
"type": "string"
}
},
{
"$ref": "../parameters/query.json#/timeout"
},
{
"$ref": "../parameters/query.json#/dry_run"
},
{
"$ref": "../parameters/query.json#/master_timeout"
},
{
"$ref": "../parameters/query.json#/cluster_manager_timeout"
},
{
"$ref": "../parameters/query.json#/wait_for_active_shards"
}
],
"requestBody": {
"description": "The conditions that needs to be met for executing rollover",
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
43 changes: 43 additions & 0 deletions openapi_spec/json/paths/(alias)._rollover.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"post": {
"x-endpoint-group": "indices.rollover",
"description": "Updates an alias to point to a new index when the existing index\nis considered to be too large or too old.",
"parameters": [
{
"in": "path",
"name": "alias",
"description": "The name of the alias to rollover",
"required": true,
"schema": {
"type": "string"
}
},
{
"$ref": "../parameters/query.json#/timeout"
},
{
"$ref": "../parameters/query.json#/dry_run"
},
{
"$ref": "../parameters/query.json#/master_timeout"
},
{
"$ref": "../parameters/query.json#/cluster_manager_timeout"
},
{
"$ref": "../parameters/query.json#/wait_for_active_shards"
}
],
"requestBody": {
"description": "The conditions that needs to be met for executing rollover",
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
195 changes: 195 additions & 0 deletions openapi_spec/json/paths/(index)._alias.(name).json
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
{
"put": {
"x-endpoint-group": "indices.put_alias",
"description": "Creates or updates an alias.",
"parameters": [
{
"in": "path",
"name": "index",
"description": "A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.",
"required": true,
"schema": {
"$ref": "../schemas/_common.json#/string_array"
}
},
{
"in": "path",
"name": "name",
"description": "The name of the alias to be created or updated",
"required": true,
"schema": {
"type": "string"
}
},
{
"$ref": "../parameters/query.json#/timeout"
},
{
"$ref": "../parameters/query.json#/master_timeout"
},
{
"$ref": "../parameters/query.json#/cluster_manager_timeout"
}
],
"requestBody": {
"description": "The settings for the alias, such as `routing` or `filter`",
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"post": {
"x-endpoint-group": "indices.put_alias",
"description": "Creates or updates an alias.",
"parameters": [
{
"in": "path",
"name": "index",
"description": "A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.",
"required": true,
"schema": {
"$ref": "../schemas/_common.json#/string_array"
}
},
{
"in": "path",
"name": "name",
"description": "The name of the alias to be created or updated",
"required": true,
"schema": {
"type": "string"
}
},
{
"$ref": "../parameters/query.json#/timeout"
},
{
"$ref": "../parameters/query.json#/master_timeout"
},
{
"$ref": "../parameters/query.json#/cluster_manager_timeout"
}
],
"requestBody": {
"description": "The settings for the alias, such as `routing` or `filter`",
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"head": {
"x-endpoint-group": "indices.exists_alias",
"description": "Returns information about whether a particular alias exists.",
"parameters": [
{
"in": "path",
"name": "index",
"description": "A comma-separated list of index names to filter aliases",
"required": true,
"schema": {
"$ref": "../schemas/_common.json#/string_array"
}
},
{
"in": "path",
"name": "name",
"description": "A comma-separated list of alias names to return",
"required": true,
"schema": {
"$ref": "../schemas/_common.json#/string_array"
}
},
{
"$ref": "../parameters/query.json#/ignore_unavailable"
},
{
"$ref": "../parameters/query.json#/allow_no_indices"
},
{
"$ref": "../parameters/query.json#/expand_wildcards"
},
{
"$ref": "../parameters/query.json#/local"
}
]
},
"get": {
"x-endpoint-group": "indices.get_alias",
"description": "Returns an alias.",
"parameters": [
{
"in": "path",
"name": "index",
"description": "A comma-separated list of index names to filter aliases",
"required": true,
"schema": {
"$ref": "../schemas/_common.json#/string_array"
}
},
{
"in": "path",
"name": "name",
"description": "A comma-separated list of alias names to return",
"required": true,
"schema": {
"$ref": "../schemas/_common.json#/string_array"
}
},
{
"$ref": "../parameters/query.json#/ignore_unavailable"
},
{
"$ref": "../parameters/query.json#/allow_no_indices"
},
{
"$ref": "../parameters/query.json#/expand_wildcards"
},
{
"$ref": "../parameters/query.json#/local"
}
]
},
"delete": {
"x-endpoint-group": "indices.delete_alias",
"description": "Deletes an alias.",
"parameters": [
{
"in": "path",
"name": "index",
"description": "A comma-separated list of index names (supports wildcards); use `_all` for all indices",
"required": true,
"schema": {
"$ref": "../schemas/_common.json#/string_array"
}
},
{
"in": "path",
"name": "name",
"description": "A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.",
"required": true,
"schema": {
"$ref": "../schemas/_common.json#/string_array"
}
},
{
"$ref": "../parameters/query.json#/timeout"
},
{
"$ref": "../parameters/query.json#/master_timeout"
},
{
"$ref": "../parameters/query.json#/cluster_manager_timeout"
}
]
}
}
29 changes: 29 additions & 0 deletions openapi_spec/json/paths/(index)._alias.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"get": {
"x-endpoint-group": "indices.get_alias",
"description": "Returns an alias.",
"parameters": [
{
"in": "path",
"name": "index",
"description": "A comma-separated list of index names to filter aliases",
"required": true,
"schema": {
"$ref": "../schemas/_common.json#/string_array"
}
},
{
"$ref": "../parameters/query.json#/ignore_unavailable"
},
{
"$ref": "../parameters/query.json#/allow_no_indices"
},
{
"$ref": "../parameters/query.json#/expand_wildcards"
},
{
"$ref": "../parameters/query.json#/local"
}
]
}
}
Loading