feat(): override openapi to openapi 3.1.0

This commit is contained in:
Sven Depickere 2021-10-22 10:19:23 +02:00
parent ebbd256b1f
commit c0b92fcb0b
3 changed files with 5 additions and 1 deletions

View File

@ -27,7 +27,7 @@ export default (env: { playground?: boolean; bench?: boolean } = {}, { mode }) =
],
target: 'web',
output: {
filename: 'redoc-demo.bundle.js',
filename: 'redoc.bundle.js',
path: root('dist'),
globalObject: 'this',
},

View File

@ -51,6 +51,7 @@
"benchmark": "node ./benchmark/benchmark.js",
"start:demo": "webpack serve --hot --config demo/webpack.config.ts --mode=development",
"compile:cli": "tsc custom.d.ts cli/index.ts --target es6 --module commonjs --types yargs",
"build:sofico-version": "webpack --env playground='false' bench='false' --mode=production --config demo/webpack.config.ts ",
"build:demo": "webpack --mode=production --config demo/webpack.config.ts",
"deploy:demo": "aws s3 sync demo/dist s3://production-redoc-demo --acl=public-read",
"license-check": "license-checker --production --onlyAllow 'MIT;ISC;Apache-2.0;BSD;BSD-2-Clause;BSD-3-Clause' --summary",

View File

@ -80,6 +80,9 @@ export class AppStore {
// update position statically based on hash (in case of SSR)
MenuStore.updateOnHistory(history.currentId, this.scroll);
// override the openApi standard to version 3.1.0
// TODO remove when fully supporting open API 3.1.0
spec.openapi = "3.1.0";
this.spec = new SpecStore(spec, specUrl, this.options);
this.menu = new MenuStore(this.spec, this.scroll, history);