Skip to content

Update routing.md#36805

Open
jz-k wants to merge 4 commits intodotnet:mainfrom
jz-k:patch-1
Open

Update routing.md#36805
jz-k wants to merge 4 commits intodotnet:mainfrom
jz-k:patch-1

Conversation

@jz-k
Copy link

@jz-k jz-k commented Feb 25, 2026

Updated language to clarify the purpose of Route constraint required. The phrase "non-parameter value" was awkward. The updated language clarifies that an explicit value is required, and I hope is less muddy. "Non-parameter value" gave me pause, since we are applying the attribute to a parameter.


Internal previews

📄 File 🔗 Preview link
aspnetcore/fundamentals/routing.md Routing in ASP.NET Core

Updated language to clarify the purpose of Route constraint `required`. The phrase "non-parameter" value was awkward. The updated language clarifies that an explicit value is required, and I hope is less muddy.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the routing documentation to clarify what the required route constraint does during URL generation, replacing the previously awkward “non-parameter value” phrasing.

Changes:

  • Reworded the required route constraint description to emphasize needing an explicitly provided value during URL generation.
  • Minor table row formatting alignment adjustments for the required, file, and nonfile rows.

| `required` | `{name:required}` | `Rick` | Used to enforce that a non-parameter value is present during URL generation |
| `file` | `{filename:file}` | `myfile.txt` | String can contain path segments, but its last segment must have a dot (`.`) and be followed by one or more non-dot characters |
| `nonfile` | `{page:nonfile}` | `PageName` | String must not have a dot in its last path segment that is followed by one or more non-dot (`.`) characters |
| `required` | `{name:required}` | `Rick` | Enforces that an explicitly provided value (not a default or ambient value) is present during URL generation. |
@guardrex
Copy link
Collaborator

AI is correct to suggest updating the INCLUDE file (routing3-7.md) for prior versions with the change ...

Also, the <=7.0 content included from fundamentals/routing/includes/routing3-7.md still uses the old “non-parameter value” phrasing for the required constraint; updating that include would keep the guidance consistent across monikers.

I recommend adding a commit to update it to match ...

Enforces that an explicit value (not an ambient value) is present during URL generation.

@guardrex guardrex self-assigned this Mar 17, 2026
Copy link
Collaborator

@guardrex guardrex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, @jz-k! Please make the recommended updates, and I'll ping Tom for a final review before we merge this.

jz-k and others added 3 commits March 23, 2026 10:56
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Clarified the description of the 'required' constraint in routing documentation.
@guardrex
Copy link
Collaborator

Thanks @jz-k ... Please sign the CLA ☝️ if you agree with its terms. We can't accept a PR unless the CLA is reviewed and signed.

@jz-k
Copy link
Author

jz-k commented Mar 23, 2026

@dotnet-policy-service agree

@guardrex
Copy link
Collaborator

@cmastr ... The CLA flagging has been broken like this for years ... really as long as I can remember. The CLA notice often appears well after the PR has been submitted and after the dev and our team has had interaction on it, even with additional commits arriving. We were told at the outset not to even look at the content of a PR without a signed CLA, but that's impossible with the CLA notice popping up so late.

@guardrex guardrex requested a review from tdykstra March 23, 2026 15:23
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

Successfully merging this pull request may close these issues.

3 participants