Conversation
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.
There was a problem hiding this comment.
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
requiredroute constraint description to emphasize needing an explicitly provided value during URL generation. - Minor table row formatting alignment adjustments for the
required,file, andnonfilerows.
aspnetcore/fundamentals/routing.md
Outdated
| | `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. | |
|
AI is correct to suggest updating the INCLUDE file (
I recommend adding a commit to update it to match ...
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Clarified the description of the 'required' constraint in routing documentation.
|
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. |
|
@dotnet-policy-service agree |
|
@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. |
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