fullstackhero / dotnet-starter-kit

Production Grade Cloud-Ready .NET 8 Starter Kit (Web API + Blazor Client) with Multitenancy Support, and Clean/Modular Architecture that saves roughly 200+ Development Hours! All Batteries Included.
https://fullstackhero.net/dotnet-webapi-boilerplate/
MIT License
5.3k stars 1.59k forks source link

[BUG] [v2] Swagger WithSummary / WithDescription metadata doesnt show up on the UI #910

Closed iammukeshm closed 6 months ago

iammukeshm commented 11 months ago

chrome_vMo86y9SAH

devenv_a7FuO36xcV

fcantenot commented 11 months ago

Hello @iammukeshm , I quickly took a look. I saw this issue was present with .NET7 (https://github.com/dotnet/aspnetcore/issues/40753). I don't know if the issue has been correctly fixed.

Inside comments, it is indicated to use WithOpenApi to get around the problem. I tested and it works.

WithOpenApi WithOpenApi-Result

iammukeshm commented 11 months ago

Hi @fcantenot, I have seen something similar to this, and tried fixing it. I was able to make the Swagger UI display the correct summary and description, but I was not able to hit the API endpoint. It was giving me a 404 exception. Are you able to access the APIs? If so, can you please take the latest changes from v2 and raise a new PR with this fix?

iammukeshm commented 11 months ago

https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414

I think this is the fix for this issue. Let's see if this gets merged anytime soon!

fcantenot commented 11 months ago

Hi @fcantenot, I have seen something similar to this, and tried fixing it. I was able to make the Swagger UI display the correct summary and description, but I was not able to hit the API endpoint. It was giving me a 404 exception. Are you able to access the APIs? If so, can you please take the latest changes from v2 and raise a new PR with this fix?

sorry @iammukeshm , I tried but we have an error like you mentioned. If we use "WithSummary&WithDescription", versioning is ok (see curl command) but not summary and description. WithSummary

If we use "WithOpenApi", summary & description are ok but versioning is ko as you can see with the curl command WithOpenApi

I searched but it seems it is also a bug or I don't know how to get around. https://github.com/dotnet/aspnet-api-versioning/issues/953

hwoodiwiss commented 7 months ago

Hey 👋🏼 https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2414 has now merged, and looks like it is going to be in Swashbuckle.AspNetCore v6.5.1