Closed yanxiaodi closed 3 years ago
Presumably you are aware of pros and cons of using a complex type in GET query with ModelBinding, you may make a fork to extend WebApiClientGen or introduce ModelBinding to WebApiClientGen directly. Then let's see how well this could go. Likely I am not making any significant change of WebApiClientGen in next few months, so your fork should be easily pulled and merged later.
However, please be aware of the technical scope of WebApiClientGen:
too old, no progress
Hi, I'm trying to generate web api clients for abp framwork. FYI: https://abp.io/
Currently I have a issue regarding the ModelBinding parameters for GET method. For some reason, abp uses dynamic controllers and
ModelBinding
for some GET requests, eg.GetListAsync
in some services. I got errors like:I checked the source code of webapiclientgen. In
MetaTransform
class, there are some methods to check the parameter type. If theparameterBinder
isFromUri
, and the below conditions are met:The method will throw an exception. However, the parameter actually can be attached in the url path. Just because the
ParameterType
is not a simple type so it fails. I'm wondering if we could investigate it for this specific scenario because abp is a good example of the modern ASP.NET Core applications. I'm happy to provide helps. Thanks.