Fix Swagger console base URL location issue.

This commit is contained in:
Paulo Gustavo Veiga 2014-12-16 00:43:40 -03:00
parent fc213d5745
commit 2baf8c92fe
4 changed files with 188 additions and 190 deletions

View File

@ -8,7 +8,7 @@ BASE_DIR=`pwd`
TARGET_DIR=$BASE_DIR/target
JETTY_DIR=$TARGET_DIR/wisemapping-$WISE_VERSION
WISE_WEBAPP_DIR=$JETTY_DIR/webapps/wisemapping
JETTY_VERSION=8.1.14.v20131031
JETTY_VERSION=8.1.16.v20140903
JETTY_DIST_DIR=jetty-distribution-${JETTY_VERSION}
JETTY_ZIP=${JETTY_DIST_DIR}.zip

View File

@ -143,7 +143,7 @@ security.openid.enabled=false
# REST Documentation
#
# This properties are used for REST API Documentation( http://localhost:8080/doc/rest/index.html)
# This properties are used for REST API Documentation( http://localhost:8080/wisemapping/doc/rest/index.html)
# Change the URL for proper documentation console setup.
documentation.services.basePath=http://localhost:8080/wisemapping/service
documentation.services.version=3.0.1

View File

@ -1281,10 +1281,8 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
};
SwaggerUi.prototype.buildUrl = function(base, url) {
var parts;
console.log("base is " + base);
parts = base.split("/");
base = parts[0] + "//" + parts[2];
base = base.substring(0,base.indexOf("/doc/"));
if (url.indexOf("/") === 0) {
return base + url;
} else {