From 25b56733be65f3065b976cfc70fba9aa71786649 Mon Sep 17 00:00:00 2001 From: dblock Date: Fri, 7 Jun 2024 07:12:15 -0400 Subject: [PATCH] Updated location of the API spec. Signed-off-by: dblock --- DEVELOPER_GUIDE.md | 2 +- src/ApiGenerator/RestSpecDownloader.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 3919b8fe1b..0253b9cf07 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -29,7 +29,7 @@ build.sh ## 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. ``` ./build.sh codegen --branch main diff --git a/src/ApiGenerator/RestSpecDownloader.cs b/src/ApiGenerator/RestSpecDownloader.cs index 772daf8c13..71bac0d807 100644 --- a/src/ApiGenerator/RestSpecDownloader.cs +++ b/src/ApiGenerator/RestSpecDownloader.cs @@ -41,7 +41,7 @@ public static class RestSpecDownloader public static async Task DownloadAsync(string branch, CancellationToken token) { - var githubUrl = $"https://github.com/opensearch-project/opensearch-api-specification/releases/download/{branch}/opensearch-openapi.yaml"; + var githubUrl = $"https://github.com/opensearch-project/opensearch-api-specification/releases/download/{branch}-latest/opensearch-openapi.yaml"; Console.WriteLine($"Downloading OpenAPI spec for branch {branch}"); var spec = await Http.GetStringAsync(githubUrl, token); await File.WriteAllTextAsync(GeneratorLocations.OpenApiSpecFile, spec, token);