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

2
package-lock.json generated
View File

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

View File

@ -1,13 +1,14 @@
{
"name": "octoprint-openapi",
"license": "MIT",
"version": "1.0.0",
"dependencies": {
"@redocly/openapi-cli": "^1.0.0-beta.18"
},
"scripts": {
"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"
}
}