ApiGroup.cshtml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. @using EVCB_OCPP.WEBAPI.Areas.HelpPage
  2. @using EVCB_OCPP.WEBAPI.Areas.HelpPage.Models
  3. @model IGrouping<HttpControllerDescriptor, ApiDescription>
  4. @{
  5. var controllerDocumentation = ViewBag.DocumentationProvider != null ?
  6. ViewBag.DocumentationProvider.GetDocumentation(Model.Key) :
  7. null;
  8. }
  9. <h2 id="@Model.Key.ControllerName">@Model.Key.ControllerName</h2>
  10. @if (!String.IsNullOrEmpty(controllerDocumentation))
  11. {
  12. <p>@controllerDocumentation</p>
  13. }
  14. <table class="help-page-table">
  15. <thead>
  16. <tr><th>API</th><th>Description</th></tr>
  17. </thead>
  18. <tbody>
  19. @foreach (var api in Model)
  20. {
  21. <tr>
  22. <td class="api-name"><a href="@Url.Action("Api", "Help", new { apiId = api.GetFriendlyId() })">@api.HttpMethod.Method @api.RelativePath</a></td>
  23. <td class="api-documentation">
  24. @if (api.Documentation != null)
  25. {
  26. <p>@api.Documentation</p>
  27. }
  28. else
  29. {
  30. <p>No documentation available.</p>
  31. }
  32. </td>
  33. </tr>
  34. }
  35. </tbody>
  36. </table>