extends layout

block head
  link(rel='stylesheet',href='documentation.css')

block content
  if general
    .call
      .head.general General
      .body
        .general!= general
  each call in calls
    div.call(class=call.classes)
      .head
        label.method= call.method
        label.path= call.path
        if call.proxy
          label.proxy [proxy]
      .body
        if call.description
          .description!= call.description
        if call.input.length > 0
          .in
            h2 Request
            ul
              each input in call.input
                li= input
        .out
          h2 Success Response
          ul
            each output in call.output
              li= output
          .response
            pre
              code= call.response
          if (call.errors)
            .errors
              h2 Error Responses
              each error in call.errors
                .error
                  h3 Error: #{error.name}
                  if error.description
                    .description= error.description
                  .status @status #{error.response.status}
                  pre
                    code= error.response.body
  script(src='zepto.min.js')
  script(src='documentation.js')
  script
    hljs.initHighlightingOnLoad();