-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Propagate PropertyInfo for AsParameters parameters #57264
Propagate PropertyInfo for AsParameters parameters #57264
Conversation
@dotnet-policy-service agree |
src/Mvc/Mvc.ApiExplorer/src/EndpointMetadataApiDescriptionProvider.cs
Outdated
Show resolved
Hide resolved
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! Left a few more comments to make the way we construct model metadata for parameters more resilient in the future.
@captainsafia were you able to see the response? I had the same idea but the ParameterInfo does not contain the ContainerType and also the reportedType will not be the same in the case I change to ParameterInfo( for Types that have a TryParse method) |
@jgarciadelanoceda Sorry for the delay...I needed a little bit of time to grok what you meant in your message.
The proposed change was for the
I see what you mean here. There is however an overload of |
Finally it worked inserting a new line in ForParameter method :), checking if the Member is a PropertyInfo and Propagating the ContainerType of that PropertyInfo |
src/Mvc/Mvc.Abstractions/src/ModelBinding/Metadata/ModelMetadataIdentity.cs
Outdated
Show resolved
Hide resolved
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.
LGTM! Thanks for iterating until we landed on a good spot.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Propagate PropertyInfo for AsParameters parameters
Fixes the issue #56764
It adds the ContainerType for AsParameters parameters to be able to solve the issue in SwashBuckle OpenApi documentation with XML comments