Skip to content

Commit 32958e7

Browse files
thaJeztahMisty Stanley-Jones
authored and
Misty Stanley-Jones
committed
Improve Engine API documentation (docker#5607)
* Share redoc JavaScript between API versions The redoc JavaScript is a big file, and there's no need to keep a separate copy for each version of the API. This patch removes the copy per-version and moves the script to a central location. Signed-off-by: Sebastiaan van Stijn <[email protected]> * Use central stylesheet for API reference Signed-off-by: Sebastiaan van Stijn <[email protected]> * Update ReDoc to v1.19.3 Changelog can be found at https://github.com/Rebilly/ReDoc/blob/v1.19.3/CHANGELOG.md Signed-off-by: Sebastiaan van Stijn <[email protected]> * Hide "request type" badges in menu ReDoc 1.13 added "request type" badges in the menu given that we didn't show these before, this patch hides them. Signed-off-by: Sebastiaan van Stijn <[email protected]> * Add .map file for ReDoc Having a .map file allows debugging script issues in the ReDoc JavaScript (which is minified). It's a big file, but may be useful to have. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 2b5f1a1 commit 32958e7

23 files changed

+54
-630
lines changed

css/api-reference.css

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Styles for the Swagger API documentation (engine/api/v1.x/index.html)
3+
*/
4+
5+
6+
/* ReDoc doesn't change outer page styles */
7+
body {
8+
margin: 0;
9+
padding: 0;
10+
}
11+
api-logo {
12+
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
13+
height: 100px;
14+
text-align: left !important;
15+
}
16+
api-logo img {
17+
width: 136px !important;
18+
margin: 32px 0 0 50px;
19+
}
20+
/**
21+
* Disable request-type badges, see https://github.com/Rebilly/ReDoc/issues/61
22+
*/
23+
redoc .operation-type {
24+
display: none !important;
25+
}

engine/api/v1.25/index.html

+2-19
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,10 @@
1111
<meta name="viewport" content="width=device-width, initial-scale=1">
1212
<meta name="description" content="Reference for the API served by Docker Engine.">
1313
<meta charset="utf-8"/>
14-
<!--
15-
ReDoc doesn't change outer page styles
16-
-->
17-
<style>
18-
body {
19-
margin: 0;
20-
padding: 0;
21-
}
22-
api-logo {
23-
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
24-
height: 100px;
25-
text-align: left !important;
26-
}
27-
api-logo img {
28-
width: 136px !important;
29-
margin: 32px 0 0 50px;
30-
}
31-
</style>
14+
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
3215
</head>
3316
<body>
3417
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
35-
<script src="redoc.1.11.0.min.js"> </script>
18+
<script src="/js/redoc.min.js"> </script>
3619
</body>
3720
</html>

engine/api/v1.25/redoc.1.11.0.min.js

-44
This file was deleted.

engine/api/v1.26/index.html

+2-19
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,10 @@
1111
<meta name="viewport" content="width=device-width, initial-scale=1">
1212
<meta name="description" content="Reference for the API served by Docker Engine.">
1313
<meta charset="utf-8"/>
14-
<!--
15-
ReDoc doesn't change outer page styles
16-
-->
17-
<style>
18-
body {
19-
margin: 0;
20-
padding: 0;
21-
}
22-
api-logo {
23-
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
24-
height: 100px;
25-
text-align: left !important;
26-
}
27-
api-logo img {
28-
width: 136px !important;
29-
margin: 32px 0 0 50px;
30-
}
31-
</style>
14+
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
3215
</head>
3316
<body>
3417
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
35-
<script src="redoc.1.11.0.min.js"> </script>
18+
<script src="/js/redoc.min.js"> </script>
3619
</body>
3720
</html>

engine/api/v1.26/redoc.1.11.0.min.js

-44
This file was deleted.

engine/api/v1.27/index.html

+2-19
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,10 @@
1111
<meta name="viewport" content="width=device-width, initial-scale=1">
1212
<meta name="description" content="Reference for the API served by Docker Engine.">
1313
<meta charset="utf-8"/>
14-
<!--
15-
ReDoc doesn't change outer page styles
16-
-->
17-
<style>
18-
body {
19-
margin: 0;
20-
padding: 0;
21-
}
22-
api-logo {
23-
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
24-
height: 100px;
25-
text-align: left !important;
26-
}
27-
api-logo img {
28-
width: 136px !important;
29-
margin: 32px 0 0 50px;
30-
}
31-
</style>
14+
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
3215
</head>
3316
<body>
3417
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
35-
<script src="redoc.1.11.0.min.js"> </script>
18+
<script src="/js/redoc.min.js"> </script>
3619
</body>
3720
</html>

engine/api/v1.27/redoc.1.11.0.min.js

-44
This file was deleted.

engine/api/v1.28/index.html

+2-19
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,10 @@
1111
<meta name="viewport" content="width=device-width, initial-scale=1">
1212
<meta name="description" content="Reference for the API served by Docker Engine.">
1313
<meta charset="utf-8"/>
14-
<!--
15-
ReDoc doesn't change outer page styles
16-
-->
17-
<style>
18-
body {
19-
margin: 0;
20-
padding: 0;
21-
}
22-
api-logo {
23-
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
24-
height: 100px;
25-
text-align: left !important;
26-
}
27-
api-logo img {
28-
width: 136px !important;
29-
margin: 32px 0 0 50px;
30-
}
31-
</style>
14+
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
3215
</head>
3316
<body>
3417
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
35-
<script src="redoc.1.11.0.min.js"> </script>
18+
<script src="/js/redoc.min.js"> </script>
3619
</body>
3720
</html>

engine/api/v1.28/redoc.1.11.0.min.js

-44
This file was deleted.

engine/api/v1.29/index.html

+2-19
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,10 @@
99
<meta name="viewport" content="width=device-width, initial-scale=1">
1010
<meta name="description" content="Reference for the API served by Docker Engine.">
1111
<meta charset="utf-8"/>
12-
<!--
13-
ReDoc doesn't change outer page styles
14-
-->
15-
<style>
16-
body {
17-
margin: 0;
18-
padding: 0;
19-
}
20-
api-logo {
21-
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
22-
height: 100px;
23-
text-align: left !important;
24-
}
25-
api-logo img {
26-
width: 136px !important;
27-
margin: 32px 0 0 50px;
28-
}
29-
</style>
12+
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
3013
</head>
3114
<body>
3215
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
33-
<script src="redoc.1.11.0.min.js"> </script>
16+
<script src="/js/redoc.min.js"> </script>
3417
</body>
3518
</html>

engine/api/v1.29/redoc.1.11.0.min.js

-44
This file was deleted.

engine/api/v1.30/index.html

+2-19
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,10 @@
99
<meta name="viewport" content="width=device-width, initial-scale=1">
1010
<meta name="description" content="Reference for the API served by Docker Engine.">
1111
<meta charset="utf-8"/>
12-
<!--
13-
ReDoc doesn't change outer page styles
14-
-->
15-
<style>
16-
body {
17-
margin: 0;
18-
padding: 0;
19-
}
20-
api-logo {
21-
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
22-
height: 100px;
23-
text-align: left !important;
24-
}
25-
api-logo img {
26-
width: 136px !important;
27-
margin: 32px 0 0 50px;
28-
}
29-
</style>
12+
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
3013
</head>
3114
<body>
3215
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
33-
<script src="redoc.1.11.0.min.js"> </script>
16+
<script src="/js/redoc.min.js"> </script>
3417
</body>
3518
</html>

engine/api/v1.30/redoc.1.11.0.min.js

-44
This file was deleted.

engine/api/v1.31/index.html

+2-19
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,10 @@
99
<meta name="viewport" content="width=device-width, initial-scale=1">
1010
<meta name="description" content="Reference for the API served by Docker Engine.">
1111
<meta charset="utf-8"/>
12-
<!--
13-
ReDoc doesn't change outer page styles
14-
-->
15-
<style>
16-
body {
17-
margin: 0;
18-
padding: 0;
19-
}
20-
api-logo {
21-
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
22-
height: 100px;
23-
text-align: left !important;
24-
}
25-
api-logo img {
26-
width: 136px !important;
27-
margin: 32px 0 0 50px;
28-
}
29-
</style>
12+
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
3013
</head>
3114
<body>
3215
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
33-
<script src="redoc.1.11.0.min.js"> </script>
16+
<script src="/js/redoc.min.js"> </script>
3417
</body>
3518
</html>

engine/api/v1.31/redoc.1.11.0.min.js

-44
This file was deleted.

engine/api/v1.32/index.html

+2-19
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,10 @@
99
<meta name="viewport" content="width=device-width, initial-scale=1">
1010
<meta name="description" content="Reference for the API served by Docker Engine.">
1111
<meta charset="utf-8"/>
12-
<!--
13-
ReDoc doesn't change outer page styles
14-
-->
15-
<style>
16-
body {
17-
margin: 0;
18-
padding: 0;
19-
}
20-
api-logo {
21-
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
22-
height: 100px;
23-
text-align: left !important;
24-
}
25-
api-logo img {
26-
width: 136px !important;
27-
margin: 32px 0 0 50px;
28-
}
29-
</style>
12+
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
3013
</head>
3114
<body>
3215
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
33-
<script src="redoc.1.11.0.min.js"> </script>
16+
<script src="/js/redoc.min.js"> </script>
3417
</body>
3518
</html>

engine/api/v1.32/redoc.1.11.0.min.js

-44
This file was deleted.

engine/api/v1.33/index.html

+2-19
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,10 @@
99
<meta name="viewport" content="width=device-width, initial-scale=1">
1010
<meta name="description" content="Reference for the API served by Docker Engine.">
1111
<meta charset="utf-8"/>
12-
<!--
13-
ReDoc doesn't change outer page styles
14-
-->
15-
<style>
16-
body {
17-
margin: 0;
18-
padding: 0;
19-
}
20-
api-logo {
21-
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
22-
height: 100px;
23-
text-align: left !important;
24-
}
25-
api-logo img {
26-
width: 136px !important;
27-
margin: 32px 0 0 50px;
28-
}
29-
</style>
12+
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
3013
</head>
3114
<body>
3215
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
33-
<script src="redoc.1.11.0.min.js"> </script>
16+
<script src="/js/redoc.min.js"> </script>
3417
</body>
3518
</html>

engine/api/v1.33/redoc.1.11.0.min.js

-44
This file was deleted.

engine/api/v1.34/index.html

+2-19
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,10 @@
99
<meta name="viewport" content="width=device-width, initial-scale=1">
1010
<meta name="description" content="Reference for the API served by Docker Engine.">
1111
<meta charset="utf-8"/>
12-
<!--
13-
ReDoc doesn't change outer page styles
14-
-->
15-
<style>
16-
body {
17-
margin: 0;
18-
padding: 0;
19-
}
20-
api-logo {
21-
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
22-
height: 100px;
23-
text-align: left !important;
24-
}
25-
api-logo img {
26-
width: 136px !important;
27-
margin: 32px 0 0 50px;
28-
}
29-
</style>
12+
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
3013
</head>
3114
<body>
3215
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
33-
<script src="redoc.1.11.0.min.js"> </script>
16+
<script src="/js/redoc.min.js"> </script>
3417
</body>
3518
</html>

engine/api/v1.34/redoc.1.11.0.min.js

-44
This file was deleted.

js/redoc.min.js

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/redoc.min.map

+1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)