OData / OData/AspNetCoreOData

Add key and function parameter constraint in the route template

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
505
Forks
186
PR merge metrics
No merged PRs in 30d

Description

for example:

If customer entity type has a "Edm.Int32" key named "ID", so, when we construct the route template for entity access,
we should add the constraint for the key template.

~/odata/Customers/{key:int}

The same for the function parameter template.

for the route constraint, please refer to: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-3.1#route-constraint-reference

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how entity-access route templates and function-parameter templates are constructed, then consult the linked ASP.NET Core route-constraint reference. Done means an Edm.Int32 key such as ID produces a constrained template like ~/odata/Customers/{key:int}, with equivalent constraints applied to function parameters.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.