Web API帮助页面-用户特定的响应类型 [英] Web API Help Pages - User-specific response type

查看:63
本文介绍了Web API帮助页面-用户特定的响应类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个API,该API根据用户输出不同的响应,并且我当前正在使用ResponseType属性来描述返回的响应类型,但这仅允许我指定一种响应类型,用户之间会有所不同.

I'm developing an API that outputs a different response based on the user, and I'm currently using the ResponseType attribute to describe the type of response that's returned, but this only allows me to specify one type of response, which will differ between users.

有什么方法可以自定义帮助页面以显示用户将获得的响应类型?

Is there any way I can customise the help pages to display the response type that the user will get?

推荐答案

帮助页面不支持这些动态响应类型,而是依赖于可用的静态信息.

HelpPage does not support these dynamic response types and relies on available static information.

HelpPage不支持前面提到的多种响应类型...事实上,我们允许 ResponseType 的多个属性是一个错误...根据当前代码逻辑,即使您提供多个属性,我们只选择一个...

HelpPage doesn't support multiple response types as mentioned earlier...the fact that we are allowing multiple attributes of ResponseType is a bug...as per current code logic, even if you supply multiple attributes, we only pick one...

这篇关于Web API帮助页面-用户特定的响应类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆