Skip to content

Commit

Permalink
fix: set base path for swagger json ui
Browse files Browse the repository at this point in the history
  • Loading branch information
arealmaas committed Feb 16, 2024
1 parent 2161066 commit 476fdca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Digdir.Domain.Dialogporten.WebApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ static void BuildAndRun(string[] args)
// 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 @@ -186,6 +185,7 @@ static void BuildAndRun(string[] args)
{
// Hide schemas view
uiConfig.DefaultModelsExpandDepth = -1;
uiConfig.DocumentPath = "/dialogporten/swagger/{documentName}/swagger.json";
});
app.MapControllers();
app.MapHealthChecks("/healthz");
Expand Down

0 comments on commit 476fdca

Please sign in to comment.