Skip to content

Commit

Permalink
Integrate swagger-ui for a bit better API visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Castell committed Nov 9, 2018
1 parent 253fe57 commit 20be8e5
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 704 deletions.
42 changes: 42 additions & 0 deletions website/content/api/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: "API"
date: 2017-06-30T14:58:54+02:00
---

<link rel="stylesheet" type="text/css" href="/css/swagger-ui.css">
<style>
body {
line-height: 1.7;
}
.swagger-ui .info .title small pre {
background-color: inherit;
padding: inherit;
}
.swagger-ui .scheme-container { display: none !important; }
</style>

<div id="swagger-ui"></div>

<script src="/js/swagger-ui-bundle.js"> </script>
<script src="/js/swagger-ui-standalone-preset.js"> </script>
<script>
window.onload = function () {
// Begin Swagger UI call region
const ui = SwaggerUIBundle({
url: "https://dkron.io/swagger.yaml",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "BaseLayout"
})
// End Swagger UI call region

window.ui = ui
}
</script>
Loading

0 comments on commit 20be8e5

Please sign in to comment.