WithSummary and WithDescription deson't work in minimal api
See original GitHub issueHi,
I have a minimal api in .net 7, I used WithSummary() and WithDescription() bur it doesn’t generate anything in swagger ui!
app.MapGet("/api/v{version:apiVersion}/weatherforecast/byid", () => { return new List<string>(); })
.WithApiVersionSet(weatherforecasts)
.HasApiVersion(1.0)
.HasApiVersion(2.0)
.WithName("weatherforecast-byid")
.WithTags("WeatherForecast")
.WithSummary("summary002")
.WithDescription("description002");
Issue Analytics
- State:
- Created 10 months ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Using WithSummary() for Minimal API endpoints does not ...
Describe the bug Using the new WithSummary() method (or [EndpointSummary] attribute) on a Minimal API endpoint in ASP.NET Core Core 7 preview 2 ......
Read more >Swagger ASP.NET Core Minimal API include XML ...
Hi, probably swagger doesn't support summary description for minimal-api. · Even if swagger+minimal apis supported xml docs app. · Also based on ...
Read more >How to use OpenAPI in Minimal API apps
The endpoint summary and description can be added by invoking the WithOpenApi extension method. In the following code, the summaries are set ...
Read more >Tutorial: Create a minimal API with ASP.NET Core
Learn how to build a minimal API with ASP.NET Core.
Read more >Using ASP.NET Core 7 Minimal APIs: Request Filters ... - InfoQ
Problem ("Empty TODO description not allowed!"); } return await next(context); });. In this example, we mapped a POST endpoint that allows us to ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@mehdihadeli Apologies, I wasn’t clear. Yes, ASP.NET Core and .NET 7 have been released. As this is a major version change, there can be breaking changes. The addition of
Finally, unfortunately, breaks API Versioning as written for .NET 6. API Versioning has released7.0.0-preview.1that should be compatible with .NET 7 and address the issue you are facing. Be aware as a preview there may be some additional changes, but I don’t expect much. I’m marching toward an official release as soon as possible.@captainsafia Thanks