Skip to content

Commit

Permalink
fix(webapi): Fix Swagger URL for new APIM (#755)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

## Related Issue(s)

- #754 

## Verification

- [x] **Your** code builds clean without any errors or warnings
- [x] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)

Co-authored-by: Ole Jørgen Skogstad <skogstad@softis.net>
  • Loading branch information
knuhau and oskogstad authored May 23, 2024
1 parent ac4b85b commit 2388d54
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/Digdir.Domain.Dialogporten.WebApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ 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. Should not be done for development
var dialogPrefix = builder.Environment.IsDevelopment() ? "" : "/dialogporten";
uiConfig.DocumentPath = dialogPrefix + "/swagger/{documentName}/swagger.json";
});
app.MapControllers();
app.MapHealthChecks("/healthz");
Expand Down

0 comments on commit 2388d54

Please sign in to comment.