-
0 votesanswersviews
APIExplorer JsonPatchDocument AutoRest
我正在使用AutoRest自动生成客户端以调用我的API . 一切正常,直到我尝试添加JsonPatchDocument . 我想要的是API Explorer通过OpenAPI公开通用的数据类型,然后AutoRest组件生成对从AutoRest客户端生成的通用对象的属性执行操作所需的代码,因为我不相信生成的客户端应该要求知道未生成的通用参数结构 . 我看了看github并在网上搜索但是无法弄清楚... -
2 votesanswersviews
WebApi ApiExplorer ApiExplorerSettingsAttribute和IgnoreApi for Action Parameters
您可以使用ApiExplorerSettingsAttribute设置 IgnoreApi 属性来修饰控制器或操作方法,以便不生成帮助信息 . 如果您尝试将相同的内容应用于操作方法的属性,则会收到错误消息: public HttpResponseMessage Post([ApiExplorerSettings(IgnoreApi = true)]HttpRequestMessage reques... -
1 votesanswersviews
WebApi:ApiExplorer和Custom ModelBinders
我的大多数api路由都是这样分段的: /api/{segment}/MyEntity (即"/api/SegmentA/MyEntity") 我已经定义了一个ModelBinder,它从字符串转换为 Segment 对象,如下所示: class SegmentModelBinder : IModelBinder { public bool BindModel(HttpA...