Changed URL for API spec. (#757)

Signed-off-by: dblock <[email protected]>
This commit is contained in:
Daniel (dB.) Doubrovkine
2024-06-12 21:48:29 -07:00
committed by GitHub
parent 1ccc1bcf95
commit 87e531b943
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ jobs:
commit-message: Updated opensearch-py to reflect the latest OpenSearch API spec (${{ steps.date.outputs.date }}) commit-message: Updated opensearch-py to reflect the latest OpenSearch API spec (${{ steps.date.outputs.date }})
title: Updated opensearch-py to reflect the latest OpenSearch API spec title: Updated opensearch-py to reflect the latest OpenSearch API spec
body: | body: |
Updated [opensearch-py](https://github.com/opensearch-project/opensearch-py) to reflect the latest [OpenSearch API spec](https://github.com/opensearch-project/opensearch-api-specification/releases/download/main/opensearch-openapi.yaml) Updated [opensearch-py](https://github.com/opensearch-project/opensearch-py) to reflect the latest [OpenSearch API spec](https://github.com/opensearch-project/opensearch-api-specification/releases/download/main-latest/opensearch-openapi.yaml)
Date: ${{ steps.date.outputs.date }} Date: ${{ steps.date.outputs.date }}
branch: automated-api-update branch: automated-api-update
base: main base: main
+1 -1
View File
@@ -125,7 +125,7 @@ Open `docs/build/html/index.html` to see results.
## Client Code Generator ## Client Code Generator
OpenSearch publishes an [OpenAPI specification](https://github.com/opensearch-project/opensearch-api-specification/releases/download/main/opensearch-openapi.yaml) in the [opensearch-api-specification](https://github.com/opensearch-project/opensearch-api-specification) repository, which is used to auto-generate the less interesting parts of the client. OpenSearch publishes an [OpenAPI specification](https://github.com/opensearch-project/opensearch-api-specification/releases/download/main-latest/opensearch-openapi.yaml) in the [opensearch-api-specification](https://github.com/opensearch-project/opensearch-api-specification) repository, which is used to auto-generate the less interesting parts of the client.
``` ```
nox -rs generate nox -rs generate
+2 -2
View File
@@ -550,7 +550,7 @@ class API:
def read_modules() -> Any: def read_modules() -> Any:
""" """
checks the opensearch-api spec at checks the opensearch-api spec at
https://github.com/opensearch-project/opensearch-api-specification/releases/download/main/opensearch-openapi.yaml https://github.com/opensearch-project/opensearch-api-specification/releases/download/main-latest/opensearch-openapi.yaml
and parses it into one or more API modules and parses it into one or more API modules
:return: a dict of API objects :return: a dict of API objects
""" """
@@ -558,7 +558,7 @@ def read_modules() -> Any:
# Load the OpenAPI specification file # Load the OpenAPI specification file
response = requests.get( response = requests.get(
"https://github.com/opensearch-project/opensearch-api-specification/releases/download/main/opensearch-openapi.yaml" "https://github.com/opensearch-project/opensearch-api-specification/releases/download/main-latest/opensearch-openapi.yaml"
) )
data = yaml.safe_load(response.text) data = yaml.safe_load(response.text)