-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
109 lines (99 loc) · 9.66 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="x-ua-compatible" content="IE=edge">
<title>Swagger UI</title>
<link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16" />
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
<link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
<script src='lib/object-assign-pollyfill.js' type='text/javascript'></script>
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
<script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
<script src='lib/handlebars-4.0.5.js' type='text/javascript'></script>
<script src='lib/lodash.min.js' type='text/javascript'></script>
<script src='lib/backbone-min.js' type='text/javascript'></script>
<script src='swagger-ui.js' type='text/javascript'></script>
<script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
<script src='lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script>
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
<script src='lib/marked.js' type='text/javascript'></script>
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
<!-- Some basic translations -->
<!-- <script src='lang/translator.js' type='text/javascript'></script> -->
<!-- <script src='lang/ru.js' type='text/javascript'></script> -->
<!-- <script src='lang/en.js' type='text/javascript'></script> -->
<script type="text/javascript">
$(function () {
var url = window.location.search.match(/url=([^&]+)/);
if (url && url.length > 1) {
url = decodeURIComponent(url[1]);
} else {
url = "abc";
}
hljs.configure({
highlightSizeThreshold: 5000
});
// Pre load translate...
if(window.SwaggerTranslator) {
window.SwaggerTranslator.translate();
}
window.swaggerUi = new SwaggerUi({
url: url,
spec:{"swagger":"2.0","info":{"version":"1.0.0","title":"Pathfinding API","description":"A pathfinding API for rovers"},"paths":{"/":{"get":{"summary":"get server","description":"get server","responses":{"200":{"description":"OK"}}}},"/{ProblemId}":{"parameters":[{"name":"ProblemId","in":"path","type":"string","description":"Id of the path finding problem","required":true}],"get":{"summary":"get something","description":"get something","responses":{"200":{"description":"OK"}}},"post":{"summary":"Create a new problem","description":"Create a new problem","responses":{"200":{"description":"OK"},"400":{"description":"input invalid"},"409":{"description":"Item Existed"}}}},"/{ProblemId}/Obstacles/{ObstacleId}":{"parameters":[{"name":"ProblemId","in":"path","type":"string","description":"Id of the path finding problem","required":true},{"name":"ObstacleId","in":"path","type":"string","description":"Id of the obstacle","required":true}],"post":{"summary":"Create a new obstacle","description":"Create a new obstacle","parameters":[{"name":"body","in":"body","description":"obstacle object","schema":{"$ref":"#/definitions/ObstacleObj"},"required":true}],"responses":{"200":{"description":"OK"},"400":{"description":"input invalid"},"404":{"description":"item is not found"},"409":{"description":"Item Existed"}}},"put":{"summary":"Update a new Obstacle","description":"Update a new Obstacle","parameters":[{"name":"body","in":"body","description":"obstacle object","schema":{"$ref":"#/definitions/ObstacleObj"},"required":true}],"responses":{"200":{"description":"OK"},"400":{"description":"input invalid"},"404":{"description":"item is not found"}}},"delete":{"summary":"Delete a new Obstacle","description":"Delete a new Obstacle","responses":{"200":{"description":"OK"},"404":{"description":"item is not found"}}}},"/{ProblemId}/Robot":{"parameters":[{"name":"ProblemId","in":"path","type":"string","description":"ID of the path finding problem","required":true}],"post":{"summary":"Create the Robot","description":"Create the Robot","parameters":[{"name":"body","in":"body","description":"robot object","schema":{"$ref":"#/definitions/RobotObj"},"required":true}],"responses":{"200":{"description":"OK"},"409":{"description":"Item Existed"},"400":{"description":"input invalid"},"404":{"description":"item is not found"}}},"put":{"summary":"Update the Robot","description":"Update the Robot","parameters":[{"name":"body","in":"body","description":"robot object","schema":{"$ref":"#/definitions/RobotObj"},"required":true}],"responses":{"200":{"description":"OK"},"404":{"description":"Item is not found"},"400":{"description":"input invalid"}}}},"/{ProblemId}/Goal":{"parameters":[{"name":"ProblemId","in":"path","type":"string","description":"ID of the path finding problem","required":true}],"post":{"summary":"Create the Goal","description":"Create the Goal","parameters":[{"name":"body","in":"body","description":"goal object","schema":{"$ref":"#/definitions/GoalObj"},"required":true}],"responses":{"200":{"description":"OK"},"409":{"description":"Item Existed"},"400":{"description":"input invalid"},"404":{"description":"item is not found"}}},"put":{"summary":"Update the Goal","description":"Update the Goal","parameters":[{"name":"body","in":"body","description":"goal object","schema":{"$ref":"#/definitions/GoalObj"},"required":true}],"responses":{"200":{"description":"OK"},"404":{"description":"Item is not found"},"400":{"description":"input invalid"}}}},"/{ProblemId}/Boundary":{"parameters":[{"name":"ProblemId","in":"path","type":"string","description":"ID of the path finding problem","required":true}],"post":{"summary":"Create the Boundary","description":"Create the Boundary","parameters":[{"name":"body","in":"body","description":"boundary object","schema":{"$ref":"#/definitions/BoundaryObj"},"required":true}],"responses":{"200":{"description":"OK"},"409":{"description":"Item Existed"},"400":{"description":"input invalid"},"404":{"description":"item is not found"}}},"put":{"summary":"Update the Boundary","description":"Update the Boundary","parameters":[{"name":"body","in":"body","description":"boundary object","schema":{"$ref":"#/definitions/BoundaryObj"},"required":true}],"responses":{"200":{"description":"OK"},"404":{"description":"Item is not found"},"400":{"description":"input invalid"}}}},"/{ProblemId}/Path":{"parameters":[{"name":"ProblemId","in":"path","type":"string","description":"ID of the path finding problem","required":true}],"get":{"summary":"return the path","description":"return the path","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PathObj"}},"400":{"description":"Data not invalid"},"404":{"description":"item is not found"}}}}},"definitions":{"ObstacleObj":{"type":"object","properties":{"width":{"type":"number","format":"float"},"length":{"type":"number","format":"float"},"point":{"$ref":"#/definitions/Point"}}},"RobotObj":{"type":"object","properties":{"radius":{"type":"number","format":"float"},"point":{"$ref":"#/definitions/Point"}}},"GoalObj":{"type":"object","properties":{"point":{"$ref":"#/definitions/Point"}}},"BoundaryObj":{"type":"object","properties":{"width":{"type":"number","format":"float"},"length":{"type":"number","format":"float"},"point":{"$ref":"#/definitions/Point"}}},"Point":{"type":"object","properties":{"x":{"type":"number","format":"float"},"y":{"type":"number","format":"float"}}},"PathObj":{"type":"object","properties":{"points":{"type":"array","items":{"$ref":"#/definitions/Point"}}}}},"schemes":["https","http"],"host":"35.163.233.15","basePath":"/"},
dom_id: "swagger-ui-container",
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
onComplete: function(swaggerApi, swaggerUi){
if(typeof initOAuth == "function") {
initOAuth({
clientId: "your-client-id",
clientSecret: "your-client-secret-if-required",
realm: "your-realms",
appName: "your-app-name",
scopeSeparator: " ",
additionalQueryStringParams: {}
});
}
if(window.SwaggerTranslator) {
window.SwaggerTranslator.translate();
}
},
onFailure: function(data) {
log("Unable to Load SwaggerUI");
},
docExpansion: "none",
jsonEditor: false,
defaultModelRendering: 'schema',
showRequestHeaders: false,
showOperationIds: false
});
window.swaggerUi.load();
function log() {
if ('console' in window) {
console.log.apply(console, arguments);
}
}
});
</script>
</head>
<body class="swagger-section">
<div id='header'>
<div class="swagger-ui-wrap">
<a id="logo" href="http://swagger.io"><img class="logo__img" alt="swagger" height="30" width="30" src="images/logo_small.png" /><span class="logo__title">swagger</span></a>
<form id='api_selector'>
<div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
<div id='auth_container'></div>
<div class='input'><a id="explore" class="header__btn" href="#" data-sw-translate>Explore</a></div>
</form>
</div>
</div>
<div id="message-bar" class="swagger-ui-wrap" data-sw-translate> </div>
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
</body>
</html>