-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71955f9
commit 204ae1c
Showing
2 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
<html lang="en-us"> | ||
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2017"> | ||
<meta name="description" content="Couchbase connectors enable you to exchange data with a number of other platforms."> | ||
<title>API Explorer</title> | ||
</head> | ||
<body> | ||
<main> | ||
<h1 class="title topictitle1" id="ariaid-title1">API Explorer</h1> | ||
<div class="body"> | ||
<div class="swagger-section"> | ||
<div id="swagger-ui-container" class="swagger-ui-wrap"></div> | ||
</div> | ||
|
||
<!-- JS + CSS for Swagger UI. Taken from http://bit.ly/2egga8o --> | ||
<link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32" /> | ||
<link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16" /> | ||
<link href='https://cb-docs-swagger.s3.amazonaws.com/dist/css/typography.css' media='screen' rel='stylesheet' type='text/css'/> | ||
<link href='https://cb-docs-swagger.s3.amazonaws.com/dist/css/reset.css' media='screen' rel='stylesheet' type='text/css'/> | ||
<link href='https://cb-docs-swagger.s3.amazonaws.com/dist/css/screen.css' media='screen' rel='stylesheet' type='text/css'/> | ||
<link href='https://cb-docs-swagger.s3.amazonaws.com/dist/css/reset.css' media='print' rel='stylesheet' type='text/css'/> | ||
<link href='https://cb-docs-swagger.s3.amazonaws.com/dist/css/print.css' media='print' rel='stylesheet' type='text/css'/> | ||
|
||
<!-- jQuery is already imported by AuthX so we don't need it --> | ||
<!--<script src='https://cb-docs-swagger.s3.amazonaws.com/dist/lib/jquery-1.8.0.min.js' type='text/javascript'></script>--> | ||
<script src='https://cb-docs-swagger.s3.amazonaws.com/dist/lib/object-assign-pollyfill.js' type='text/javascript'></script> | ||
<!--<script src='https://code.jquery.com/jquery-1.8.0.js' type='text/javascript'></script>--> | ||
<script src='https://cb-docs-swagger.s3.amazonaws.com/dist/lib/handlebars-4.0.5.js' type='text/javascript'></script> | ||
<script src='https://cb-docs-swagger.s3.amazonaws.com/dist/lib/lodash.min.js' type='text/javascript'></script> | ||
<script src='https://cb-docs-swagger.s3.amazonaws.com/dist/lib/backbone-min.js' type='text/javascript'></script> | ||
<script src='https://cb-docs-swagger.s3.amazonaws.com/dist/lib/highlight.9.1.0.pack.js' type='text/javascript'></script> | ||
<script src='https://cb-docs-swagger.s3.amazonaws.com/dist/lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script> | ||
<script src='https://cb-docs-swagger.s3.amazonaws.com/dist/lib/jsoneditor.min.js' type='text/javascript'></script> | ||
<script src='https://cb-docs-swagger.s3.amazonaws.com/dist/lib/marked.js' type='text/javascript'></script> | ||
<!--<script src='https://cb-docs-swagger.s3.amazonaws.com/dist/lib/jquery.ba-bbq.min.js' type='text/javascript'></script>--> | ||
<script src="https://cb-docs-swagger.s3.amazonaws.com/dist/swagger-ui-curl.min.js"></script> | ||
<script type="text/javascript"> | ||
var interval = setInterval(checkjQueryIsLoaded, 100); | ||
function checkjQueryIsLoaded() { | ||
if ($.fn.jquery == '1.11.1') { | ||
$.getScript('https://cb-docs-swagger.s3.amazonaws.com/dist/lib/jquery.ba-bbq.min.js', function () { | ||
$.getScript('https://cb-docs-swagger.s3.amazonaws.com/dist/lib/jquery.slideto.min.js', function () { | ||
$.getScript('https://cb-docs-swagger.s3.amazonaws.com/dist/lib/jquery.wiggle.min.js', function () { | ||
$.getScript('https://cb-docs-swagger.s3.amazonaws.com/dist/lib/swagger-oauth.js', function () { | ||
var url = window.location.search.match(/url=([^&]+)/); | ||
if (url && url.length > 1) { | ||
url = decodeURIComponent(url[1]); | ||
} else { | ||
url = "http://petstore.swagger.io/v2/swagger.json"; | ||
} | ||
hljs.configure({ | ||
highlightSizeThreshold: 5000 | ||
}); | ||
// Pre load translate... | ||
if (window.SwaggerTranslator) { | ||
window.SwaggerTranslator.translate(); | ||
} | ||
window.swaggerUi = new SwaggerUi({ | ||
url: 'https://s3.amazonaws.com/cb-docs-swagger/specs/sync-gateway-public.json', | ||
dom_id: "swagger-ui-container", | ||
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'], | ||
onComplete: function (swaggerApi, swaggerUi) { | ||
if (typeof initOAuth == "function") { | ||
initOAuth({ | ||
clientId: "your-client-id", | ||
clientSecret: "your-client-secret-if-required", | ||
realm: "your-realms", | ||
appName: "your-app-name", | ||
scopeSeparator: ",", | ||
additionalQueryStringParams: {} | ||
}); | ||
} | ||
if (window.SwaggerTranslator) { | ||
window.SwaggerTranslator.translate(); | ||
} | ||
}, | ||
onFailure: function (data) { | ||
log("Unable to Load SwaggerUI"); | ||
}, | ||
docExpansion: "none", | ||
jsonEditor: false, | ||
defaultModelRendering: 'schema', | ||
showRequestHeaders: false | ||
}); | ||
window.swaggerUi.load(); | ||
function log() { | ||
if ('console' in window) { | ||
console.log.apply(console, arguments); | ||
} | ||
} | ||
}); | ||
}); | ||
}); | ||
}); | ||
window.clearInterval(interval); | ||
} | ||
} | ||
</script> | ||
<style> | ||
/* Override AuthX styles for swagger */ | ||
.story .abstract, .story dl, .story p, .story td, .story th { | ||
font-size: 100% !important; | ||
} | ||
.body .swagger-section h2, .body .swagger-section h3 { | ||
margin-bottom: 0 !important; | ||
} | ||
.article .related-links:before, .story h2 { | ||
margin-top: 0 !important; | ||
} | ||
|
||
/* Hide Swagger description */ | ||
#api_info { | ||
display: none; | ||
} | ||
|
||
/* Override Swagger css */ | ||
.body > h3 { | ||
margin-top: 25px !important; | ||
margin-bottom: 25px !important; | ||
} | ||
.body { | ||
width: 100% !important; | ||
} | ||
#global-header { | ||
font-family: "Kievit OT",sans-serif; | ||
} | ||
.swagger-section h4 { | ||
font-size: inherit !important; | ||
} | ||
</style> | ||
</div> | ||
</main> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters