Altinn / altinn-studio

Next generation open source Altinn platform and applications.
https://docs.altinn.studio
BSD 3-Clause "New" or "Revised" License
116 stars 70 forks source link

Fix swagger documentation #12588

Open mirkoSekulic opened 8 months ago

mirkoSekulic commented 8 months ago

It's not possible to open swagger documentation. http://studio.localhost/designer/swagger/index.html

Analyse

In .net9 Squashbuckle will be deprecated. Analyse what needs to be done to migrate to a new/updated package that does support .net9.

mirkoSekulic commented 8 months ago

Most likely the fix would be to attach [HttpGet] annotation or the view methods or to ignore them in docs with [ApiExplorerSettings(IgnoreApi = true)] annotation. I suggest removing the preview controller from the docs as well.

ErlingHauan commented 6 months ago

Just noting that I had this issue today as well. Tried to quick fix it by adding [HttpGet] to the index endpoint in HomeController, but that did not work.

Also got a tip from team Apps that they have tests covering this in their repo that we can copy.

captainsafia commented 6 months ago

https://github.com/dotnet/aspnetcore/issues/54599 Analyse what needs to be done to migrate to a new/updated package that does support .net9.

As a quick point of clarification, Swashbuckle isn't being deprecated. We're just removing it from the ASP.NET Web API template and adding built-in support in ASP.NET Core for OpenAPI document generation. See https://github.com/dotnet/aspnetcore/issues/54598 for more info.