feat: add openapi docs generation to api

This commit is contained in:
Rainer Killinger
2021-07-06 10:54:49 +02:00
parent 4e42772ca3
commit 614a1b1e9b
3 changed files with 2209 additions and 100 deletions

View File

@@ -53,9 +53,9 @@ pages:
stage: deploy stage: deploy
script: script:
- npm run documentation - npm run documentation
- mv docs public - mv docs/openapi public
only: only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/ - master
artifacts: artifacts:
paths: paths:
- public - public

2302
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -19,7 +19,7 @@
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'",
"check-configuration": "openstapps-configuration", "check-configuration": "openstapps-configuration",
"compile": "rimraf lib && tsc && prepend lib/cli.js '#!/usr/bin/env node\n'", "compile": "rimraf lib && tsc && prepend lib/cli.js '#!/usr/bin/env node\n'",
"documentation": "node ./node_modules/@openstapps/core-tools/lib/cli.js routes ./node_modules/@openstapps/core/lib ./ROUTES.md && typedoc --includeDeclarations --excludeExternals --mode modules --out docs --readme README.md --listInvalidSymbolLinks src", "documentation": "typedoc --includeDeclarations --excludeExternals --mode modules --out docs --readme README.md --listInvalidSymbolLinks src && openstapps-core-tools openapi ./node_modules/@openstapps/core/lib ./docs/openapi && redoc-cli bundle docs/openapi/openapi.json -o docs/openapi/index.html",
"postversion": "npm run changelog", "postversion": "npm run changelog",
"prepublishOnly": "npm ci && npm run build", "prepublishOnly": "npm ci && npm run build",
"preversion": "npm run prepublishOnly", "preversion": "npm run prepublishOnly",
@@ -85,6 +85,7 @@
"mocked-env": "1.3.5", "mocked-env": "1.3.5",
"nyc": "15.1.0", "nyc": "15.1.0",
"prepend-file-cli": "1.0.6", "prepend-file-cli": "1.0.6",
"redoc-cli": "0.12.2",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"sinon": "10.0.0", "sinon": "10.0.0",
"sinon-express-mock": "2.2.1", "sinon-express-mock": "2.2.1",