Skip to content

Commit

Permalink
fix: remove path to swagger json
Browse files Browse the repository at this point in the history
  • Loading branch information
arealmaas committed Feb 16, 2024
1 parent 476fdca commit fe1e770
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Digdir.Domain.Dialogporten.WebApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,6 @@ static void BuildAndRun(string[] args)
})
.UseSwaggerGen(config =>
{
// We have to add dialogporten here to get the correct base url for swagger.json in the APIM
// todo: we cannot have dialogporten as prefix when we run this locally. Won't be available on container apps either.
config.Path = "/dialogporten/swagger/{documentName}/swagger.json";
config.PostProcess = (document, _) =>
{
var dialogportenBaseUri = builder.Configuration
Expand All @@ -185,6 +182,8 @@ static void BuildAndRun(string[] args)
{
// Hide schemas view
uiConfig.DefaultModelsExpandDepth = -1;
// We have to add dialogporten here to get the correct base url for swagger.json in the APIM
// todo: we cannot have dialogporten as prefix when we run this locally. Won't be available on container apps either.
uiConfig.DocumentPath = "/dialogporten/swagger/{documentName}/swagger.json";
});
app.MapControllers();
Expand Down

0 comments on commit fe1e770

Please sign in to comment.