Skip to content

Commit 476fdca

Browse files
committed
fix: set base path for swagger json ui
1 parent 2161066 commit 476fdca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Digdir.Domain.Dialogporten.WebApi/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ static void BuildAndRun(string[] args)
169169
// We have to add dialogporten here to get the correct base url for swagger.json in the APIM
170170
// todo: we cannot have dialogporten as prefix when we run this locally. Won't be available on container apps either.
171171
config.Path = "/dialogporten/swagger/{documentName}/swagger.json";
172-
173172
config.PostProcess = (document, _) =>
174173
{
175174
var dialogportenBaseUri = builder.Configuration
@@ -186,6 +185,7 @@ static void BuildAndRun(string[] args)
186185
{
187186
// Hide schemas view
188187
uiConfig.DefaultModelsExpandDepth = -1;
188+
uiConfig.DocumentPath = "/dialogporten/swagger/{documentName}/swagger.json";
189189
});
190190
app.MapControllers();
191191
app.MapHealthChecks("/healthz");

0 commit comments

Comments
 (0)