diff --git a/examples/1-standard/app.js b/examples/1-standard/app.js index fc4a5d73..84d74e05 100644 --- a/examples/1-standard/app.js +++ b/examples/1-standard/app.js @@ -1,7 +1,6 @@ const express = require('express'); const path = require('path'); const bodyParser = require('body-parser'); -const logger = require('morgan'); const http = require('http'); const { Pets } = require('./services'); const { OpenApiValidator } = require('express-openapi-validator'); @@ -15,8 +14,7 @@ app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.text()); app.use(bodyParser.json()); -app.use(logger('dev')); - +// Optionally serve the API spec app.use('/spec', express.static(apiSpec)); // 2. Install the OpenApiValidator on your express app diff --git a/examples/1-standard/package-lock.json b/examples/1-standard/package-lock.json index 047e7b9f..098ba344 100644 --- a/examples/1-standard/package-lock.json +++ b/examples/1-standard/package-lock.json @@ -85,14 +85,6 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "requires": { - "safe-buffer": "5.1.2" - } - }, "binary-extensions": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", @@ -386,20 +378,20 @@ "content-type": "^1.0.4", "deasync": "^0.1.20", "js-yaml": "^3.14.0", - "json-schema-ref-parser": "^9.0.1", + "json-schema-ref-parser": "^9.0.6", "lodash.merge": "^4.6.2", "lodash.uniq": "^4.5.0", "lodash.zipobject": "^4.1.3", "media-typer": "^1.1.0", "multer": "^1.4.2", - "ono": "^7.1.2", + "ono": "^7.1.3", "path-to-regexp": "^6.1.0" }, "dependencies": { "@apidevtools/json-schema-ref-parser": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.5.tgz", - "integrity": "sha512-+tOjAEtnsa0/0lAEpR9zDBkVhhszU+J23egkniV4zCYWVW7yd2Rjxr+NSYz6Zo2VbNdJiuoN22rg6qGz5OKGDQ==", + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", + "integrity": "sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==", "requires": { "@jsdevtools/ono": "^7.1.3", "call-me-maybe": "^1.0.1", @@ -2483,11 +2475,11 @@ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, "json-schema-ref-parser": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-9.0.5.tgz", - "integrity": "sha512-bPp/VXAGaa4fk5C9qNZfsv2y4WPr2LV1jrQepvgRC3+RYQohsFYF+W7gI3ipXSS2yEtE/itmB9O813xRv7qdHw==", + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", + "integrity": "sha512-z0JGv7rRD3CnJbZY/qCpscyArdtLJhr/wRBmFUdoZ8xMjsFyNdILSprG2degqRLjBjyhZHAEBpGOxniO9rKTxA==", "requires": { - "@apidevtools/json-schema-ref-parser": "9.0.5" + "@apidevtools/json-schema-ref-parser": "9.0.6" } }, "json-schema-traverse": { @@ -3132,18 +3124,11 @@ } }, "ono": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/ono/-/ono-7.1.2.tgz", - "integrity": "sha512-es7Gfr+OGNFwiYpyHCLgBF+p/RA0qYbWysQKlZbLvvUBis5BygEs8TVJ4r+SgHDfagOgONhaAl6Y4JLy++0MTw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-9jnfVriq7uJM4o5ganUY54ntUm+5EK21EGaQ5NWnkWg3zz5ywbbonlBguRcnmF1/HDiIe3zxNxXcO1YPBmPcQQ==", "requires": { - "@jsdevtools/ono": "7.1.2" - }, - "dependencies": { - "@jsdevtools/ono": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.2.tgz", - "integrity": "sha512-qS/a24RA5FEoiJS9wiv6Pwg2c/kiUo3IVUQcfeM9JvsR6pM8Yx+yl/6xWYLckZCT5jpLNhslgjiA8p/XcGyMRQ==" - } + "@jsdevtools/ono": "7.1.3" } }, "os-locale": { @@ -4660,25 +4645,6 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, - "morgan": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", - "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", - "requires": { - "basic-auth": "~2.0.1", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-finished": "~2.3.0", - "on-headers": "~1.0.2" - }, - "dependencies": { - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" - } - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -4748,11 +4714,6 @@ "ee-first": "1.1.1" } }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4800,12 +4761,6 @@ "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true }, - "prettier": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz", - "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==", - "dev": true - }, "pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", @@ -4895,11 +4850,6 @@ "lowercase-keys": "^1.0.0" } }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", diff --git a/examples/1-standard/package.json b/examples/1-standard/package.json index 9e0814c2..c6fbe4ab 100644 --- a/examples/1-standard/package.json +++ b/examples/1-standard/package.json @@ -13,11 +13,9 @@ "license": "MIT", "dependencies": { "body-parser": "^1.19.0", - "express-openapi-validator": "file:../../", - "morgan": "^1.10.0" + "express-openapi-validator": "file:../../" }, "devDependencies": { - "nodemon": "^2.0.4", - "prettier": "^2.0.5" + "nodemon": "^2.0.4" } }