Skip to content

Commit

Permalink
fix: Removed duplicated bearer scheme.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Aug 28, 2024
1 parent 8903582 commit 9dd0626
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 31 deletions.
17 changes: 0 additions & 17 deletions src/helpers/FixOpenApiSpec/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,6 @@

//openApiDocument.Components.Schemas["GenerateCompletionRequest"]!.Properties["stream"]!.Default = new OpenApiBoolean(true);

openApiDocument.Components.SecuritySchemes.Add("Bearer", new OpenApiSecurityScheme
{
Type = SecuritySchemeType.Http,
Scheme = "bearer",
});
openApiDocument.SecurityRequirements.Add(new OpenApiSecurityRequirement
{
[new OpenApiSecurityScheme
{
Reference = new OpenApiReference
{
Id = "Bearer",
Type = ReferenceType.SecurityScheme
}
}] = new List<string>(),
});

text = openApiDocument.SerializeAsYaml(OpenApiSpecVersion.OpenApi3_0);
_ = new OpenApiStringReader().Read(text, out diagnostics);

Expand Down
24 changes: 10 additions & 14 deletions src/libs/Cohere/openapi.yaml

Large diffs are not rendered by default.

0 comments on commit 9dd0626

Please sign in to comment.