Import Functions and Bound Functions require parameter match
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Right now, both types of functions require their parameters to match the name of the parameters of the ActionModel. This is done here:
https://github.com/OData/AspNetCoreOData/blob/e83394da46c144753cedfb4f31158d86b44fab76/src/Microsoft.AspNetCore.OData/Routing/Conventions/OperationRoutingConvention.cs#L290
I have the creation of controllers and their respective actions abstracted away. By doing so, it is possible the action parameters on the controller do not match the function that will ultimately be executed. I map any parameters of function by parsing the function segments on the request and mapping them myself to the function instance I'm executing.
In previous versions, the matching of action parameters to the EDM operation was not required. For now, I've implemented my own logic to handle in a routing convention implementation.
Is there a reason this change was made?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the parameter-matching logic in src/Microsoft.AspNetCore.OData/Routing/Conventions/OperationRoutingConvention.cs around line 290 and OperationImportRoutingConvention.cs around line 122. Compare this behavior with previous versions and determine whether imported and bound functions should allow unmatched controller action parameters. Done means the intended matching behavior and its effect on routing are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100