Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ksh93
if [ ! -d "$1" ]; then
echo "First argument must be the directory where the runtime ZIP has been extracted. For example '~/Downloads/birt'."
exit 1
fi
RUNTIME_PATH=${1}
LIB_PATH="${RUNTIME_PATH}/ReportEngine/lib"
ADDONS_PATH="${RUNTIME_PATH}/ReportEngine/addons"
@webron
webron / Instructions.md
Last active February 11, 2021 14:06
Load multiple resources to swagger-ui - work by @ponelat

Steps to follow:

  1. Create a new global SwaggerUi object, make sure to give the global variable a new name (in this case, swaggerUi2 - https://gist.github.com/webron/7c41db7f777471fcbc10#file-index-html-L59-L84.
  2. Assign a new URL - https://gist.github.com/webron/7c41db7f777471fcbc10#file-index-html-L60 - in this case, we use the same pet store URL, but just change the value to the swagger.json you want to display.
  3. Provide a unique dom_id - in this case we went with swagger-ui-container2 - https://gist.github.com/webron/7c41db7f777471fcbc10#file-index-html-L61
  4. Load the new SwaggerUi object - https://gist.github.com/webron/7c41db7f777471fcbc10#file-index-html-L103
  5. Add a <div> to display it. In it, make sure the id is set to the dom_id set in step 3, and that the class is swagger-ui-wrap so that the CSS is applied - https://gist.github.com/webron/7c41db7f777471fcbc10#file-index-html-L135

You can repeat the steps above as many times as needed, just make sure to provide a unique `dom_i