diff --git a/dev-helpers/dev-helper-initializer.js b/dev-helpers/dev-helper-initializer.js index aaf2624a..2a0dcca7 100644 --- a/dev-helpers/dev-helper-initializer.js +++ b/dev-helpers/dev-helper-initializer.js @@ -1,10 +1,13 @@ +/* eslint-disable no-undef */ window.onload = function() { window["SwaggerUIBundle"] = window["swagger-ui-bundle"] window["SwaggerUIStandalonePreset"] = window["swagger-ui-standalone-preset"] // Build a system const ui = SwaggerUIBundle({ - url: "https://petstore.swagger.io/v2/swagger.json", - dom_id: '#swagger-ui', + // url: "https://petstore.swagger.io/v2/swagger.json", + url: "./examples/swos-281-oas3.yaml", + // url: "./examples/swos-281-oas2.yaml", + dom_id: "#swagger-ui", presets: [ SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset @@ -12,6 +15,7 @@ window.onload = function() { plugins: [ SwaggerUIBundle.plugins.DownloadUrl ], + // requestSnippetsEnabled: true, layout: "StandaloneLayout" }) diff --git a/flavors/swagger-ui-react/index.jsx b/flavors/swagger-ui-react/index.jsx index ba29ce63..e39fa3c2 100644 --- a/flavors/swagger-ui-react/index.jsx +++ b/flavors/swagger-ui-react/index.jsx @@ -165,5 +165,5 @@ SwaggerUI.defaultProps = { persistAuthorization: false, } -SwaggerUI.presets = swaggerUIConstructor.presets; -SwaggerUI.plugins = swaggerUIConstructor.plugins; +SwaggerUI.presets = swaggerUIConstructor.presets +SwaggerUI.plugins = swaggerUIConstructor.plugins diff --git a/package.json b/package.json index 67f9843b..921c0d30 100644 --- a/package.json +++ b/package.json @@ -38,9 +38,9 @@ "deps-license": "license-checker --production --csv --out $npm_package_config_deps_check_dir/licenses.csv && license-checker --development --csv --out $npm_package_config_deps_check_dir/licenses-dev.csv", "deps-size": "webpack -p --config webpack/bundle.babel.js --json | webpack-bundle-size-analyzer >| $npm_package_config_deps_check_dir/sizes.txt", "deps-check": "run-s deps-license deps-size", - "lint": "eslint --ext \".js,.jsx\" src test", - "lint-errors": "eslint --quiet --ext \".js,.jsx\" src test", - "lint-fix": "eslint --ext \".js,.jsx\" src test --fix", + "lint": "eslint --ext \".js,.jsx\" src test dev-helpers flavors", + "lint-errors": "eslint --quiet --ext \".js,.jsx\" src test dev-helpers flavors", + "lint-fix": "eslint --ext \".js,.jsx\" src test dev-helpers flavors --fix", "test": "run-s lint-errors just-test-in-node test:unit-jest cy:ci", "test-in-node": "run-s lint-errors just-test-in-node", "just-test-in-node": "cross-env BABEL_ENV=test mocha \"test/mocha/**/*.{js,jsx}\"",