Asp.Net Web API:[fromUri]对象参数在Web API文档中显示不正确.引发400错误请求 [英] Asp.Net Web API : [fromUri] object parameters does not come up fine in Web API Documentation. Throws 400 Bad Request

查看:55
本文介绍了Asp.Net Web API:[fromUri]对象参数在Web API文档中显示不正确.引发400错误请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,如果这不是提出这个问题的合适论坛,请原谅.我不确定这属于哪一类.

Firstly excuse me if this is not the right forum to ask this question. I was not sure which category this would fall into.

我们正在使用Asp.Net Web API创建我们的API.并使用默认的Web API帮助文档在帮助页面中显示API详细信息.如果我为方法提供单独的参数,则效果很好.但是如果我使用对象作为参数 并添加[fromUri]该文档不会出现.该API列在帮助页面上,但是当我单击API以查看完整的文档(来自XML)时,会引发400 Bad Request错误.

We are using Asp.Net Web API to create our APIs. And using the default Web API Help documentation for presenting the API details in help page. It works perfectly fine if I provide the individual parameters to the method. But if I use an object as a parameter and add [fromUri] the documentation does not come up. The API is listed on the help page but when I click on the API to see the full documentation (from XML), it throws 400 Bad Request error.

但是,如果我删除[fromUri]并添加单个参数,则文档会很好显示.

But if I remove [fromUri] and add individual parameters the documentation comes up fine. 

如果这是已知问题?

在此方面的任何帮助都将受到高度赞赏.

Any help on this is highly appreciated.

谢谢

Preethi

Preethi Chappidi

Preethi Chappidi

推荐答案

嗨Preethi,

Hi Preet

此论坛讨论的是Visual Studio WPF/SL设计器,Visual Studio指导自动化工具包,开发人员文档和帮助系统以及Visual Studio编辑器.

This forum is discussing Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.

我建议您最好将问题重新发布到以下论坛,以获得更好的答案.谢谢您的理解.

I suggest that you had better repost the issue to the following forum for a better answer. Thank you for your understanding.

https://forums.asp.net/1246.aspx/1?Web+API

此致

奥斯卡


这篇关于Asp.Net Web API:[fromUri]对象参数在Web API文档中显示不正确.引发400错误请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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