The Wayback Machine - https://web.archive.org/web/20211028154849/https://github.com/dotnet/aspnetcore/issues/37906
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set route description or summary with minimal api #37906

Open
IanBuck-dev opened this issue Oct 28, 2021 · 0 comments
Open

Unable to set route description or summary with minimal api #37906

IanBuck-dev opened this issue Oct 28, 2021 · 0 comments

Comments

@IanBuck-dev
Copy link

@IanBuck-dev IanBuck-dev commented Oct 28, 2021

Is your feature request related to a problem? Please describe.

Hi, I am using the new minimal hosting model with dotnet 6 and I set up my endpoints like this:

endpoints.MapPost("user/createWithList", ExecutionDelegate).WithTags("user");

Is there a way to set the summary of the route, so right next to the route -> underlined with red?

Is there a way to set the extended description of the route, so below the http method, in this case POST, and above the parameters section -> marked by the red arrow?

I already checked and there seem to only be the WithTags method or the AddMetaData where you could add EndpointNameMetadata

Screenshot 2021-10-28 at 17 00 56

I think this feature is essential for providing a well structured and helpful api documentation.

Describe the solution you'd like

I would like to have the option to add the description either by having a dedicated method for that, so:

endpoints.MapPost("user/createWithList", ExecutionDelegate).WithTags("user").WithDescription("This endpoints lets you create users for ...");

or to have attributes like the EndpointNameMetadata f.e. EndpointDescriptionMetadata which can be used to set the OpenApi description of that route and be passed to the WithMetadata() method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant