Update to @redocly/cli 1.0.0-beta.110

This commit is contained in:
Andrew Mayorov 2022-10-03 11:54:16 +03:00
parent 8322f5c05a
commit c1e5d48f02
No known key found for this signature in database
GPG Key ID: 2837C62ACFBFED5D
5 changed files with 4114 additions and 2083 deletions

View File

@ -1,22 +1,13 @@
# See https://docs.redoc.ly/cli/configuration/ for more information.
apiDefinitions:
binbase: "openapi/openapi.yaml"
lint:
rules:
api-servers: on
camel-case-names: on
model-description: on
no-extra-fields: on
operation-operationId: on
operation-description: on
operation-tags: on
parameter-description: on
path-declarations-must-exist: on
path-keys-no-trailing-slash: on
server-not-example: on
servers-no-trailing-slash: on
referenceDocs:
apis:
main:
root: "openapi/openapi.yaml"
extends:
- recommended
rules:
no-empty-servers: off
features.openapi:
showConsole: true
layout:
scope: section
pagination: section
layout: three-panel
routingStrategy: browser

View File

@ -12,14 +12,15 @@ set('-e');
mkdir('-p', TARGET_DIR)
cp('-R', 'web/*', TARGET_DIR + '/');
// cp('-R', 'web/*', TARGET_DIR + '/');
exec('npm run openapi bundle -- -o ' + TARGET_DIR + ' --ext json');
exec('npm run openapi bundle -- -o ' + TARGET_DIR + ' --ext yaml');
exec('npm run openapi bundle -- -o ' + Path.join(TARGET_DIR, 'openapi') + ' --ext json');
exec('npm run openapi bundle -- -o ' + Path.join(TARGET_DIR, 'openapi') + ' --ext yaml');
exec([
'npm run redoc bundle --',
'npm run openapi build-docs --',
'--cdn',
'--template web/template.hbs',
'-o', Path.join(TARGET_DIR, 'index.html'),
Path.join(TARGET_DIR, 'openapi.yaml')
].join(' '));

6125
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,19 +2,17 @@
"name": "@vality/swag-api-keys",
"version": "1.0.0",
"dependencies": {
"@redocly/openapi-cli": "^0.12.7",
"redoc-cli": "^0.9.8",
"json-merge-patch": "^0.2.3",
"@redocly/cli": "^1.0.0-beta.110",
"json-merge-patch": "^1.0.0",
"json-pointer": "^0.6.0",
"shelljs": "^0.7.0",
"shelljs": "^0.8.0",
"swagger-ui-dist": "^3.18.3"
},
"private": true,
"scripts": {
"start": "openapi preview-docs",
"build": "node ./build.js",
"validate": "openapi validate",
"openapi": "openapi",
"redoc": "redoc-cli"
"validate": "openapi lint",
"openapi": "openapi"
}
}

22
web/template.hbs Normal file
View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8" />
<title>{{title}}</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
padding: 0;
margin: 0;
}
</style>
{{{redocHead}}}
</head>
<body>
{{{redocHTML}}}
</body>
</html>