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

Web API conventions - Rich Swagger support without attributes #5401

Closed
9 tasks done
Rick-Anderson opened this issue Feb 8, 2018 · 1 comment
Closed
9 tasks done
Assignees

Comments

@Rick-Anderson
Copy link
Contributor

Rick-Anderson commented Feb 8, 2018

aspnet/Mvc#6870, aspnet/Mvc#6784

Related Resources:

Docs to update:

Docs to create under the new Web API TOC node:

  • ActionResult<T> reference
  • [ApiController] attribute reference
@guardrex
Copy link
Collaborator

guardrex commented Apr 29, 2018

I'll add the small blurb here from the '2.1.0-preview2 now available' blog post:

Improvements to [ApiController] parameter binding

Applying [ApiController] to your controller sets up convenient conventions for how parameters get bound to request data. In Preview 2 we’ve made a number of improvements to how these conventions work based on feedback:

  • [FromBody] will no longer be inferred for complex types with specific semantics, like CancellationToken
  • Multiple [FromBody] parameters will result in an exception
  • When there are multiple routes for an action parameters that match any route value will be considered [FromRoute]

There's a full example in the roadmap post at https://blogs.msdn.microsoft.com/webdev/2018/02/02/asp-net-core-2-1-roadmap/#mvc.

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

No branches or pull requests

3 participants