Improve Engine API documentation (#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 <github@gone.nl>

* Use central stylesheet for API reference

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

* 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 <github@gone.nl>

* 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 <github@gone.nl>

* 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 <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2017-12-26 21:35:10 +01:00 committed by Misty Stanley-Jones
parent 2b5f1a1731
commit 32958e7c60
23 changed files with 54 additions and 630 deletions

25
css/api-reference.css Normal file
View File

@ -0,0 +1,25 @@
/**
* Styles for the Swagger API documentation (engine/api/v1.x/index.html)
*/
/* ReDoc doesn't change outer page styles */
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
/**
* Disable request-type badges, see https://github.com/Rebilly/ReDoc/issues/61
*/
redoc .operation-type {
display: none !important;
}

View File

@ -11,27 +11,10 @@ redirect_from:
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -11,27 +11,10 @@ redirect_from:
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -11,27 +11,10 @@ redirect_from:
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -11,27 +11,10 @@ redirect_from:
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -9,27 +9,10 @@ layout: null
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -9,27 +9,10 @@ layout: null
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -9,27 +9,10 @@ layout: null
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -9,27 +9,10 @@ layout: null
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -9,27 +9,10 @@ layout: null
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -9,27 +9,10 @@ layout: null
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

8
js/redoc.min.js vendored Executable file

File diff suppressed because one or more lines are too long

1
js/redoc.min.map Executable file

File diff suppressed because one or more lines are too long