9

ASP .net 4.5 and using WEB API 2 Help pages 5.2 (https://www.nuget.org/packages/Microsoft.AspNet.WebApi.HelpPage/5.2.2)

I have created all the page documentation for my web API functions that use model binding or query strings without any problem. However, when it comes to creating the help page for an API function that uses multi part form data there does not seem to be anyway of making the help page show what the form needs. For example, if the form has/accepts 10 fields including a file upload, how can I display that on the help page. I can't bind to a model because the web API does not work like that. Am I missing something simple here or is it just not possible.

I have searched the internet and a very similar question on stackoverflow (How to add Multipart Form Data parameter on WebAPI help page) but i have not found any helpful or possible options on how to overcome the problem.

I would really appreciate some help, information on this as im at a dead end.

Thanks All

Erik Philips
  • 53,428
  • 11
  • 128
  • 150
Jonnymaboy
  • 543
  • 2
  • 4
  • 18
  • 1
    Is there anyway someone can provide some helpful advice here? – Jonnymaboy Jan 08 '15 at 18:56
  • Although this isn't specifically an answer to your question, have you tried documenting your API in some other way. For example swagger (http://swagger.io) or ApiBluprint (https://apiblueprint.org) – Piers Karsenbarg Nov 15 '15 at 16:44
  • 1
    Can you show your action for receiving the form data please? – Martin Kearn Feb 27 '16 at 07:39
  • You could try to look at the ApiExplorer. You can do this by creating a temp action where you put a breakpoint. Call this `Configuration.Services.GetApiExplorer()` – Michael Oct 31 '16 at 21:53
  • 1st link on google> https://learn.microsoft.com/en-us/aspnet/web-api/overview/getting-started-with-aspnet-web-api/creating-api-help-pages Automating the documentation is probably impossible for this type of call. – RandomUs1r Oct 12 '17 at 22:22

0 Answers0