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);