Skip to content

Commit

Permalink
fix: swagger url in azure portal
Browse files Browse the repository at this point in the history
  • Loading branch information
Amitpnk committed Mar 14, 2021
1 parent d389b0c commit cfa3cf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Generator/Extension/ConfigureContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public static void UseSwaggerConfig(this IApplicationBuilder app)

app.UseSwaggerUI(setupAction =>
{
setupAction.SwaggerEndpoint("/swagger/OpenAPISpecification/swagger.json", "Hexagonal Architecture API");
setupAction.RoutePrefix = "OpenAPI";
setupAction.SwaggerEndpoint("/swagger/v1/swagger.json", "Hexagonal Architecture API");
setupAction.RoutePrefix = string.Empty;
});
}

Expand Down
4 changes: 2 additions & 2 deletions src/Generator/Extension/ConfigureServiceContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ public static void AddSwaggerOpenAPI(this IServiceCollection serviceCollection,
serviceCollection.AddSwaggerGen(setupAction =>
{
setupAction.SwaggerDoc(
"OpenAPISpecification",
"v1",
new Microsoft.OpenApi.Models.OpenApiInfo()
{
Title = appSettings.ApplicationDetail.ApplicationName,
Version = "1",
Version = "v1",
Description = appSettings.ApplicationDetail.Description,
});
setupAction.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
Expand Down

0 comments on commit cfa3cf3

Please sign in to comment.