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

Commit fc8b593

Browse files
authored
Merge pull request #6 from jpmorganchase/swagger_validator_fix
Disable swagger-ui validation (fixes #3)
2 parents e91294d + 2a3e8cd commit fc8b593

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

cakeshop-api/src/main/webapp/api.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
var url = window.location.pathname;
3737
url = url.substring(0, url.lastIndexOf("/"));
3838

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

4242
hljs.configure({
4343
highlightSizeThreshold: 5000
@@ -63,10 +63,11 @@
6363
jsonEditor: true,
6464
apisSorter: "alpha",
6565
defaultModelRendering: 'schema',
66-
showRequestHeaders: true
66+
showRequestHeaders: true,
67+
validatorUrl: null
6768
});
6869

69-
window.swaggerUiSocket = new SwaggerUi({
70+
window.swaggerUiSocket = new SwaggerUi({
7071
url: socket_url,
7172
dom_id: "swagger-ui-socket-container",
7273
supportedSubmitMethods: [],
@@ -82,11 +83,12 @@
8283
//jsonEditor: true,
8384
apisSorter: "alpha",
8485
defaultModelRendering: 'schema',
85-
showRequestHeaders: true
86+
showRequestHeaders: true,
87+
validatorUrl: null
8688
});
8789

8890
window.swaggerUi.load();
89-
window.swaggerUiSocket.load();
91+
window.swaggerUiSocket.load();
9092

9193
function log() {
9294
if ('console' in window) {

0 commit comments

Comments
 (0)