#25 Update swagger-ui version

This commit is contained in:
elvinchan 2019-05-16 09:03:11 +08:00
parent e4b714794f
commit 713d93196b

View File

@ -1,7 +1,7 @@
package echoswagger package echoswagger
// CDN refer to https://www.jsdelivr.com/package/npm/swagger-ui-dist // CDN refer to https://www.jsdelivr.com/package/npm/swagger-ui-dist
const DefaultCDN = "https://cdn.jsdelivr.net/npm/swagger-ui-dist@3.19.0" const DefaultCDN = "https://cdn.jsdelivr.net/npm/swagger-ui-dist@3.22.1"
const SwaggerUIContent = `{{define "swagger"}} const SwaggerUIContent = `{{define "swagger"}}
<!DOCTYPE html> <!DOCTYPE html>
@ -64,7 +64,7 @@ const SwaggerUIContent = `{{define "swagger"}}
} }
spec.basePath = basePath spec.basePath = basePath
} }
// Build a system // Begin Swagger UI call region
const ui = SwaggerUIBundle({ const ui = SwaggerUIBundle({
url: window.location.origin+window.location.pathname+specPath, url: window.location.origin+window.location.pathname+specPath,
spec: spec, spec: spec,
@ -79,6 +79,7 @@ const SwaggerUIContent = `{{define "swagger"}}
], ],
layout: "StandaloneLayout" layout: "StandaloneLayout"
}) })
// End Swagger UI call region
window.ui = ui window.ui = ui
} }