You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When accepting any parameter in Minimal APIs that implements BindAsync you lose any automatic parameter metadata being emitted by the framework. You can use the IProvideEndpointParameterMetadata interface on the type you're actually binding (GetOrderByIdRequest in this case) to implement the metadata you want to return but note that there is currently no support in Minimal APIs for specifying path or querystring (i.e. non-body) parameters from endpoint metadata (that's coming in .NET 7.0, see dotnet/aspnetcore#40084).
For this to work today I'd need to add a feature to this library to support specifying non-body parameter metadata on route handlers and then projecting those into the ApiExplorer (via the custom provider in this library). Then I could update ModelBinder<TBinder> to automatically discover attribute-based metadata from the specified TBinder and flow that into the endpoint metadata. That shouldn't be too difficult but ultimately would likely look different to the same functionality when it lands in .NET 7.0.
Hi!
every thing works fine, but swagger does not show parameters info when using mvc ModelBinder.
my code:
The text was updated successfully, but these errors were encountered: