diff --git a/.github/workflows/update_api.yml b/.github/workflows/update_api.yml index 2cc4f298..2dc99b60 100644 --- a/.github/workflows/update_api.yml +++ b/.github/workflows/update_api.yml @@ -44,7 +44,7 @@ jobs: 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 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 }} branch: automated-api-update base: main diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index cf566e20..521a6c20 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -125,7 +125,7 @@ Open `docs/build/html/index.html` to see results. ## 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 diff --git a/utils/generate_api.py b/utils/generate_api.py index 4ba41c15..32754ca1 100644 --- a/utils/generate_api.py +++ b/utils/generate_api.py @@ -550,7 +550,7 @@ def to_python(self) -> Any: def read_modules() -> Any: """ 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 :return: a dict of API objects """ @@ -558,7 +558,7 @@ def read_modules() -> Any: # Load the OpenAPI specification file 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)