Skip to content

Commit e811b2b

Browse files
committed
Add moderation API spec to swagger UI
1 parent bd122bb commit e811b2b

File tree

3 files changed

+57
-14
lines changed

3 files changed

+57
-14
lines changed

docs/dist/swagger-initializer.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
window.onload = function() {
1+
window.onload = function () {
22
window.ui = SwaggerUIBundle({
33
urls: [
44
{
5-
name: "Chat",
6-
url:"https://raw.githubusercontent.com/GetStream/protocol/main/openapi/chat-openapi.yaml"
5+
name: 'Chat',
6+
url: 'https://raw.githubusercontent.com/GetStream/protocol/main/openapi/chat-openapi.yaml',
77
},
88
{
9-
name: "Video",
10-
url:"https://raw.githubusercontent.com/GetStream/protocol/main/openapi/video-openapi.yaml"
11-
}
9+
name: 'Video',
10+
url: 'https://raw.githubusercontent.com/GetStream/protocol/main/openapi/video-openapi.yaml',
11+
},
12+
{
13+
name: 'Moderation',
14+
url: 'https://raw.githubusercontent.com/GetStream/protocol/main/openapi/moderation-serverside-api.yaml',
15+
},
1216
],
1317
dom_id: '#swagger-ui',
1418
deepLinking: true,
15-
presets: [
16-
SwaggerUIBundle.presets.apis,
17-
SwaggerUIStandalonePreset
18-
],
19-
plugins: [
20-
SwaggerUIBundle.plugins.DownloadUrl,
21-
],
22-
layout: "StandaloneLayout"
19+
presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset],
20+
plugins: [SwaggerUIBundle.plugins.DownloadUrl],
21+
layout: 'StandaloneLayout',
2322
});
2423
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
window.onload = function () {
2+
window.ui = SwaggerUIBundle({
3+
url: 'https://raw.githubusercontent.com/GetStream/protocol/main/openapi/moderation-serverside-api.yaml',
4+
dom_id: '#swagger-ui',
5+
deepLinking: true,
6+
presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset],
7+
plugins: [SwaggerUIBundle.plugins.DownloadUrl],
8+
layout: 'StandaloneLayout',
9+
});
10+
};

docs/moderation_openapi.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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
10+
data-react-helmet="true"
11+
rel="icon"
12+
type="image/png"
13+
sizes="32x32"
14+
href="dist/favicon-32x32.png"
15+
/>
16+
<link
17+
data-react-helmet="true"
18+
rel="icon"
19+
type="image/png"
20+
sizes="96x96"
21+
href="dist/favicon-96x96.png"
22+
/>
23+
</head>
24+
25+
<body>
26+
<div id="swagger-ui"></div>
27+
<script src="dist/swagger-ui-bundle.js" charset="UTF-8"></script>
28+
<script src="dist/swagger-ui-standalone-preset.js" charset="UTF-8"></script>
29+
<script
30+
src="dist/swagger-initializer_moderation.js"
31+
charset="UTF-8"
32+
></script>
33+
</body>
34+
</html>

0 commit comments

Comments
 (0)