Skip to content

Using WithSummary() for Minimal API endpoints does not render when using Swashbuckle.AspNetCore #40753

Closed
domaindrivendev/Swashbuckle.AspNetCore
#2414
@martincostello

Description

@martincostello

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Using the new WithSummary() method (or [EndpointSummary] attribute) on a Minimal API endpoint in ASP.NET Core Core 7 preview 2 does not render the summary in the OpenAPI document generated by Swashbuckle.AspNetCore.

I figure this is because Swashbuckle.AspNetCore would need changes to consume the new metadata to use and output it, but as I thought I'd raise this for visibility as I couldn't immediately see anything in the backlog related to this and because #37906 is closed which seems to imply it should "just work™️".

Using SwaggerOperationAttribute

image

Using WithSummary()

image

Expected Behavior

The string passed to the WithSummary() method of [EndpointSummary] attribute is rendered in the OpenAPI JSON document generated by Swashbuckle.AspNetCore.

Steps To Reproduce

Clone martincostello/api@66fbf8e, run the application, and navigate to the /docs URL in a browser.

Exceptions (if any)

N/A

.NET Version

7.0.100-preview.2.22153.17

Anything else?

N/A

Metadata

Metadata

Assignees

Labels

ExternalThis is an issue in a component not contained in this repository. It is open for tracking purposes.help wantedUp for grabs. We would accept a PR to help resolve this issueold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions