From 87e531b943c2c37ad00d2f8fbb903b4591a7488d Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Thu, 13 Jun 2024 00:48:29 -0400 Subject: [PATCH] Changed URL for API spec. (#757) Signed-off-by: dblock --- .github/workflows/update_api.yml | 2 +- DEVELOPER_GUIDE.md | 2 +- utils/generate_api.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_api.yml b/.github/workflows/update_api.yml index 2cc4f298d..2dc99b608 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 cf566e20a..521a6c205 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 4ba41c15c..32754ca19 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)