question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WithSummary and WithDescription deson't work in minimal api

See original GitHub issue

Hi, 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:closed
  • Created 10 months ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
commonsensesoftwarecommented, Nov 16, 2022

@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 released 7.0.0-preview.1 that 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.

0reactions
mehdihadelicommented, Nov 17, 2022
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found