Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onload = function() {
- fetch('./swagger.json')
- .then(function(response) {
- response.json()
- .then(function(json) {
- json.schemes[0] = window.location.protocol.slice(0, -1)
- json.host = window.location.host
- const ui = SwaggerUIBundle({
- spec: json,
- dom_id: '#swagger-ui',
- deepLinking: true,
- presets: [
- SwaggerUIBundle.presets.apis
- ],
- plugins: [
- SwaggerUIBundle.plugins.DownloadUrl
- ]
- })
- window.ui = ui
- })
- })
- }
Add Comment
Please, Sign In to add comment