Copilot backlog handling: Fix authorId → author route parameter name mismatch in custom-model-binding article#36793
Merged
wadepickett merged 6 commits intomainfrom Feb 26, 2026
Conversation
Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix route parameter name for author in action method
Fix Feb 23, 2026
authorId → author route parameter name mismatch in custom-model-binding article
Contributor
|
@copilot, ai-usage: ai-assisted metadata is not present in the frontmatter of the article. Per the copilot-instructions: "Metadata ai-usage: ai-assisted if any AI assistance was used." Since this PR was authored by Copilot (AI), this metadata should arguably be added. Please add it. |
…tter Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Contributor
Author
wadepickett
reviewed
Feb 23, 2026
wadepickett
reviewed
Feb 23, 2026
wadepickett
reviewed
Feb 23, 2026
wadepickett
reviewed
Feb 23, 2026
wadepickett
reviewed
Feb 23, 2026
wadepickett
reviewed
Feb 23, 2026
wadepickett
reviewed
Feb 23, 2026
wadepickett
reviewed
Feb 23, 2026
Edit pass on AI gen content for the PR. Clarified a few sectons and updated to latest standardization on notes and few others from the original doc.
wadepickett
approved these changes
Feb 23, 2026
Contributor
wadepickett
left a comment
There was a problem hiding this comment.
Approved after making some correctons and clarifications.
authorId → author route parameter name mismatch in custom-model-binding articleauthorId → author route parameter name mismatch in custom-model-binding article
authorId → author route parameter name mismatch in custom-model-binding articleauthorId → author route parameter name mismatch in custom-model-binding article
meaghanlewis
approved these changes
Feb 24, 2026
wadepickett
reviewed
Feb 26, 2026
wadepickett
reviewed
Feb 26, 2026
Fixes per review feedback.
wadepickett
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original prompt
This section details on the original issue you should resolve
<issue_title>Possible error in route parameter name "authorId"</issue_title>
<issue_description>I didn't understand why the example in "Custom model binder sample" section employed "authorId" route template parameter whereas action method's signature awaits parameter named "author":
I downloaded source files from the link provided in the abstract, ran them with the Aid of Visual Studio 2017 v.15.9 and noticed that this endpoint didn't work as the bindingContext.ModelName was equal to
"".When I renamed the route variable from "authorId" to "author" the endpoint started to work. This is how action method looks after renaming:
Could you possibly update this article if there is an error with route parameter naming?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Comments on the Issue (you are @copilot in this section)
@brunolins16 I had a long discussion about this doc, specifically the polymorphic binder sample, and indeed the docs are confusing and not clear about binding from body.#26626
Related to usage of
authororauthorIdthe first example looks wrong should beauthor, in the route, while the second example explicit talks about a scenario where we want to keep the parameter name and a different route parameter name.I can send an PR with a quick fix while we decided to improve the doc here. </comment_new>
<comment_new>@wadepickett
🤖 AI Triage Summary
This preliminary assessment report was run by: @wadepickett
Date: 2026-02-23
Issue: 10341
Model: GitHub Copilot
Issue Analysis: Route Parameter Name Mismatch in Custom Model Binder Sample
✅ Issue Validation
Status: Valid and actionable
📋 Issue Summary
The issue reports a mismatch between the route template parameter name and the action method parameter name in the "Custom model binder sample" section of the Custom Model Binding article. The original documentation showed
[HttpGet("get/{authorId}")]with a method signature ofGet(Author author), causingbindingContext.ModelNameto be empty and the model binder to fail.The code sample files have since been corrected — both the 3.x and 2.x
BoundAuthorsController.csfiles now use{author}in the route template, matching the action parameter name. However, the article's explanatory text still contains references toauthorIdas the "default" name, which is inconsistent with the corrected samples and creates confusion for readers.Multiple community members and Microsoft contributors confirmed the issue:
authorin the route" and offered to send a PR.📁 Potentially Affected Files
aspnetcore/mvc/advanced/custom-model-binding.md](https://github.com/dotnet/AspNetCore.Docs/blob/87dab80208cfcc3e51da1e0684a833127c385447/aspnetcore/mvc/ad...✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews