aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/apidocs/endpoint.html.haml
blob: 63af8b6560ddf488bc1bb2db2d398ec1d44cfb9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- title "aclog API: #{format_endpoint_name(@endpoint)}"
%h1= format_endpoint_name(@endpoint)
%p= @endpoint.route_description
%h2 Resource URL
%p= api_url + @endpoint.route_path
%h2 Parameters
%table.table.api-params
  %tbody
    - @endpoint.route_params.each do |name, options|
      %tr
        %th
          = name
          - if options[:required]
            %small required
          - else
            %small optional
        %td
          %p= options[:desc]
          %p
            %b> Type
            \:
            = options[:type]
- if @example_request_uri
  %h2 Example Request
  %p
    %span= @endpoint.route_method
    %code#example_request_uri= @example_request_uri
  %pre
    %code
      #example_request_loading= image_tag "loading.gif", alt: "loading..."