Skip to content

Instantly share code, notes, and snippets.

@ponelat
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ponelat/0e332938e0c53e20e001 to your computer and use it in GitHub Desktop.
Save ponelat/0e332938e0c53e20e001 to your computer and use it in GitHub Desktop.
Inline your swagger spec into swagger-ui's index.html file
// This goes in the dist/index.html file found in swagger-ui.
// Be careful that the file gets overwritten when you build swagger-ui
window.swaggerUi = new SwaggerUi({
url: url,
spec: {
// ...
// your spec here
// ....
},
dom_id: "swagger-ui-container",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment