altinn-studio icon indicating copy to clipboard operation
altinn-studio copied to clipboard

Fix swagger documentation

Open mirkoSekulic opened this issue 1 year ago • 1 comments

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

Note

In .net9 Squashbuckle will be deprecated.

mirkoSekulic avatar Mar 25 '24 13:03 mirkoSekulic

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.

mirkoSekulic avatar Mar 25 '24 13:03 mirkoSekulic

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.

ErlingHauan avatar May 14 '24 10:05 ErlingHauan

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.

captainsafia avatar May 16 '24 15:05 captainsafia