You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HelpPageApiModel.cshtml 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. @using System.Web.Http
  2. @using System.Web.Http.Description
  3. @using CacheControl_test.Areas.HelpPage.Models
  4. @using CacheControl_test.Areas.HelpPage.ModelDescriptions
  5. @model HelpPageApiModel
  6. @{
  7. ApiDescription description = Model.ApiDescription;
  8. }
  9. <h1>@description.HttpMethod.Method @description.RelativePath</h1>
  10. <div>
  11. <p>@description.Documentation</p>
  12. <h2>Request Information</h2>
  13. <h3>URI Parameters</h3>
  14. @Html.DisplayFor(m => m.UriParameters, "Parameters")
  15. <h3>Body Parameters</h3>
  16. <p>@Model.RequestDocumentation</p>
  17. @if (Model.RequestModelDescription != null)
  18. {
  19. @Html.DisplayFor(m => m.RequestModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.RequestModelDescription })
  20. if (Model.RequestBodyParameters != null)
  21. {
  22. @Html.DisplayFor(m => m.RequestBodyParameters, "Parameters")
  23. }
  24. }
  25. else
  26. {
  27. <p>None.</p>
  28. }
  29. @if (Model.SampleRequests.Count > 0)
  30. {
  31. <h3>Request Formats</h3>
  32. @Html.DisplayFor(m => m.SampleRequests, "Samples")
  33. }
  34. <h2>Response Information</h2>
  35. <h3>Resource Description</h3>
  36. <p>@description.ResponseDescription.Documentation</p>
  37. @if (Model.ResourceDescription != null)
  38. {
  39. @Html.DisplayFor(m => m.ResourceDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ResourceDescription })
  40. if (Model.ResourceProperties != null)
  41. {
  42. @Html.DisplayFor(m => m.ResourceProperties, "Parameters")
  43. }
  44. }
  45. else
  46. {
  47. <p>None.</p>
  48. }
  49. @if (Model.SampleResponses.Count > 0)
  50. {
  51. <h3>Response Formats</h3>
  52. @Html.DisplayFor(m => m.SampleResponses, "Samples")
  53. }
  54. </div>