add doc generation

This commit is contained in:
Wlad 2020-11-13 23:25:20 +01:00
parent 27c0bacd26
commit bcc1586158
4 changed files with 3308 additions and 7 deletions

3300
docs/api.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,8 @@
<head> <head>
<title>API Reference | ReDoc</title> <title>API Reference | ReDoc</title>
<!-- needed for adaptive design --> <!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/png" href="favicon.png"> <link rel="icon" type="image/png" href="favicon.png" />
<!-- <!--
ReDoc uses font options from the parent element ReDoc uses font options from the parent element
@ -16,9 +16,9 @@
padding: 0; padding: 0;
} }
</style> </style>
{{{redocHead}}}
</head> </head>
<body> <body>
{{{redocHTML}}} <redoc spec-url="./api.json"></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"></script>
</body> </body>
</html> </html>

2
package-lock.json generated
View File

@ -1,5 +1,5 @@
{ {
"name": "octoprint", "name": "octoprint-openapi",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,

View File

@ -1,13 +1,14 @@
{ {
"name": "octoprint-openapi", "name": "octoprint-openapi",
"license": "MIT",
"version": "1.0.0", "version": "1.0.0",
"dependencies": { "dependencies": {
"@redocly/openapi-cli": "^1.0.0-beta.18" "@redocly/openapi-cli": "^1.0.0-beta.18"
}, },
"scripts": { "scripts": {
"start": "openapi preview-docs", "start": "openapi preview-docs",
"build": "openapi bundle -o dist", "build": "openapi bundle -o ./dist/api.yaml && openapi bundle -o ./dist/api.yaml",
"build-docs": "openapi bundle -o ./docs/api.json",
"test": "openapi lint" "test": "openapi lint"
} }
} }