Skip to content

Commit

Permalink
Use correct URL for OpenAPI specs
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
  • Loading branch information
Xtansia committed May 24, 2023
1 parent 4089eef commit c7c556e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ApiGenerator/Generator/ApiGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ await DoGenerate(
new RequestsGenerator());
}

public static async Task<RestApiSpec> CreateRestApiSpecModel(string file, ISet<string> namespaces)
public static async Task<RestApiSpec> CreateRestApiSpecModel(ISet<string> namespaces)
{
var document = await OpenApiYamlDocument.FromFileAsync(file);
var document = await OpenApiYamlDocument.FromUrlAsync("https://opensearch-project.github.io/opensearch-api-specification/OpenSearch.openapi.json");

var endpoints = document.Paths
.Select(kv => new { HttpPath = kv.Key, PathItem = kv.Value })
Expand Down
2 changes: 1 addition & 1 deletion src/ApiGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static string YesNo(bool value)
AnsiConsole.Write(new Rule("[b white on chartreuse4] Loading specification [/]").LeftJustified());
Console.WriteLine();

var spec = await Generator.ApiGenerator.CreateRestApiSpecModel("/Users/tsfarr/Development/opensearch-api-specification/build/smithyprojections/opensearch-api-specification/full/openapi/OpenSearch.openapi.json", namespaces.ToImmutableHashSet());
var spec = await Generator.ApiGenerator.CreateRestApiSpecModel(namespaces.ToImmutableHashSet());

Console.WriteLine();
AnsiConsole.Write(new Rule("[b white on chartreuse4] Generating code [/]").LeftJustified());
Expand Down

0 comments on commit c7c556e

Please sign in to comment.