-
Couldn't load subscription status.
- Fork 25.1k
Minimal API responses.md: add missing IBindableFromHttpContext section #35999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't reviewed carefully, but I think at mininum the content needs to move to a different section. Let's work that out first and then flag me to re-review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need 4 different sample apps and 4 separate include files for this? I don't think the feature has changed substantially since ASP.NET Core 7 so I think we only need one app and feature description.
Also I think that describing this as "for advanced scenarios" is a bit vague. I think the point of this interface is to avoid the need for reflection and therefore to allow the app to be AOT compatible. If that's correct, I think we should state that explicitly.
You are correct Mike thanks, we can consolidate. After comparing versions 7-10 it looks like I can do the following:
|
|
Changed: After comparing versions 7-10: Kept parameter-binding7.md as a separate file since it represents a significantly different feature set (no form binding support) |
Fixed typo on code link
601f359 to
286b0e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds missing documentation for the IBindableFromHttpContext<T> interface in minimal APIs, which has been available since .NET 7 but was not previously documented. The documentation is being added retroactively to cover versions 7-10.
Key changes:
- Consolidated parameter binding documentation by merging separate version-specific files (8, 9, 10) into a single shared file covering versions 8-10
- Added new section documenting the
IBindableFromHttpContextinterface with examples - Created sample applications demonstrating custom parameter binding for both .NET 7 and .NET 10
- Updated version-specific include references to use the new consolidated file
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| parameter-binding.md | Updated include references to use consolidated version-agnostic file and added ai-usage metadata |
| parameter-binding8-10.md | New consolidated file combining versions 8-10 with added IBindableFromHttpContext section |
| parameter-binding7.md | Added IBindableFromHttpContext documentation for .NET 7 |
| parameter-binding8.md | Deleted (consolidated into parameter-binding8-10.md) |
| parameter-binding9.md | Deleted (consolidated into parameter-binding8-10.md) |
| minimal-apis.md | Updated include reference to use consolidated file |
| minimal-apis8.md | Updated include reference to use consolidated file |
| minimal-apis9.md | Updated include reference to use consolidated file |
| 7.0-samples/CustomBindingExample/* | New sample application demonstrating IBindableFromHttpContext for .NET 7 |
| 10.0-samples/CustomBindingExample/* | New sample application demonstrating IBindableFromHttpContext for .NET 10 |
Comments suppressed due to low confidence (1)
aspnetcore/fundamentals/minimal-apis/includes/parameter-binding8-10.md
Outdated
Show resolved
Hide resolved
aspnetcore/fundamentals/minimal-apis/includes/parameter-binding7.md
Outdated
Show resolved
Hide resolved
aspnetcore/fundamentals/minimal-apis/7.0-samples/CustomBindingExample/ValidatedParameters.cs
Outdated
Show resolved
Hide resolved
...re/fundamentals/minimal-apis/10.0-samples/CustomBindingExample/TestCustomBindingExample.http
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
aspnetcore/fundamentals/minimal-apis/includes/parameter-binding8-10.md
Outdated
Show resolved
Hide resolved
aspnetcore/fundamentals/minimal-apis/10.0-samples/CustomBindingExample/ValidatedParameters.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 20 out of 21 changed files in this pull request and generated no new comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
Fixes #32903
This was missed when it became available clear back in v7. (I did not own that at the time, but jumping in to fix it)
For versions 7-10 of the parameter-binding.md topic:
Custom parameter binding with IBindableFromHttpContext
Internal previews