Skip to content

Commit 8208cc7

Browse files
committed
refactor: Add v2 documentation
1 parent 8b01290 commit 8208cc7

8 files changed

+133
-8
lines changed

dist/favicon-16x16.png

-665 Bytes
Binary file not shown.

dist/favicon-32x32.png

-628 Bytes
Binary file not shown.

dist/swagger-initializer-v1.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
window.onload = function() {
2+
//<editor-fold desc="Changeable Configuration Block">
3+
4+
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
5+
window.ui = SwaggerUIBundle({
6+
url: "https://api.star-citizen.wiki/api/openapi",
7+
dom_id: '#swagger-ui',
8+
deepLinking: true,
9+
presets: [
10+
SwaggerUIBundle.presets.apis,
11+
SwaggerUIStandalonePreset
12+
],
13+
plugins: [
14+
SwaggerUIBundle.plugins.DownloadUrl
15+
],
16+
layout: "StandaloneLayout"
17+
});
18+
19+
//</editor-fold>
20+
};

dist/swagger-initializer-v2.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
window.onload = function() {
2+
//<editor-fold desc="Changeable Configuration Block">
3+
4+
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
5+
window.ui = SwaggerUIBundle({
6+
url: "https://api.star-citizen.wiki/api/v2/openapi",
7+
dom_id: '#swagger-ui',
8+
deepLinking: true,
9+
presets: [
10+
SwaggerUIBundle.presets.apis,
11+
SwaggerUIStandalonePreset
12+
],
13+
plugins: [
14+
SwaggerUIBundle.plugins.DownloadUrl
15+
],
16+
layout: "StandaloneLayout"
17+
});
18+
19+
//</editor-fold>
20+
};

favicon.ico

1.12 KB
Binary file not shown.

index.html

+57-8
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,65 @@
44
<head>
55
<meta charset="UTF-8">
66
<title>Swagger UI</title>
7-
<link rel="stylesheet" type="text/css" href="dist/swagger-ui.css" />
8-
<link rel="stylesheet" type="text/css" href="dist/index.css" />
9-
<link rel="icon" type="image/png" href="dist/favicon-32x32.png" sizes="32x32" />
10-
<link rel="icon" type="image/png" href="dist/favicon-16x16.png" sizes="16x16" />
7+
<link rel="icon" type="image/ico" href="favicon.ico" sizes="16x16" />
8+
<style>
9+
html, body {
10+
height: 100%;
11+
background: #14181f;
12+
font-family: sans-serif;
13+
color: #fff;
14+
}
15+
16+
body {
17+
display: flex;
18+
justify-content: center;
19+
}
20+
21+
h1 {
22+
font-size: 3rem;
23+
margin-bottom: 4rem;
24+
}
25+
26+
main {
27+
display: flex;
28+
flex-direction: column;
29+
justify-content: center;
30+
align-content: center;
31+
height: 100%;
32+
text-align: center;
33+
}
34+
div {
35+
display: flex;
36+
justify-content: space-around;
37+
gap: 2rem;
38+
}
39+
a {
40+
display: block;
41+
padding: 4rem;
42+
background: #1d2330;
43+
color: #fff;
44+
border-radius: 1rem;
45+
text-decoration: none;
46+
transition: background 0.2s ease;
47+
font-weight: bold;
48+
font-size: 2rem;
49+
}
50+
h1 {
51+
margin-bottom: 4rem;
52+
}
53+
a:hover {
54+
background: #363d49;
55+
}
56+
</style>
1157
</head>
1258

1359
<body>
14-
<div id="swagger-ui"></div>
15-
<script src="dist/swagger-ui-bundle.js" charset="UTF-8"> </script>
16-
<script src="dist/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
17-
<script src="dist/swagger-initializer.js" charset="UTF-8"> </script>
60+
<main>
61+
<h1>Star Citizen Wiki API</h1>
62+
<div>
63+
<a href="v1.html">API V1</a>
64+
<a href="v2.html">API V2</a>
65+
</div>
66+
</main>
1867
</body>
1968
</html>

v1.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- HTML for static distribution bundle build -->
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>Swagger UI</title>
7+
<link rel="stylesheet" type="text/css" href="dist/swagger-ui.css" />
8+
<link rel="stylesheet" type="text/css" href="dist/index.css" />
9+
<link rel="icon" type="image/ico" href="favicon.ico" sizes="16x16" />
10+
</head>
11+
12+
<body>
13+
<div id="swagger-ui"></div>
14+
<script src="dist/swagger-ui-bundle.js" charset="UTF-8"> </script>
15+
<script src="dist/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
16+
<script src="dist/swagger-initializer-v1.js" charset="UTF-8"> </script>
17+
</body>
18+
</html>

v2.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- HTML for static distribution bundle build -->
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>Swagger UI</title>
7+
<link rel="stylesheet" type="text/css" href="dist/swagger-ui.css" />
8+
<link rel="stylesheet" type="text/css" href="dist/index.css" />
9+
<link rel="icon" type="image/ico" href="favicon.ico" sizes="16x16" />
10+
</head>
11+
12+
<body>
13+
<div id="swagger-ui"></div>
14+
<script src="dist/swagger-ui-bundle.js" charset="UTF-8"> </script>
15+
<script src="dist/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
16+
<script src="dist/swagger-initializer-v2.js" charset="UTF-8"> </script>
17+
</body>
18+
</html>

0 commit comments

Comments
 (0)