Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
Disable swagger-ui validation (fixes #3)
Browse files Browse the repository at this point in the history
  • Loading branch information
chetan committed Dec 19, 2016
1 parent ba6883d commit 52da749
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions cakeshop-api/src/main/webapp/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
var url = window.location.pathname;
url = url.substring(0, url.lastIndexOf("/"));

rest_url = url + "/api/swagger.json";
socket_url = url + "/api/swagger-socket.json";
var rest_url = url + "/api/swagger.json";
var socket_url = url + "/api/swagger-socket.json";

hljs.configure({
highlightSizeThreshold: 5000
Expand All @@ -63,10 +63,11 @@
jsonEditor: true,
apisSorter: "alpha",
defaultModelRendering: 'schema',
showRequestHeaders: true
showRequestHeaders: true,
validatorUrl: null
});

window.swaggerUiSocket = new SwaggerUi({
window.swaggerUiSocket = new SwaggerUi({
url: socket_url,
dom_id: "swagger-ui-socket-container",
supportedSubmitMethods: [],
Expand All @@ -82,11 +83,12 @@
//jsonEditor: true,
apisSorter: "alpha",
defaultModelRendering: 'schema',
showRequestHeaders: true
showRequestHeaders: true,
validatorUrl: null
});

window.swaggerUi.load();
window.swaggerUiSocket.load();
window.swaggerUiSocket.load();

function log() {
if ('console' in window) {
Expand Down

0 comments on commit 52da749

Please sign in to comment.