-
Notifications
You must be signed in to change notification settings - Fork 11
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
Users are forced to implement an interface to define composition handlers and are constrained to create multiple classes instead of defining multiple methods in the same composition handler class #247
Comments
Will an interface still be an option too do you think? In the convention case, when defining the method, does the "correct argument" imply a convention also? Just curious how to introduce model bound parameters to a method. |
Not necessarily. I was thinking about keeping the current design and adding the new option.
The thing I was brainstorming goes something like this:
At invocation time:
|
I like it @mauroservienti . So in theory you could get as near to controller action parameter behaviour. For example, not limit a method to just a model object but actual individual parameters with their own model binding attributes:
I think MVC defaults to FromBody semantics if you only specify a single object parameter and requires an explicit attribute if you include other parameters with attributes. Always happy to help out if you need anything. |
Correct, that's the idea
That's tricky; for example, take a look at this Stack Overflow discussion. |
Ah right, so the optional FromBody only applies when using ApiController attributes on controllers. Good catch. |
Depends on:
Add support for conventions, if a class:
CompositionHandlers
namespaceHttp*Attribute
on the identified methodThen it's a composition handler. And stop making an interface a requirement. This could enable having handlers with multiple methods to group composition actions by use case for example.
The text was updated successfully, but these errors were encountered: