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

Consider FromMultiSourceAttribute Necessity and Document It If It Helps #174

Open
ardalis opened this issue Jan 27, 2022 · 2 comments
Open

Comments

@ardalis
Copy link
Owner

ardalis commented Jan 27, 2022

Version 3.1 sometimes had issues with request types being pulled from multiple locations (route, query, body).

Nick Chapsas shows a solution to this problem here. The MultiSourceAttribute.

I'm not sure if the problem still exists in v4, but if it does we should show how to use this attribute to address it.

References:

@Allann
Copy link

Allann commented Jan 27, 2022

As per my comment here: #161 (comment) this was something I tried but it doesn't play well with Swagger (or Redoc) nor does it work if you have multiple fields that come from the body. You will still need to create a class representing the body details like I mention, in which case my solution continues to work fine and doesn't need the attribute.

@ardalis
Copy link
Owner Author

ardalis commented Jan 27, 2022

Good to know, thanks, Allann.

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

2 participants