Web API Help Pages - User-specific response type

拟墨画扇 提交于 2019-12-10 21:49:11

问题


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?


回答1:


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

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...



来源:https://stackoverflow.com/questions/22400428/web-api-help-pages-user-specific-response-type

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!