Create HTML version of OpenAPI doc on install.

When running `npm install`, a self-contained HTML document
with the contents of the OpenAPI specification is saved as
openapi.html in the same directory as openapi.yaml.
This commit is contained in:
D. Berge
2020-12-29 16:18:53 +01:00
parent 45a9c5aa07
commit 76001cffe1

View File

@@ -4,7 +4,8 @@
"description": "Dougal web backend",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "redoc-cli bundle ./spec/openapi.yaml -o ./spec/openapi.html"
},
"author": "Aaltronav s.r.o.",
"license": "UNLICENSED",