{"_id":"@abiee/express-open-api","_rev":"9-c8e9637e4562af7bfd7434b91b31650c","time":{"0.0.1":"2020-12-15T19:39:59.817Z","created":"2020-12-15T19:41:23.818Z","0.0.2":"2020-12-15T19:41:24.087Z","modified":"2023-03-29T18:32:40.544Z","0.0.3":"2020-12-16T17:58:19.580Z","0.0.4":"2021-02-03T16:16:27.853Z","0.0.5":"2021-02-03T19:13:33.323Z","0.0.6":"2021-03-12T22:33:11.591Z","0.0.7":"2023-03-29T18:32:40.443Z"},"name":"@abiee/express-open-api","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.2":{"name":"@abiee/express-open-api","version":"0.0.2","description":"OpenAPI Validator","main":"index.js","author":{"name":"Abiee Echamea"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/abiee/express-open-api.git"},"scripts":{"test":"mocha","lint":"eslint index.js errors.js test/"},"dependencies":{"api-schema-builder":"^2.0.4","auto-bind":"^4.0.0","express-mung":"^0.5.1","lodash.isempty":"^4.4.0","swagger-parser":"^10.0.2"},"devDependencies":{"chai":"^4.2.0","eslint":"^7.15.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.22.1","express":"^4.17.1","mocha":"^8.2.1","sinon":"^9.2.1","supertest":"^6.0.1"},"gitHead":"d6a9188ee30d93c6b756788dab47a70ef6a80e00","bugs":{"url":"https://github.com/abiee/express-open-api/issues"},"homepage":"https://github.com/abiee/express-open-api#readme","_id":"@abiee/express-open-api@0.0.2","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-HGg8JtRuKU0dXhOqYICNvpGFd/WYUIaEkzgQ9rBHjdoqHcAkUxRcjFTa9mIWxU+HxabIe3Apg8EHoFNPZ0o5cw==","shasum":"bbd6f8a486a54296a2e7e3e7ee8a3fb23f7b6e00","tarball":"https://registry.npmjs.org/@abiee/express-open-api/-/express-open-api-0.0.2.tgz","fileCount":13,"unpackedSize":35169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2RFkCRA9TVsSAnZWagAA4HwQAJR71iYQu5wTML595gPL\nUrfW60AnXbQxUCp9DJEXO7xrtnT/7RTvB7CAs3o6PSs/E74ZwYmzqDXtSP0V\ndwV5mK8nawlCDxZPELMOUU41gAlnOaKUZYjyfAATASqg0p0Yi17s+syuuBGY\nkHFPXwtBHIQr8OIHyTaee56v1NbfuArKCmY9DawcmRedhMZqyuoY1LqnhAWN\nZ7OXkfF4AbI13FiIALw5CinJiMLUYcX/WTKS0h2UtyhvoxHEvIZmXxekhcgP\nUBPJS2Z7Jou0Idpw+l4F5bJCNdAR328WiMDrgm+pazprk4WgwDUfwsxithxF\n1YMSmyKTsvw6dXIgT2eIgLM4eoUfc+3z7JCfeVIe1RzljCbxdAmLUSmsUs6/\nb5qZ+EDi26ZS5D7BHlAhgbtCe9UieTMasMMSgh2ooHzMrxSVT34D04jjRHKs\nYI6C17hJ5ON3mHHNmyybRryqYPPVlvXS1tMm1CJ8hqGWmQz4mN3SbxRdqlH2\nYo3OUTLlAtsH/8IFVpwUkiQBUTRHG/sXgk/NK07KECzcjKi37E2Tw/bGe2LC\nX8tBNwLTtewbGST33d71NmcT0BML+FhjpA2dn11d5DIN0iZTtXYwM3hJNOH/\nvNh+1WxmDCia6MFrqnKAefOLM/KzPkKeVscnX/dLGBbvK7A5zzsqcVajVrTz\nSmNu\r\n=pCQb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkxIvuuKqRh41x4kUs93WXcqa+sIV/IGE0Brq23wWCTgIgeFDDnHyBVKblNdkcFoB8eeBOc7IXBbVILS4SewGisoE="}]},"_npmUser":{"name":"abiee","email":"abiee.alejandro@gmail.com"},"directories":{},"maintainers":[{"name":"abiee","email":"abiee.alejandro@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-open-api_0.0.2_1608061283859_0.1186836554366979"},"_hasShrinkwrap":false},"0.0.3":{"name":"@abiee/express-open-api","version":"0.0.3","description":"OpenAPI Validator","main":"index.js","author":{"name":"Abiee Echamea"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/abiee/express-open-api.git"},"scripts":{"test":"mocha","lint":"eslint index.js errors.js test/"},"dependencies":{"api-schema-builder":"^2.0.4","auto-bind":"^4.0.0","express-mung":"^0.5.1","lodash.isempty":"^4.4.0","swagger-parser":"^10.0.2"},"devDependencies":{"chai":"^4.2.0","eslint":"^7.15.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.22.1","express":"^4.17.1","mocha":"^8.2.1","sinon":"^9.2.1","supertest":"^6.0.1"},"keywords":["openapi","middleware","express","swagger"],"gitHead":"a4cd8b07bcc9c67cb20c018e0a4c89db787430b3","bugs":{"url":"https://github.com/abiee/express-open-api/issues"},"homepage":"https://github.com/abiee/express-open-api#readme","_id":"@abiee/express-open-api@0.0.3","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-sem38gjMG+EAakBTU+1CHyiCn6f4s0UHhny8SK/EfnDP2rwAH1bP8hw8p3FescHHIfGbS33KXkGH9+uYH/wWNQ==","shasum":"a95c6374f6781847f57766ad7524d3ce83e0b9cf","tarball":"https://registry.npmjs.org/@abiee/express-open-api/-/express-open-api-0.0.3.tgz","fileCount":18,"unpackedSize":63212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2kq7CRA9TVsSAnZWagAAtDoQAIIBNdJw85TlTwen/46M\nOLtBZ8DIyRCwFeQk5qLRzuf9RwMNpz5wFedhU3DDWAAXh5tX/5EaGP0bqQJH\nbCIt7i6TBzdm4hekRKLJUfijXdg9YsZqPiiQro5G+IzmuZwYJwjLn+/JF9VH\n3n0Gp5oIOgM55EW/GMxqZU6eQEyVuhrPd42cgCdgT2tgOR3/dd8Vw3bHB0eJ\nQTkyK8/3SNYhx9G5CI3qiVC9WJHaNXddxh2iF6jWrrR/70BSuAZvGgIBy7tq\nn7ESRRaRTkmqLxnbd8aTELtxupB3yJ4LnmuisSLQh2AJP1lgAfI7J9LYEFl9\nVFpNRHA1TpfoR2SHH+ZIrAFIV/hISDj6AyO7Er7+/M1q4avAHJ7soKSfWOo+\nk82HpLu2jmHUd1tXGnhmCQCPAHR4IgSDTicUqNk4HOVYB8IvPLIdBx9X7zdb\nWUhxutphoJBXd8i6H3FqKCwygo12YKfTtJKDgfnKggXN+P3rK/gNrJr/9x94\nTScTnSFJx5WCv0Hzr1JMUpSi7JPL/2GEYD4E4Ki7j65iAwAuMgPn00kHGhKo\nhTXlm/tYQ/pQ/YLTj1uwXd9Veia0IpOVo7Tkh9SkHckQcda2scwp2ue79UW6\nyyoc9r5AM3r6tc+Fvy/+LBY0EEOjo3gX/axCN07tV3SQou1TANpTQCcsKYZ0\nH6es\r\n=Pz7m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAB526IPH3Cn2D6AMT2JaA2cTDToVuM//xi+Ra4TgiFQIgL6XyM1iH8SBpe8mk/Zt83rV50zTQTGsUenjoDjSJVRE="}]},"_npmUser":{"name":"abiee","email":"abiee.alejandro@gmail.com"},"directories":{},"maintainers":[{"name":"abiee","email":"abiee.alejandro@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-open-api_0.0.3_1608141499452_0.12146325976226802"},"_hasShrinkwrap":false},"0.0.4":{"name":"@abiee/express-open-api","version":"0.0.4","description":"OpenAPI Validator","main":"index.js","author":{"name":"Abiee Echamea"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/abiee/express-open-api.git"},"scripts":{"test":"mocha","lint":"eslint index.js errors.js test/"},"dependencies":{"api-schema-builder":"^2.0.4","auto-bind":"^4.0.0","express-mung":"^0.5.1","lodash.isdate":"^4.0.1","lodash.isempty":"^4.4.0","lodash.isplainobject":"^4.0.6","lodash.mapvalues":"^4.6.0","swagger-parser":"^10.0.2"},"devDependencies":{"chai":"^4.2.0","eslint":"^7.15.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.22.1","express":"^4.17.1","mocha":"^8.2.1","sinon":"^9.2.1","supertest":"^6.0.1"},"keywords":["openapi","middleware","express","swagger"],"gitHead":"a4cd8b07bcc9c67cb20c018e0a4c89db787430b3","bugs":{"url":"https://github.com/abiee/express-open-api/issues"},"homepage":"https://github.com/abiee/express-open-api#readme","_id":"@abiee/express-open-api@0.0.4","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-b5HugRjkJCP/25OC1EmERDq3kaYuB91x915lN5YoQkvzVuWo7Xq6mJn743sY+aV89i/xl1de+eHDVRwW3gh9jA==","shasum":"7752e8ad9c4c87e4f8f9dcddd280d023b84141d2","tarball":"https://registry.npmjs.org/@abiee/express-open-api/-/express-open-api-0.0.4.tgz","fileCount":20,"unpackedSize":73933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGsxfCRA9TVsSAnZWagAAkyQP+gMgcxmmlCc0MDb2emBP\nyXWC2Xv/USN3sggHLu1z9917H2PimgLJsXlTdB/5+yk3AggQPD0e6OWu6jMJ\nSTKWu1/Hzz1eTsbUlts7yQc66PNrZ9Q11I4xCpyt/5A3RLILda9r1b1VEtGX\nMmmO+k5i0l12L9ZQQPxJbFBHOXUNFfJk0S589CGoq+TJkTRWZBmJWjV0HOtc\nw9oXfnsjhFX8eykMxIYUdBCcH4whorcSOkLVwaeuDp8Y/2zJVW+MQNSC+8WM\nwAWo5gZttshDzkwNgOk/kYnCChfbAQwKgyWRowY0NB262yXqEK9Gmbq54EKr\ngp+94SWdIKlDKFfb/vXaZbY1kSIyT0xE+4aO7sFu90+P0DEriaCw9VI9gGNx\nJWLUCH3aBTaWXEo0JGVQg/UgyNYCKm5Hh0VkcWkLTLDLMdRDHObct2g7zTP+\nxlcu5+qOapUfTD5tKBDWYs59LN2HDCxNdzf5OU1ivhsRw6CFlKYJQ0nC3IhU\nqFbMSe2Bep1CB60dibqEl6zzUvm0ZX2Eiusf59VnnwbBvkzdtYTAD6G5Fn8w\n4I0puJEAhcsRDmN2f7kBXm89Ah/cLOF0s/sW4lNIc1pbS6zzDY6lbTdsrxOw\n6ZFUuBBvuFMZzD5OGqZySoWCf38SEnyipNUc0MnATyqUDJQMEjvY6chZQNb3\nuZEX\r\n=JrQo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7PFuA39E8erhC7xacAB21nk5TbhntsveVuk0D08Ft5QIgTDBsCHJHEWCSQO2MwzdFq3OQYNjwcQ/XH5Tt5ketvMI="}]},"_npmUser":{"name":"abiee","email":"abiee.alejandro@gmail.com"},"directories":{},"maintainers":[{"name":"abiee","email":"abiee.alejandro@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-open-api_0.0.4_1612368987648_0.48176832959004945"},"_hasShrinkwrap":false},"0.0.5":{"name":"@abiee/express-open-api","version":"0.0.5","description":"OpenAPI Validator","main":"index.js","author":{"name":"Abiee Echamea"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/abiee/express-open-api.git"},"scripts":{"test":"mocha","lint":"eslint index.js errors.js test/"},"dependencies":{"api-schema-builder":"^2.0.4","auto-bind":"^4.0.0","express-mung":"^0.5.1","lodash.isdate":"^4.0.1","lodash.isempty":"^4.4.0","lodash.isplainobject":"^4.0.6","lodash.mapvalues":"^4.6.0","swagger-parser":"^10.0.2"},"devDependencies":{"chai":"^4.2.0","eslint":"^7.15.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.22.1","express":"^4.17.1","mocha":"^8.2.1","sinon":"^9.2.1","supertest":"^6.0.1"},"keywords":["openapi","middleware","express","swagger"],"gitHead":"9086fb78515561788306f73a536416c150f506bc","bugs":{"url":"https://github.com/abiee/express-open-api/issues"},"homepage":"https://github.com/abiee/express-open-api#readme","_id":"@abiee/express-open-api@0.0.5","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-BxgHfIfaRvtSIVkK1XwtUi//+TuvhlF2/AUSP2O344RMDG6B8Omm1VO4VchZC23gaOXs5X+0YwS6amoIBFkp6A==","shasum":"305964696829f5b53aece3012a82ce1561b93096","tarball":"https://registry.npmjs.org/@abiee/express-open-api/-/express-open-api-0.0.5.tgz","fileCount":20,"unpackedSize":74543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGvXdCRA9TVsSAnZWagAA234P/jGUVPnqdzpbcBbHg2WB\n1sqXZ86Dij9YqcD5PKthSiRkLOkiFaJ3fKjZq/CojgnObS5bcznH4hut27aE\nCWF4wfBC5IWCWub03uplRgemdgO84/6jvZeyqBBwgsQrBj818OM2DcWEZrjM\n/LtZQ0NDwRFX4VmGTxxWJEesxz+UpiYjShHBjcjEh7pnRnvcd2AcUmrOHl8b\n39c5fhf506ctxtL0Y0bBxKZHIPQ9nIJkmjc+kZZJHAsqpSbDxUbJW04Q0QQ7\n2Y3WcpWp1OEhgwhObwL8H2CR+vP31VfI77P20BmfdEGVBl9Zu9A6ow6qnEHq\nZMDPMc3RXyK5J9zVNl+eq7+ZhPwxQAucGHGO3d5L2hJ0D0ktR+X/28uVL9MB\nuDtGmWBF2Lbxhbq/9uBITkG0uGF7GUgxtqP/k7PI/CZf4WCi4dPnlINYx3Gu\nAxA7+M9BV1hVGbU5rDUHyuLj2Yrw4qEqrVYbB/JtgsBN/CyrCt290ZEiqVCr\n80Dkbs4fme3fs9mOfHmiFbcCHNK49GD34/P459HKLa+AkiM1r4v0oTNVaejj\ns6e8pxNk+jQMkqxBSs4L8+oU0j/cC/t/TbgE1td/UXfD69cn+Esh/FQ+KJa/\nPPpr3WlZbMO+qLFe1kmppq77Ft7YQ2YFrkd38HwtLiD4/I8IN21DLhN93Mym\ni95U\r\n=rGm4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLlkWpVuCodijeKrqiP7Mrqer42nCulD1D6D2u58Ex2gIhAJNBi5WtwCy+5yPjBsWEWAw0ng7N9edt/4oTMlMdqstk"}]},"_npmUser":{"name":"abiee","email":"abiee.alejandro@gmail.com"},"directories":{},"maintainers":[{"name":"abiee","email":"abiee.alejandro@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-open-api_0.0.5_1612379613219_0.6960682343439679"},"_hasShrinkwrap":false},"0.0.6":{"name":"@abiee/express-open-api","version":"0.0.6","description":"OpenAPI Validator","main":"index.js","author":{"name":"Abiee Echamea"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/abiee/express-open-api.git"},"scripts":{"test":"mocha","lint":"eslint index.js errors.js test/"},"dependencies":{"api-schema-builder":"^2.0.4","auto-bind":"^4.0.0","express-mung":"^0.5.1","lodash.isdate":"^4.0.1","lodash.isempty":"^4.4.0","lodash.isplainobject":"^4.0.6","lodash.mapvalues":"^4.6.0","swagger-parser":"^10.0.2"},"devDependencies":{"chai":"^4.2.0","eslint":"^7.15.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.22.1","express":"^4.17.1","mocha":"^8.2.1","sinon":"^9.2.1","supertest":"^6.0.1"},"keywords":["openapi","middleware","express","swagger"],"gitHead":"cb2e199dedbdaff049848749ae11c0fb47e3efaf","bugs":{"url":"https://github.com/abiee/express-open-api/issues"},"homepage":"https://github.com/abiee/express-open-api#readme","_id":"@abiee/express-open-api@0.0.6","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"integrity":"sha512-8FJByjR1yWrMvx4MWdvm+gd/s/zD2z5+cnB6rSKBdsVXshEGniMYIItSbheYUk1LlXKNUP6dtRvkTdcL9cpvTQ==","shasum":"44d18fbf1922202eeef4ca06543b6add1361b667","tarball":"https://registry.npmjs.org/@abiee/express-open-api/-/express-open-api-0.0.6.tgz","fileCount":20,"unpackedSize":74732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgS+wnCRA9TVsSAnZWagAAKAcP/18nQ1oNYK+WO+6l7PsW\nEGrvuOKTz8AXxmK+N53t9GV4Vm+3FBta9z0cgUm1LmGfi0HuTXofoJbDLXWS\nOOmHPNGZH4/NMqtDHxz4tH7TjQhYpb8ua8vgzwRbxZtqel5BAPZMoJmjSobr\n5O/MWcQzHFMgQ2yAj1inNHGCTIub1akGqvwFBBPuXi9zrNCXwsbI4K9zReil\nRypCEYtkuddDid/ZAmzmYhakHyS4nlwS01jQg9VOIfA6pEkMkT/x94OBkvDm\n1UeCbPmQyRdMR0uReFl1YeqQKSeTJShK0PPZtvPEUKRYmkYmiK+sOOH05LZ+\nHFl0FS6KOwUDiT0jNQbZPhOAloMFmJlyoHakWlLnFR8/8bR042Ws7FtRF7QL\n3jB86jo0AmW8C1u498e5db0NhUSHhIi8tWrsv8ML6/7UlI8OaZJ6dk6n71Fc\nJxPvQh8zkmNCZZtv/mAQZnV14/vpJ3FlTX2qvoyWBv1U+pIVjT2ehZCyoKxD\n0E4cqPSVFA9mcdcjZWWcpN/PJPMSxq/Db4bOWtjyKnbRCi96QbB9D8s+pVuX\nUhWS0HbKnP0wecBh8s5GugsUB9dBQ10mVhBMl0uMkouoy8dNi7YP0KyBIotY\nbB7FLhuq2TOxULiSp92qheUZBlazYHxYPqunpRYTMFmtEJMi5lMlNGPwkaRu\nhzg7\r\n=r+gf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRbaqPhi5aUerHvjI8MXLFKPFuPh5/aEBZYmrlsuVU6QIhALiun4zvebFGyaYbA8DzGTrk6EM0ZBugvjcEYWCfTlu6"}]},"_npmUser":{"name":"abiee","email":"abiee.alejandro@gmail.com"},"directories":{},"maintainers":[{"name":"abiee","email":"abiee.alejandro@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-open-api_0.0.6_1615588391340_0.7462423455631204"},"_hasShrinkwrap":false},"0.0.7":{"name":"@abiee/express-open-api","version":"0.0.7","description":"OpenAPI Validator","main":"index.js","author":{"name":"Abiee Echamea"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/abiee/express-open-api.git"},"scripts":{"test":"mocha","lint":"eslint index.js errors.js test/"},"dependencies":{"api-schema-builder":"^2.0.4","auto-bind":"^4.0.0","express-mung":"^0.5.1","lodash.isdate":"^4.0.1","lodash.isempty":"^4.4.0","lodash.isplainobject":"^4.0.6","lodash.mapvalues":"^4.6.0","swagger-parser":"^10.0.2"},"devDependencies":{"chai":"^4.2.0","eslint":"^7.15.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.22.1","express":"^4.17.1","mocha":"^8.2.1","sinon":"^9.2.1","supertest":"^6.0.1"},"keywords":["openapi","middleware","express","swagger"],"gitHead":"bf2166a6c92748d2b51f34b5e4ad75de2b4d8f9f","bugs":{"url":"https://github.com/abiee/express-open-api/issues"},"homepage":"https://github.com/abiee/express-open-api#readme","_id":"@abiee/express-open-api@0.0.7","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-//+A8Z/lO7POVAH+4GOLdBFfnqzXGZt/nSWbTDKjodN+xLiKy43YuvLTZvx14LWpYWrkqfNlFUyeLN4b81jz4w==","shasum":"12e535110729c4df086cd3d04b56015d9c68acae","tarball":"https://registry.npmjs.org/@abiee/express-open-api/-/express-open-api-0.0.7.tgz","fileCount":20,"unpackedSize":74991,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDP2RBWACqRKir5rmjqMif47hHoYwAOByCossgXHqED/AIhAOFwbzngiwkZBw+4KC/CBcBZbCTGHX91GY8Ps9y3+j+w"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJIRIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqSHhAAhr+lanZcEyPlygSlj9gqe3FVHdPhRFAETRE4G0shFOfFmOHs\r\neWbzfdlL+Jlxgqvy1ih2kTlLPbBNxLY9J8mZbbj89Nsvq7dGHMPyIAOqJrT4\r\nG/4iJQsVzbEcsyvKICD79IzBZLBjsYCZuy2TXfiOwu/HmfHV0qCalmwocZsn\r\nWdTLANHfsj3X4O+6y0LDCNDZoeNBWrxT5uVV4WeutYn0z5FBhygKhMG1qEwl\r\nrEz9XDVo5Rt0m9GzDCXvA2ibFGoiRZPP5Hh+loRvoBLajcU4hCxl6Vz+hwIY\r\nMKQ5kBVjDHa09t4gpnciz4OxWwmKt7EPc/uCCCRQBCZ1R7+LhrQLgEDaK5nM\r\naPPM/0DK+JM4jVfyaRx9TGBXmCUfgj3+6KvhyxZHlCb3u8QgyRwN/YaL95nK\r\nTIVVDsielbii5EA7lTDgXQ5NqphUQkQu0ErNUHw4PLjTlHfsBCNx6rbXR0ok\r\nOU1RpnxYKmJnIOMOxEazpU+b13Sz7JAjE2i2AM18cQAYfHVZU0ubLEON8A97\r\npogzi9d9JG4qDFpro9oPJZhnW2l59RUcYalBRzyh+yPHleCno8eOfyy9z/4U\r\n0Sa6DRZoCdIjNxjwUWz0fPE/e6yMC4JuoVuuGqj72Rxa2M9PDuH0Pm5wE5Oi\r\nfoE11lKPGL73zR+CfkC2GyxxKMIyXJzwlg4=\r\n=k7+3\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"abiee","email":"abiee.alejandro@gmail.com"},"directories":{},"maintainers":[{"name":"abiee","email":"abiee.alejandro@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-open-api_0.0.7_1680114760272_0.2909759642758787"},"_hasShrinkwrap":false}},"maintainers":[{"name":"abiee","email":"abiee.alejandro@gmail.com"}],"description":"OpenAPI Validator","homepage":"https://github.com/abiee/express-open-api#readme","repository":{"type":"git","url":"git+https://github.com/abiee/express-open-api.git"},"author":{"name":"Abiee Echamea"},"bugs":{"url":"https://github.com/abiee/express-open-api/issues"},"license":"MIT","readme":"# Express OpenAPI\nAnother OpenAPI Validator for express.\n\n## Installation\nYou can install this with `npm`:\n\n```sh\nnpm install --save @abiee/express-open-api\n```\n\nOr with `yarn`:\n\n```sh\nyarn add @abiee/express-open-api\n```\n\n## Usage\nYou need to have an OpenAPI Spec file somewhere\n\n```javascript\nconst express = require('express');\nconst expressOpenAPI = require('@abiee/express-open-api');\n\nconst app = express();\nconst middleware = expressOpenAPI('/path/to/your/spec.yml');\n\napp.get('/foo', middleware, (req, res) => {\n  res.send({ foo: 'bar' });\n});\n\napp.get('/xyz', middleware, (req, res) => {\n  res.send({ message: 'foobar' });\n});\n```\n\nThe valiator middleware can be created with:\n\n```javascript\nexpressOpenAPI(pathToSpecFile, options);\n```\n\n### Options\nFull options object:\n\n```javascript\n{\n  allowNotDefinedPaths: false,\n  allowNotDefinedResponses: false,\n  validateResponses: true,\n  invalidRequestHandler: (error, req, res, next) => next(), // ignore all errors\n  invalidResponseHandler: (error, body, req, res) => res.status(res.statusCode).send(body), // ignore all errors\n  onRequestValidationError: (error, method, endpoint) => console.log(error), // prints all errors\n  onResponseValidationError: (error, method, endpoint, statusCode) => console.log(error), // prints all errors\n  onMissingPath: (method, endpoint, error) => console.log(error), // prints all paths that are missed in the spec file\n  onMissingResponse: (method, endpoint, statusCode, error) => console.log(error) // prints all responses without OpenAPI spec\n}\n```\n\n#### allowNotDefinedPaths\nDefault: `false`\n\nAllow or not to have not defined paths in the OpenAPI spec file for express routes.\n\nWhen `false` it will enforce to have the path defined in the OpenAPI spec files for express routes. If you have a route with a missing path in the OpenAPI spec files then it will return a `400` error.\n\n```json\n{\n  \"code\": \"ENDPOINT_NOT_DEFINED_IN_API_SPEC\",\n  \"method\": \"GET\",\n  \"endpoint\": \"/path/to/foo\"\n}\n```\n\nWhen `true` it will allow you to have routes without an OpenAPI spec. In other words, it will ignore any missing path in the OpenAPI spec files. This could be useful if you have en existent API and you want to incrementally add paths to your spec files as you go.\n\n### allowNotDefinedResponses\nDefault: `false`\n\nAllow or no to have not defined respones in the spec file when express returns a response.\n\nWhen `false` it will enforce to have all responses defined in the OpenAPI spec files for express routes. If you have a route with a defined route but missing response status code in the OpenAPI spec files then it will return a `501` error.\n\n```json\n{\n  \"code\": \"RESPONSE_NOT_DEFINED_IN_API_SPEC\",\n  \"method\": \"GET\",\n  \"endpoint\": \"/path/to/foo\",\n  \"statusCode\": 401\n}\n```\n\nNote: the middleware will look uf for the status code first, if not found then will look up for a `default` response.\n\n#### validateResponses\nDefault: `true`\n\nValidate responses or not. When `false` all respones will be ignored by the validator. When `true` it will validate all respones against the OpenAPI spec file. If a response is not valid then it will call `invalidResponseHandler()` when defined, or will use the default error handler returning a `501` error.\n\n```\n{\n  \"code\": \"BAD_RESPONSE\",\n  \"errors\": [{\n    // ... list of ajv errors\n  }]\n}\n```\n\n#### invalidRequestHandler\nOptional\n\nYou may override the default behaviour of the validation middleware when an error is found in a request to a route. When defined, the function is called with the following signature:\n\n```javascript\nfunction errorHandler(error, req, res, next)\n```\nPlease note that if you error handler has an error then the middleware will return a `500 Internal Server Error`. In the function you can define anything you need to handle errors. Please be aware that error could be any of these classes:\n\n * `ValidationError`\n * `RouteNotDefinedInOpenAPISpec`\n * `InvalidAPISpecFormat`\n * Generic errors\n\nSee below for more details about these errors. If you do not define an error handler the default behaviour is as follows:\n\n`ValidationError` will be a `400 Bad Request` error. With payload:\n\n```\n{\n  \"code\": \"BAD_REQUEST\",\n  \"errors\": [{\n    // ... list of ajv errors\n  }]\n}\n```\n\n`RouteNotDefinedInOpenAPISpec` will be a `400 Bad Request` error with payload:\n\n```\n{\n  \"code\": \"ENDPOINT_NOT_DEFINED_IN_API_SPEC\",\n  \"method\": \"GET|POST|DELETE|PUT|...\",\n  \"endpont\": \"/path/to/endpoint\"\n}\n```\n\n`InvalidAPISpecFormat` will be a `500 Internal Server Error` with payload:\n\n```\n{\n  \"code\": \"INVALID_API_SPEC_FORMAT\",\n  \"file\": \"/path/to/spec.yml\".\n  \"error\": {\n    // ... swagger-parser error\n  }\n}\n```\n\nOn unexpcted errors will be a `500 Internal Server Error` with payload:\n\n```\n{\n  \"code\": \"INTERNAL_SERVER_ERROR\",\n  \"error\": {\n    // ... serialized error to JSON\n  }\n}\n```\n\n#### invalidResponseHandler\nOptional\n\nYou may override the default behaviour of the validation middleware when an error is found in the response of a route. When defined, the function is called with the following signature:\n\n```javascript\nfunction errorHandler(error, body, req, res)\n```\nPlease note that if you error handler has an error then the middleware will return a `500 Internal Server Error`. In the function you can define anything you need to handle errors. Please be aware that error could be any of these classes:\n\n * `ValidationError`\n * `ResponseNotDefinedInOpenAPISpec`\n * `InvalidAPISpecFormat`\n * Generic errors\n\nSee below for more details about these errors. If you do not define an error handler the default behaviour is as follows:\n\n`ValidationError` will be a `501 Not Implemented` error. With payload:\n\n```\n{\n  \"code\": \"BAD_RESPONSE\",\n  \"errors\": [{\n    // ... list of ajv errors\n  }]\n}\n```\n\n`ResponseNotDefinedInOpenAPISpec` will be a `501 Not Implemented` error with payload:\n\n```\n{\n  \"code\": \"RESPONSE_NOT_DEFINED_IN_API_SPEC\",\n  \"method\": \"GET|POST|DELETE|PUT|...\",\n  \"endpont\": \"/path/to/endpoint\",\n  \"statusCode\": 200|400|401|...\n}\n```\n\n`InvalidAPISpecFormat` will be a `500 Internal Server Error` with payload:\n\n```\n{\n  \"code\": \"INVALID_API_SPEC_FORMAT\",\n  \"file\": \"/path/to/spec.yml\".\n  \"error\": {\n    // ... swagger-parser error\n  }\n}\n```\n\nOn unexpcted errors will be a `500 Internal Server Error` with payload:\n\n```\n{\n  \"code\": \"INTERNAL_SERVER_ERROR\",\n  \"error\": {\n    // ... serialized error to JSON\n  }\n}\n```\n\n#### onRequestValidationError\nOptional\n\nThis function will be called anytime the middleware finds an error while validating request. You can use this function to log errors or send them to a error monitor system.\n\n```javascript\nfunction onError(error, method, endpoint)\n```\n\nErrors that could be reported:\n\n * `ValidationError`\n * `RouteNotDefinedInOpenAPISpec`\n * `InvalidAPISpecFormat`\n\nNOTE: Any error throwed by this function will be ignored by the middleware.\n\n#### onResponseValidationError\nOptional\n\nThis function will be called anytime the middleware finds an error while validating the response. You can use this function to log errors or send them to a error monitor system.\n\n```javascript\nfunction onError(error, method, endpoint, statusCode)\n```\n\nErrors that could be reported:\n\n * `ValidationError`\n * `ResponseNotDefinedInOpenAPISpec`\n * `InvalidAPISpecFormat`\n\nNOTE: Any error throwed by this function will be ignored by the middleware.\n\n#### onMissingPath\nOptional\n\nThis function will be called when a path is not defined for a route. This is just a notification. You can use this function to log errors or send them to a error monitor system.\n\n```\nfunction onMissingPath(method, endpoint, error)\n```\n\n#### onMissingResponse\nOptional\n\nThis function will be called when a returned response is not defined for a route. This is just a notification. You can use this function to log errors or send them to a error monitor system.\n\n```\nfunction onMissingResponse(method, endpoint, statusCode, error)\n```\n\n### Errors\nThose errors will be throwed when a validation error occours in the validation middleware. You can import errors with:\n\n```javascript\nconst {\n  ValidationError,\n  RouteNotDefinedInOpenAPISpec,\n  ResponseNotDefinedInOpenAPISpec,\n  InvalidAPISpecFormat\n} = require('@abiee/express-open-api/errors');\n```\n\n#### ValidationError\nThis errors happens when the API Specification in the OpenAPI Spec files does not match with the requested received in a given path. The available public methods are:\n\n * getErrors(). Return a list of errors found in the request. It validates the request body and query parameters when available. The errors has the format defined by the AJV library.\n\n#### RouteNotDefinedInOpenAPISpec\nWhen `allowNotDefinedPaths` is set to `false` and the requested route is not defined in the paths of the OpenAPI spec files. The available public methods are:\n\n * getMethod(). HTTP method for the endpoint. Could be `GET`, `POST`, `DELETE`, `PUT`, etc.\n * getEndpoint(). This is the full endpoint route.\n\n#### InvalidAPISpecFormat\nIf the OpenAPI Spec files has not a valid OpenAPI format this error will be throwed. The available public method are:\n\n * getFilePath(). The path to the main OpenAPI Spec file.\n * getError(). The error returned by `swagger-parser` when validating the file.\n\n## Examples\nHere are some use cases that shows how the validation middleware can be used.\n\n### Custom validation responses\nYou may have your own API standards and the default server responses are breaking them. You can change the default responses as you need:\n\n```javascript\nconst express = require('express');\nconst expressOpenAPI = require('@abiee/express-open-api');\nconst {\n  ValidationError,\n  RouteNotDefinedInOpenAPISpec,\n  ResponseNotDefinedInOpenAPISpec,\n  InvalidAPISpecFormat\n} = require('@abiee/express-open-api/errors');\n\nconst app = express();\n\nconst middleware = expressOpenAPI('/path/to/your/spec.yml', {\n  invalidRequestHandler: (error, req, res, next) => {\n    if (error instanceof ValidationError) {\n      res.status(400).send({\n        status: 10001,\n        message: 'invalid request',\n        errorList: error.getErrors()\n      });\n    } else if (error instanceof InvalidAPISpecFormat) {\n      res.status(500).send({\n        status: 10010,\n        message: 'invalid api spec'\n      });\n    } else if (error instanceof RouteNotDefinedInOpenAPISpec) {\n      res.status(400).send({\n        status: 10012,\n        message: 'invalid route'\n      });\n    } else {\n      res.status(500).send({\n        status: 10000,\n        message: 'server error'\n      });\n    }\n  },\n  invalidResponseHandler: (error, body, req, res) => {\n    if (error instanceof ValidationError) {\n      res.status(400).send({\n        status: 10002,\n        message: 'invalid response',\n        errorList: error.getErrors()\n      });\n    } else if (error instanceof InvalidAPISpecFormat) {\n      res.status(500).send({\n        status: 10010,\n        message: 'invalid api spec'\n      });\n    } else if (error instanceof ResponseNotDefinedInOpenAPISpec) {\n      // ignore undefined specs\n      res.status(res.statusCode).send(body);\n    } else {\n      res.status(500).send({\n        status: 10000,\n        message: 'server error'\n      });\n    }\n  }\n});\n\napp.get('/foo', middleware, (req, res) => {\n  res.send({ foo: 'bar' });\n});\n\napp.get('/xyz', middleware, (req, res) => {\n  res.send({ message: 'foobar' });\n});\n```\n\n### Validate against OpenAPI but do not change actual API behaviour\nYou may just monitor the compliance of your OpenAPI Specification agains the actual API. This could be useful for contract testing in `production` without break anything.\n\n```javascript\nconst express = require('express');\nconst expressOpenAPI = require('@abiee/express-open-api');\nconst Sentry = require('@sentry/node');\nconst {\n  ValidationError,\n  RouteNotDefinedInOpenAPISpec,\n  ResponseNotDefinedInOpenAPISpec,\n  InvalidAPISpecFormat\n} = require('@abiee/express-open-api/errors');\n\nSentry.init({ /* ... */ });\n\nconst app = express();\n\nconst middleware = expressOpenAPI('/path/to/your/spec.yml', {\n  allowNotDefinedPaths: true,\n  allowNotDefinedResponses: true,\n  invalidRequestHandler: (error, req, res, next) => {\n    if (error instanceof InvalidAPISpecFormat) {\n      return res.status(500).send({ code: 'INTERNAL_SERVER_ERROR' });\n    }\n\n    next(); // ignore all validation errors\n  },\n  invalidResponseHandler: (error, body, req, res) => {\n    res.status(res.statusCode).send(body); // ignore all validation errors\n  },\n  onRequestValidationError: (error, method, endpoint) => {\n    if (error instanceof ValidationError) {\n      Sentry.captureException(error);\n    }\n  },\n  onResponseValidationError: (error, method, endpoint, statusCode) => {\n    if (error instanceof ValidationError) {\n      Sentry.captureException(error);\n    }\n  }\n});\n\napp.get('/foo', middleware, (req, res) => {\n  res.send({ foo: 'bar' });\n});\n\napp.get('/xyz', middleware, (req, res) => {\n  res.send({ message: 'foobar' });\n});\n```\n","readmeFilename":"README.md","keywords":["openapi","middleware","express","swagger"]}