<tr>
  <td><%= partial 'partials/file_link', :locals => {:file => wadl } %></td>
  <td><%= partial 'partials/file_link', :locals => {:file => swagger_yaml } %></td>
  <td><%= partial 'partials/file_link', :locals => {:file => swagger_json } %></td>
  <td>
  <%- if swagger_json.nil? -%>
    N/A
  <%- else -%>
    <%- raw_git_url = "https://rawgit.com/rackerlabs/wadl2swagger/gh-pages/swagger/" -%>
    <%- validator_url = "http://online.swagger.io/validator?url=#{raw_git_url}#{basename}.json" -%>
    <%- validator_debug_url = "http://online.swagger.io/validator/debug?url=#{raw_git_url}#{basename}.json" -%>
    <!-- Issues with Content-Type and Access-Control-Allow-Origin for YAML files prevent us from opening the YAML directly from GitHub. We can serve them as JSON. -->
    <%- edit_url = "http://editor.swagger.io/#/edit?import=#{raw_git_url}#{basename}.json" -%>
    <a href="<%= edit_url %>"><img src="<%= validator_url %>"/></a>
  </td>
  <%- end -%>
</tr>

<tr>
  <td><%= partial 'partials/file_link', :locals => {:file => wadl } %></td>
  <td><%= partial 'partials/file_link', :locals => {:file => swagger_yaml } %></td>
  <td><%= partial 'partials/file_link', :locals => {:file => swagger_json } %></td>
  <td>
  <%- if swagger_json.nil? -%>
    N/A
  <%- else -%>
    <%- raw_git_url = "https://rawgit.com/rackerlabs/wadl2swagger/gh-pages/swagger/" -%>
    <%- validator_url = "http://online.swagger.io/validator?url=#{raw_git_url}#{basename}.json" -%>
    <%- validator_debug_url = "http://online.swagger.io/validator/debug?url=#{raw_git_url}#{basename}.json" -%>
    <%- edit_url = "http://editor.swagger.io/#/edit?import=#{raw_git_url}#{basename}.yaml" -%>
    <a href="<%= edit_url %>"><img src="<%= validator_url %>" target="_blank"/></a>
  </td>
  <%- end -%>
</tr>

Load editor w/ YAML again, and open links in a new window.
Load editor w/ YAML again, and open links in a new window.
