doctype html
html(lang="en")
  head
    title Girder - REST API Documentation
    link(href='//fonts.googleapis.com/css?family=Droid+Sans:400,700', rel='stylesheet', type='text/css')
    link(href='#{staticRoot}/lib/fontello/css/fontello.css', rel='stylesheet')
    link(href='#{staticRoot}/built/swagger/css/highlight.default.css', rel='stylesheet')
    link(href='#{staticRoot}/built/swagger/css/screen.css', rel='stylesheet')
    link(href='#{staticRoot}/built/swagger/docs.css', rel='stylesheet')
    script(src='#{staticRoot}/built/swagger/lib/jquery-1.8.0.min.js')
    script(src='#{staticRoot}/built/swagger/lib/jquery.slideto.min.js')
    script(src='#{staticRoot}/built/swagger/lib/jquery.wiggle.min.js')
    script(src='#{staticRoot}/built/swagger/lib/jquery.ba-bbq.min.js')
    script(src='#{staticRoot}/built/swagger/lib/handlebars-1.0.0.js')
    script(src='#{staticRoot}/built/swagger/lib/underscore-min.js')
    script(src='#{staticRoot}/built/swagger/lib/backbone-min.js')
    script(src='#{staticRoot}/built/swagger/lib/shred.bundle.js')
    script(src='#{staticRoot}/built/swagger/lib/require.js')
    script(src='#{staticRoot}/built/swagger/lib/swagger.js')
    script(src='#{staticRoot}/built/swagger/swagger-ui.min.js')
    script(src='#{staticRoot}/built/swagger/lib/highlight.7.3.pack.js')

    script(type="text/javascript").
      $(function () {
        var swaggerUi = new SwaggerUi({
          url: window.location.origin + window.location.pathname + '/describe',
          dom_id: 'swagger-ui-container',
          supportHeaderParams: false,
          supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
          onComplete: function (swaggerApi, swaggerUi) {
            $('pre code').each(function (i, e) {
              hljs.highlightBlock(e);
            });
          },
          onFailure: function (data) {
            if(console) {
              console.log("Unable to Load SwaggerUI");
              console.log(data);
            }
          },
          docExpansion: "none"
        });
        swaggerUi.load();
      });

  body
    .docs-header
      span Girder REST API Documentation
      i.icon-book-alt.right
    .docs-body
      p.
        Below you will find the list of all of the resource types exposed by the Girder
        RESTful Web API. Click any of the resource links to open up a list of all available
        endpoints related to each resource type.
      p.
        Clicking any of those endpoints will display detailed documentation about the purpose
        of each endpoint and the input parameters and output values. You can also call API
        endpoints directly from this page by typing in the parameters you wish to pass and then
        clicking the "Try it out!" button.
      p
        b Warning:
        |  This is not a sandbox&mdash;calls that you make from this page are the same as calling
        | the API with any other client, so update or delete calls that you make will affect the
        | actual data on the server.
    #swagger-ui-container.swagger-ui-wrap.docs-swagger-container
