{"_id":"trpc-openapi","_rev":"78-b9511a108ec5d72e4f87a0ed4ec044b9","name":"trpc-openapi","dist-tags":{"alpha":"1.0.0-alpha.4","latest":"1.2.0"},"versions":{"0.0.1":{"name":"trpc-openapi","version":"0.0.1","author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.0.1","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"dist":{"shasum":"2716d77ffe44981cbf08a46e08f8b5fccc039b4d","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.0.1.tgz","fileCount":2,"integrity":"sha512-k1RLtRfOFTKyR0FDp6H2TLrIL41GkB/wpQleEIx0FJvSTAtnAHBt78RmyOUnlfRXpe6eoK8JE+CgCdO5NBrTlg==","signatures":[{"sig":"MEUCIGaI4meJsjxXG8EB1mc2oT5l12R5a+yWot7OI9AzWJXMAiEA69AnPO++5LBtSam9l3qo0GkVkxOR9TCtBOWV7eSj1mQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiclNpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqpTQ//b5cLXhqywHzgxNxZwVfrpvs0wcdhHFkQ2Xldw/eG2lPH29WR\r\ntWSpH6ObmxRGMok1IOVhB80UuOAjcTlSMOeUwJYRp4CjnBu9SMUlDKTSDJkq\r\nex2tEnTWRjACzBmUCif2fGWqPDw5JBEYCp1WETTHBburf95TE6V3t8xB+Dtd\r\nGOiwDfm4o+lmdZXrDJXPx71DXs2ne1yIgBUg9hdLGPowz6KVqYbD9Q3x3cS1\r\nfMr1KhNKm83kVHvFT4/uFVNYwg+F+InjIZLje62rNhsBsV/vST/vvAcL9A8f\r\nCW+jaOooImwCL01YJ2wVwspXGZuQ7njHPAsQJL9NyndGpcIZKliVXFxpkYzg\r\n+GhP/pU7hb0m+afbYXop07l5j9b8U/rPmIBQ5KzuU8mLE4uR5WklZcSWRSFP\r\n5jlK+mcnnKtGvZcta9+k8PBUvcgkxcv22OBn/fJZCuWrYq0vJz0RjUfMBBSp\r\nwHwBtmAcvYQzA4P2HJf9bqqKFLTus+l4Kuv6xFBbNFeFJDoYbqPluDigQHHH\r\nSIv9aKQF0tinyu9Jv3rFa8/gU+KkqqIHaTMgIn2tjXCDNCf8Oac764DF01jl\r\nOiXST5amdh4lhx6Iy5igVSMNATAyrB0rCyOhpAHnLV4q2+5bMmWpyh0g5Z6H\r\nt+LptEqCLYa6kC7JG5PU6CTZFicRdZEUq3E=\r\n=tU7J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{},"_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"_npmVersion":"8.5.5","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"17.9.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.0.1_1651659625196_0.6750518654668352","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"trpc-openapi","version":"0.1.0","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.1.0","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"eb9cee7b8e53f33bc3f552e375df2ab0ddd1a332","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.1.0.tgz","fileCount":63,"integrity":"sha512-V7Dj4Zw1UVksP49alJuJxK14L6OzsPYC18pvLwbEPfbbHsdVK2iXNMVkOb9jXfIxbv/UsXhkcN9i734uRR8UIg==","signatures":[{"sig":"MEQCIC3RDhBxVHpuBVX5dEgiLe2TuE8hJhqREV4xfQHF2jWMAiAwqKvupsr3FUwLzmG7AhL4AnGbV8RpNBHBh0P1bhBKvA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":88069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioyYIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmov0w/8CSza7eHFpz4nZKcV/R5Durht+GOfqxfHLb5nfU/qQP52eMbE\r\n5vju1iP8BB+Z2wbzY1T2HZ9FPJCf+ctjz6Z5OvSVcl88G1myzIPeOfUxnDBX\r\nTuymaExAcWvloaL7w23ScIgKe3gYtgRU294r5ddGn+HQuHHl3/maak10maEg\r\ndbaJI45tWOgQownh8Tqih52K1IX37qLcBBd9bQtSuHZNy0JfB4y3qRZuReIY\r\n79t8vXh5yPVmxsTr8CllmE2GVJGMkUHUpjXTvGqgVi1BZT6g6bpphRtFg8Yi\r\nqRWjEMZtgfZcTMM0ZZSUv3Sx2uNI3mNy15k/Ii4mn6lR/o2djNZpDviGJUOp\r\nlaYzQ7eqOe3bzdks8oKLFQyDafW1dviSWK63bpi4MRxLWMTvow5gQftGZ4gm\r\ncf/RDBIWLC9tHSHmY3IFcIqRgsisO3+qaF7NnCZT4eQ5PQN8Cz1lalYqyFCT\r\nlNjHvhh10hq+eaGp8ulfR1qaYa33z2Q0JOfAb9oibH85IpYbbsjrBveKQcI6\r\nO175HZOGRA/d1mQkvsn7nFe5TwssCIPOCyl0mssdVk0+Xx5qHvonnbXBuiq7\r\n9yAgt8sFmlXToGJdSqXUBpR+jbpQ7XOJdej0mt9+PAOhvsUhI1qvUZDMik0j\r\nE89y9X/sYh4bZGCsRnnD92aTKBaXdSoYikM=\r\n=wM+O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"71671c56bbbcaa46675d673ce945ae1b094effd3","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json","release:minor":"npm test && npm version minor && npm run build && npm publish","release:patch":"npm test && npm version patch && npm run build && npm publish"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.0","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.14.2","_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","next":"^12.1.6","eslint":"^8.16.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.3","ts-node":"^10.8.0","prettier":"^2.6.2","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.2","@types/jest":"^27.5.2","@types/node":"^17.0.38","@trpc/client":"^9.23.0","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.1","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.0.0","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^11.0.1","@typescript-eslint/parser":"^5.27.0","@typescript-eslint/eslint-plugin":"^5.27.0","@trivago/prettier-plugin-sort-imports":"^3.2.0"},"peerDependencies":{"zod":"^3.0.0","co-body":"^6.1.0","@trpc/server":"^9.23.0","openapi-types":"^11.0.0","lodash.clonedeep":"^4.0.0","zod-to-json-schema":"^3.17.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.1.0_1654859272139_0.7278487844844939","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"trpc-openapi","version":"0.1.1","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.1.1","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"8ed6652891be43246d0a253e6f12daa44c61f00c","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.1.1.tgz","fileCount":63,"integrity":"sha512-cG9G/lCKrlVIUqPm6/NyFYNN1gk5bzg9W3FTKl8UAB0kxFkWkULQdTWKgkyO/AhG1pPfNnaHR0JGRwKDZpNA1w==","signatures":[{"sig":"MEUCIAsGtoGksSlIG75yhEHDAIUtzwdbdV1yhwQNeYEksTYIAiEAlmqUL6UU5E10IW6MimH0hYmGxRXlmB27s9ghl3h/4T8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":88069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJipyc5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoB2A/+KWvK7vd41RV0+HyRGI4ZZfpYnRHcfek2YJIMctdSNLQRriZf\r\ngqZWGQLyNyvtTFo1qzv1FNfj/qxwvqrUze7yT1VGb7Rd3g/BivDcYfyRZihf\r\nA7rJoWm8HLvi2a2r3LTcEhV5kJ4YtYW1sC35/itaho87zJNyhn9PHQ9S+o44\r\n4cju4jz9uflSSRFtU8/RiZGGFp7W6QRYx9qEZiMG1WeT5gifIX6scdcJcnT+\r\niOb34kpjxfI7LvNJA/PjUxOvg90+d9Y50v9Z9GjzDeC2qW+kjdRSacdQhktR\r\nJ+Bza9gowrxMUdj4e43c41gnQ2kCDe96EJrsodDU/48DGRLMBdlKzz5493C3\r\nC8/hr/F2MSsKgM0qfnQwhU1uwqB79+A3xpBmwmfTG3Acl2FqMvKujXTTd+qH\r\nMzq8fCCjfQyTdXh8pMB/cvVJQzwUe3uyQb3oUxaUGYJdXYyv4gVwkk/kR1RO\r\n2a33uyp8flVw1U62jhfWRbDGDwCh7GiRvpPMk68OJibPMt/Zze0lD+7UeNQZ\r\n2cqvTbvNxjH6rEd7A1MqsHiATuurbG7gIKUYZvlre4G+ople6pDrDkQI+6fh\r\nlm2SsQtEjbU21ufLhR3TTP2+ppx0lYtYMlT/8du/egWRHJrOv8DmrD1qi55j\r\nffEioTAaNk9mjIkENcBIPrDZGfYv1lcAL/Y=\r\n=4s3J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"03cbdfc7192772b736699b6899a8fc39fb8b9e5c","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json","release:alpha":"npm test && npm version prerelease --preid alpha && npm run build && npm publish","release:minor":"npm test && npm version minor && npm run build && npm publish","release:patch":"npm test && npm version patch && npm run build && npm publish"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.5","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.15.0","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","next":"^12.1.6","eslint":"^8.16.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.3","ts-node":"^10.8.0","prettier":"^2.6.2","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.2","@types/jest":"^27.5.2","@types/node":"^17.0.38","@trpc/client":"^9.23.0","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.1","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.0.0","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^11.0.1","@typescript-eslint/parser":"^5.27.0","@typescript-eslint/eslint-plugin":"^5.27.0","@trivago/prettier-plugin-sort-imports":"^3.2.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^9.23.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.1.1_1655121721673_0.7147785975672025","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"trpc-openapi","version":"0.1.2","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.1.2","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"09d8520ad215d421555e22181b0830d26393ddac","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.1.2.tgz","fileCount":63,"integrity":"sha512-EdtuFYhcqC+wgSMARnEA0ZzIggHIZSU+z5NO/FhCnAQCwS5Zbpxa7PAuiOpYRiaxoDtMs8qeSHx+6IIFC14Kxg==","signatures":[{"sig":"MEUCIQDKVkdFPONq4YBLiPtv3dzX+xiEBjby6LaAXJUphkZ/rwIgTphppOX0cAi8kh+6h+JK4wD0MfQhUXbEGOWecwHbKDE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":89268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixBaXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmohcQ//bK0JX+2DJtnYOXsnLmMXak5BBYQOJfAYWbVL4XN+0Bv+LMbf\r\nCJpovGGWdfHW3MdznrOQ7591qYairU2QI0duyso8mWFw9rvQ1pVP/p/2vTx1\r\n0ub0dXlr5oZXShE3iMFGd07eA+XMZKsk7/cr4RAqjoeZmURqjis2Rz9qxmhn\r\n35JBUJUU3uMqokM+KoycWpcmBLswGF8tOOGisMt9hfx5sJWO5fak6gyNDGua\r\nwwGiSuZeK+A+dH/R902P2gFMEPg1JJVQ8UdnMZdOr3Bi7HVlyBVrz4Ueztux\r\nsYfNK6fRdESmplkFj1Q6R0GeZ4Ne3kmBcFAmFhNLNWGcEFqcSIHQm6wyPq1S\r\nXUZyUrT3QpKXTvCaGwGvU6rG4iALOIDE2jlfdGM7jCzbJ2rx8I8kNImM43DV\r\nIAaZylLWnn6Fbv9TPG6jnoTax09qDMxbOEilQ264Rrn2D36NvIsx76PJxhPO\r\nDMDZoYv1rsU6/VLFwZIWKjLXtlqoUWv7ei/2YZaybhXQljlrN6R+ZZcr8ATd\r\nZfZUxCqUTJmub3L7ZKLaOGrHBH78gSPd3ZBHGKYFpDna+zg5P2+daBCLR/Ln\r\no98juLFclVCam7w/d0qGS2xYO9ZUxvt8OZ5jKl4Bbtkd8+7IvH3oRrbDoYE0\r\njUtWHgglcoUESDFHOBAhH+SDKrUFH+RzSnY=\r\n=40rN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"8e8dc1e7c96c91c1f3dba7c19551045f63544e59","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json","release:alpha":"npm test && npm version prerelease --preid alpha && npm run build && npm publish","release:minor":"npm test && npm version minor && npm run build && npm publish","release:patch":"npm test && npm version patch && npm run build && npm publish"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.0","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.14.2","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.2","next":"12.2.0","eslint":"^8.19.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.5","ts-node":"^10.8.2","prettier":"^2.7.1","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.4","@types/jest":"^27.5.2","@types/node":"^18.0.1","@trpc/client":"^9.25.3","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.0","@typescript-eslint/parser":"^5.30.5","@typescript-eslint/eslint-plugin":"^5.30.5","@trivago/prettier-plugin-sort-imports":"^3.2.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^9.23.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.1.2_1657018007662_0.05814442413050802","host":"s3://npm-registry-packages"}},"0.2.1-alpha.0":{"name":"trpc-openapi","version":"0.2.1-alpha.0","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.2.1-alpha.0","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"8d103eb626dcb77f648462eb2397498aa9629d89","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.2.1-alpha.0.tgz","fileCount":63,"integrity":"sha512-6uxPgGJZJhQZ0x5jwXSNxjktsYi641VRHDCDkvz+Kh8TguQv5vqJ51tau/3/nhof7MoBkhbhHaBO8GhkpO0lnw==","signatures":[{"sig":"MEUCIQDQdM4SIfJkSJrSXeMe8cr/HzgX5QGb+gCyfhjmdvVRtQIgEFn4yf5WkcsRziL2frkCvsXxSY2GWQenGcYNRLBND8g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixyHzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4bQ//a7Fc0hURmYO0x7biV6yj8+5ZHX0M4x8l9SdxEZq5T2IX7bu2\r\nImgNhzX0rnaqMdEtbQuRbCV3Hoqprn0sL73gBMl9PKUEDowdZvnXRRkYGCP8\r\niSDt19kO7d0GzvILJswRIuBdV9aCS7CGPQi+l8/GzCHGCwfXNQsnCQXgEELS\r\nfbx7LprGXFRbxFG9Ud0ufPYcWv3/sWlimMmN8DZDuxV3wb7xs8BV9fGY3l3Y\r\nEsqj5wGHmqSF76QU4v6gC9nmnldmHMOo+pz7s0i6mpHeHsGTzKsn3iMu3/JF\r\ntKvZYZwLu2sleFJSs+jLCk2kVpaxr7HSF/9gU5XH1duAfyjb1InwzQSUT9XZ\r\nahMqgM7OA2PitB9rnBda8it1sGrlJF/cBi+1h3uKnVffy8kVqSHpifY7HkTk\r\n1nV0wkfnV9MSKm57ShF4ydSxkz5sh4KtHD/WfBcpdS3MM9pkIW6HVRb9u7OC\r\ncZ1xI96z40ZY1lJqrkcMjJBKm2JJWgmolJIIhD/QDeuo5xRzgFzfDZSmSw9y\r\nXdZLIjCkVsrX7xLWtQnRhH0PYzcvxom2wiHU26kt2OqDf+YXrg+yqrGCTaPj\r\nejih6tflXjOsxXGFilr76yyckOrRULTrKzOVx9/awUvFdJOkXoJPeKYuAmGM\r\ndOIpb2yOu5EwqaAJDMeOCUeXF9/cfb4hAi0=\r\n=tx9q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"9c52157878238ea3f6810b31bcf0257c04c143dd","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json","release:alpha":"npm test && npm version prerelease --preid alpha && npm run build && npm publish","release:minor":"npm test && npm version minor && npm run build && npm publish","release:patch":"npm test && npm version patch && npm run build && npm publish"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.0","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.14.2","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.2","next":"12.2.0","eslint":"^8.19.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.5","ts-node":"^10.8.2","prettier":"^2.7.1","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.4","@types/jest":"^27.5.2","@types/node":"^18.0.1","@trpc/client":"^9.25.3","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.0","@typescript-eslint/parser":"^5.30.5","@typescript-eslint/eslint-plugin":"^5.30.5","@trivago/prettier-plugin-sort-imports":"^3.2.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^9.23.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.2.1-alpha.0_1657217523369_0.7644046022592981","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"trpc-openapi","version":"0.1.3","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.1.3","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"7b333ece6ce459da51e44b42f04cb4da0b50a172","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.1.3.tgz","fileCount":63,"integrity":"sha512-Ve5mbhZUDH4T1j/QV1JfwKUJeFlZ+Brk9pdhxgV1TD7hVqKMDHx9kjzO5E5KFjYwznuTHS7U+6uBzB9lneJokw==","signatures":[{"sig":"MEUCIQCkOCY42WE0IcKv4IgJLfx2cjRFVbmt0DaRrg4IhV0YTAIgIHTJxAMiDA6KMWc0mPtW8kTE47y4BtBQoX8n+31/y0I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizAbfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpHsxAAjKHJZTZJZBpXOURujz9xG0pV+QsER/cm8tQUTpac/gZDgvJf\r\n+y1KIScfZjtswDM0+BJIOk4twHGrlK3R/TyPXidwfoL7N/qCYovaXvCgUmbk\r\nBRY1g/d6ev5r9JJnBHkVsgbC7j8nDoqFAEeOUx0fydWX+Pwvb7xQW7/fMPqk\r\ncXU2H+EY5sbaD2XYf/F6MG0d+XRcFP1wZQKIykiONEca9bjcdIXerRw/+no6\r\na6kCKd0AFM6Ns8mCyjThYMFLySV36C/3X4nitTgG+TL6G4Y2KI3kvU4BaWrE\r\nEVf3RfJs1l/PovSUOof4Quy9109nfw+Srb+j2OOfHMCZHzeG4EzTiq3WvwV6\r\nYK6gLR0pGTloviS9X5eDOIabrIeVDDIrWr8SXytQZ00OFPMbnRLWM008AZwC\r\nidkRH4iueVf21citD5Voxaa2iZt5AjvD7CllQYB+Ct7orDw97UPxxFPFZ/nV\r\nehJAAYFLKLjXhHyz+zzOhQ5hm4gdnUpYcz6QxoZ4rC3YqYink3+VTNnwlhqB\r\niQWJW3HjnPy7mlOez9XII7Vtivwiy8CKr6VgngCRtheyBOJ+92Sh6ng+KC/U\r\nTZI8pwymps9SnmfSxFy1zAkDDTulgD/j/vCpT6SksHsad9erigvIeUFrilfS\r\n1rw7drFYHPoepNrKFQ1G5spMGvhNUhwDHtU=\r\n=Thmk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"f48321873794c24d43f0e5f74b4e3c340187acca","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json","release:alpha":"npm test && npm version prerelease --preid alpha && npm run build && npm publish","release:minor":"npm test && npm version minor && npm run build && npm publish","release:patch":"npm test && npm version patch && npm run build && npm publish"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.5","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.15.0","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.2","next":"12.2.0","eslint":"^8.19.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.5","ts-node":"^10.8.2","prettier":"^2.7.1","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.4","@types/jest":"^27.5.2","@types/node":"^18.0.1","@trpc/client":"^9.25.3","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.0","@typescript-eslint/parser":"^5.30.5","@typescript-eslint/eslint-plugin":"^5.30.5","@trivago/prettier-plugin-sort-imports":"^3.2.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^9.23.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.1.3_1657538271696_0.7882749984448558","host":"s3://npm-registry-packages"}},"0.2.2":{"name":"trpc-openapi","version":"0.2.2","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.2.2","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"db73602ecdab2745296ff2d1332343d0bc0dbf78","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.2.2.tgz","fileCount":71,"integrity":"sha512-PHbSrJoOMzoTL2fj1/+eFUBSoET7jrNT3OQ7TPhrMceB/tR8wf1L3vC+rZH27UHK6eJAQYYV5m31pctqurNJBA==","signatures":[{"sig":"MEYCIQCOVqkWIIBHcP7Ke3O56q7K6xOn78w469T0zC+Kno2RTQIhAJHqBdZEg5NO0JtYmMzjqrBlwrmmE6p7dri63WxBc28u","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0FrUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrg+w/+NVcRFMHi9nof14sT3ebsZ0eyY8D3bMg1pOUnbupavo4HRcaD\r\nlMbDczJZv5OQlE00d7hJo0/bpsTSvSlGuJN7jAz99tu9J7465hnu+eZdUb8x\r\n8Kuti9H//GqxuynfAcLBCCPufrRbyVy2/LsK5XDEICgzJP/V3kzMiVYYp3XX\r\nG0FO+4GpTUdQWkGaaNA2wWYm9X9U7nrby6lp/UwHQ6pIoIf8wDzWioGZ1x81\r\nCUgkW4kdOlUtVCYRA47PyzmwewAa1hZkypSRHpa/6yRVhoefRmGxgXoJlZC6\r\nlEFD3U7ZppSbDqBS2Ct1rzsxY6IYiqbSwL7DXpDmeFw57ExqYpJW/PQbtTC5\r\nodj2LaQus13EQLT++051VLJ9F831XX18RPPJtOwMIwx5d80CcN108FOIa5ZQ\r\n1p8Pi6W7NU+vwz8VgWSNzYnshdBwtV7nWbe1iHSqpgalAqNAm3dsTmxga7gv\r\nWvxxi1Bm64rwx3BnYq9hacrqcbSR+xeRTBXUvahm5mTeJkLhnDS6Tqt4wpXo\r\nlJnQya+XSPnq6pKXRFTGlIdcwoY8795264AlEvF472GEc9hDGRJsnLKEsGsS\r\nHp2pRrUvJXZEMXeaJfStjXlpz4o7gJqiqiblZm/AuU5A3C4G8vuJWY/a5L3O\r\nFe4qq+ATReiqUC76Kv+v+lU0nI8OnbCdFVo=\r\n=DXEo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"30362b19f7e695fa3f52af80c15da6101e6c8d9c","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json","release:alpha":"npm test && npm version prerelease --preid alpha && npm run build && npm publish","release:minor":"npm test && npm version minor && npm run build && npm publish","release:patch":"npm test && npm version patch && npm run build && npm publish"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.5","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.15.0","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.2","next":"12.2.0","eslint":"^8.19.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.5","ts-node":"^10.8.2","prettier":"^2.7.1","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.4","@types/jest":"^27.5.2","@types/node":"^18.0.1","@trpc/client":"^9.25.3","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.0","@typescript-eslint/parser":"^5.30.5","@typescript-eslint/eslint-plugin":"^5.30.5","@trivago/prettier-plugin-sort-imports":"^3.2.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^9.23.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.2.2_1657821907960_0.8054260810599874","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"trpc-openapi","version":"0.3.0","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.3.0","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"8ac8db914c245f2c9a4bc5197b498bfaab727818","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.3.0.tgz","fileCount":71,"integrity":"sha512-n1XrgelJl+GTQC2kInj3qefGYXROUcj67AAp9OIU4ZYf8pyuMMJQhND7PoKf5DNmGUM9Xx39KXt82Qae+MB3JA==","signatures":[{"sig":"MEUCIAXWcVi027fTPRjdlAuzn4uTImqx3qyZ09rUHa6944LLAiEA4xKZzGzoNnzu3Uahii//xSOPHvyNOmAR3YxkLS5s3Ng=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1myPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0Pw/9GOjNLLTB/uhD6UF5YMv0j9D09MiVAdLuKyq8R3eIuMyUFkpJ\r\njfg994sZmxGTLE5zOoZj9cSaH9PS3wmmvFIcr7c/ycKrNCO7qM2e4i/EiLow\r\nCaMGb+t8THpv/tMIp95cC7Z7ugLGAhaHdC0qi1NSuzg2X0Ojelvf+/yCRv+g\r\nHHLAyw8/8PYfh63MyRfUfGNqioV3a3aFUb9BWz5w0DlHwZ1PqtPr4p692j+K\r\nKmqdYHFJEan6GrjygzTs3detPfhIcFymv77Js468bax0DeDwRziKZjM4kSQY\r\np98IjWPQf6v8Hh/i2y4tWGlo+pLeibsW8Ji1jXj9pYk0+IJtb7fqjVPTyl9h\r\nTR8OD9nWxASs3FtNx0SKC5sF+19S33iHiPEPgOcGX5yDBjlH/XOx/UJDt9MN\r\niw14yBUM0IvYqe3dfjcay280tDGuavrzxTr49q0AiRimcjBBtwqEffYEUTO4\r\nRo/UVZJx8uEKDqEQD9B6PkUNaxD5Mj7W+dTZxMo26CpxnUtvOwO2XOZsco91\r\nCw6uKSCx0Uwcc/t5hg0csLYNa9Id5/0lmx6qDpPT5nRCD8H8Tv8cY4nkoR/V\r\nvc9MzqOlekbgnQhH3bMlXMnybBHShgtnXzfo+XFaFXZg9wcYVe2bjj9+NvU1\r\nW+PbGjf6xMc5O0/Rak+tsmoDnu9kNb5vJ3Y=\r\n=tvB/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"9b229135e8585d7ada6c1639724b7d5f27989f08","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json","release:alpha":"npm test && npm version prerelease --preid alpha && npm run build && npm publish","release:minor":"npm test && npm version minor && npm run build && npm publish","release:patch":"npm test && npm version patch && npm run build && npm publish"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.5","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.15.0","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","next":"12.2.2","eslint":"^8.20.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.7","ts-node":"^10.9.1","prettier":"^2.7.1","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/node":"^18.0.6","@trpc/client":"^9.26.2","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.0","@typescript-eslint/parser":"^5.30.7","@typescript-eslint/eslint-plugin":"^5.30.7","@trivago/prettier-plugin-sort-imports":"^3.3.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^9.23.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.3.0_1658219663143_0.7272942922869252","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"trpc-openapi","version":"0.4.0","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.4.0","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"0fc682983c328b2cdb281ed5b56830ed84a553e4","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.4.0.tgz","fileCount":71,"integrity":"sha512-a3/JuEoAhvN9Q73hx9vthjAm85JpEKQ9OiDgqsUZHUm0SFvqUK9WPkTradfepzJ1EbPdL2hEbwSIWZ2M/+WNOQ==","signatures":[{"sig":"MEQCIE3s0JNAzmlichSaNJLAUfv3kgSh/dNVWvL/uMGVa4DYAiBFxNIY6aKCFEIUlGXOwpJdQ7SI2kNN2XiaQS3aEB/1zw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2qV8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNcg/9ENC0gBb5lcbd0v2nVSoR7wob7vcUjMvbVQO/Ulz0QETsv2P5\r\nXTRe4HaBAR1SIIy+uqKzWE8y7stiCzj1zDWnrXur7hXmU+a7r45P586dL14i\r\nqddQXHinRjeAgOdEUsCfUQXYpHvoukau2M1KZt1oEfJtl9a5SRsYf5E0dZbN\r\ntnO4b0zxfZPQafIJVCHhXFOQWAYRgpSWHcA6qU8x8sf+J+EfvNLvVtxQMzSB\r\nqoAV7w+351kALNkQWljjpWfgOSFYLpg2+Sz2rgdl31pSf+rGPkuDAvVN8v3X\r\nQ6Oc+k6AEcRDMa3Cs5fwa467lOBxUMT4mFRKk42govsswNWGSf3ta3FEknl2\r\ni2WEgkUo7uklZParlLDnGMnehtu90s0OxRgn/DE0qoQHH2Bb2/a5zTVRKUAy\r\nNIfLYdd6vzq8IgZARmsZGTPwABg5ohycaJ8Ni2Z7xLCFHlWh44ZpxftFjN6M\r\nakVpJlbM4CEsPUaF+JQH1rAgZoQfzP4l1MwmkxNTxXrYVfmW5Chp4gsH2mGF\r\ni8iEJcWB6EPmWCW474LD5WIt2lJXlql50nSltUsdKRDrte8OWm1+E/uWjcqC\r\nK7c+AErYal+rP4Ytv4RdXxd77Sl88bTQkIQsh+9sucFt19GcFfBvlaRWi8BJ\r\npDlXqkfktTT7UmJ5ENePIEfl7dxySKsRxd0=\r\n=PW+j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"9a840fd9a2ffd0664f3031f64c2e3fb58eae70dc","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json","release:alpha":"npm test && npm version prerelease --preid alpha && npm run build && npm publish","release:minor":"npm test && npm version minor && npm run build && npm publish","release:patch":"npm test && npm version patch && npm run build && npm publish"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.5","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.15.0","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","next":"12.2.2","eslint":"^8.20.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.7","ts-node":"^10.9.1","prettier":"^2.7.1","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/node":"^18.0.6","@trpc/client":"^9.26.2","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.0","@typescript-eslint/parser":"^5.30.7","@typescript-eslint/eslint-plugin":"^5.30.7","@trivago/prettier-plugin-sort-imports":"^3.3.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^9.23.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.4.0_1658496379825_0.2861807464001087","host":"s3://npm-registry-packages"}},"0.5.0":{"name":"trpc-openapi","version":"0.5.0","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.5.0","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"a074d9c9072f747062620cd3d76028ddbcea9a39","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.5.0.tgz","fileCount":71,"integrity":"sha512-ZgRRjxd6Lx+wJCwP7e1GT+VZb/dEKdTddgUlnUzyJfXquOdZ1K9mdHDjR4l8ucfct+ZLwOrRouj5Fa9/PemjIQ==","signatures":[{"sig":"MEQCIDc086qPrr3XZyhRFjyhHN0Zj4QTFKnNmIia7wSviOHaAiAFUEEyh9SDFQwjabanh3G5LNAoZU78+Bij8TmC/bH3GA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8XP7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoI6A/8Dg73mkHi+BDDjwsCBk1rSDGuZEUVJO71XdXFOHz3tOd64hGc\r\n2z+l2qXj0rewKpVe4RQByGsO37Hojx6t7onf22DJeLFx89QV9OzE/4565ddr\r\n9bLaIj8Or3cQL7vDSR61274H+4n7RU5QVFsztDM9/TNKBitGIFP/zGN1GpKu\r\n5BygKP+tQNtZ8EH62xidw1fmz1lxMf/TweJm4DYHU1d++4LcNLPoN5yVrysM\r\nYz+P3s8d3Hh+5RiGYkHvUbT7rgba/E9fre49Ehg+x18Z0cERjNZpLzeKK7TM\r\nsGPB80czXS0oRLWzgIFSxT/IltxmGbZYkxJ/AEX4+PlrKQIHM0ovMCKRqrfN\r\n62/j9kIOMn8umg/JYrkOK58NumYscUC0jmCJK5R+st+C5cquaPldrZFYPesw\r\nIRy1RmUkMlByWdYKDtxxv48cZ6C5DfLvqfYkd1tayzi4bLU1GDzQWF9BldHy\r\nIlqFEtGNR5xH/kVzfwEPdUxKt5ZoMRuOzS37iddAPKDv7fPN4Z+a/Meh8Ltx\r\nWYWsDFVd1NRs/1BQL3blwdSvOyEh2B7BY4L2+DQoZ0ZiqFWxtY429oVJc+hJ\r\nFn0t8p3iiMzpSjbs+Md4msV38boP1BiOhAX2BE31lDYMBRb5Sqqg7vhRvpOn\r\n5gRwkabDUMv5FPzwydwrT7H+KNQJ0t20gFg=\r\n=hs0q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"29547210eb21dd6274e2d85e4b585f77d6e03fae","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.5","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.15.0","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","next":"12.2.4","eslint":"^8.21.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.7","ts-node":"^10.9.1","prettier":"^2.7.1","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/node":"^18.6.5","@trpc/client":"^9.27.0","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.0","@typescript-eslint/parser":"^5.33.0","@typescript-eslint/eslint-plugin":"^5.33.0","@trivago/prettier-plugin-sort-imports":"^3.3.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^9.23.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.5.0_1659991035134_0.5892987995890493","host":"s3://npm-registry-packages"}},"0.6.0":{"name":"trpc-openapi","version":"0.6.0","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.6.0","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"5d21d0fb8dac05895d6c22865b6eb28f70fc779c","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.6.0.tgz","fileCount":71,"integrity":"sha512-8p6w/pOIDBXvP55crZSjxF8PxuVhe4sKBnEtYhAjVIOCXx95b6OUheuyR7dXmDcltoDQEKcmCb8CTUIKJNuLuw==","signatures":[{"sig":"MEUCIA25wJVLSTQ6NhcQDDgYpx2Z+gNORPXfQYHIJhdUGdjlAiEAtA/KOguiLPXtg0lChkm9yOMyL6Fo3nSNV125B+j+RJA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":96312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjA44GACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEDQ/+JJaUWXhinhZwu3zQitvu8bbhJ8rPSfOKi+z3raDb1mDQGsX+\r\n1LPqAiiW5No/dW+rX8REQW2bFR5ik58AaHpRPxr4OnRzjoAreogiF/MhkS27\r\nW4jQZ5i9b3NhOxj2KGsMzqquG1l1lnh4mkgdA1Pu/Z/ZAuQ1924vpvwtNAv8\r\nXoiZows1yGU0Lbo7YQAJuMQatqQIyiflHTTJBHxLZsWolBWsCWfbEO4tdiIK\r\nJXliRw5HHo09zlFG3EBXBOOLdFmFJiX6fCzATNvv4CLq3URuPDDrc0nb5I8/\r\ndzIw+TpZomKxx2ExOa2hTu/bjRJ4gK1Um2hPoSzUVlb2nxzbveuj7x9WeMZK\r\noTDz2W2nz0Ntd/xt6s6axeJphR+4CW9WgMaHXIrLVYa4iY5ZO83EnXlRJZyx\r\n+fJs8Lxbqk9hv+EzIY1sS2ZPJipDFk1VHtLQMGdX2rjaEgq7LP7EywyRjHaV\r\nDcqNvdkE6Wh1idHVo41dudbnxRDS6zY6vW+1D/j+e/0OVpg9WDUqaVNYAM3y\r\n0FgSTJWXbo3Avv+UFSW/U3x+dolU+Zf4mHnRCSzi9Ps5k18gpC+CvT85PS1v\r\nkj788b2EQ7b1vTeSgT8neH670eVYZhJ7NnKqLifXiypV8NDaXZVkFr3J1Bzu\r\nQjfB4V5PrrAAnxOGKuKq74CC/bTUSpIqNEw=\r\n=pvzY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"ccc85a3abb9cab123d161d3ec4dfa3d76ea18bca","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.5","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.15.0","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","next":"12.2.5","eslint":"^8.22.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.8","ts-node":"^10.9.1","prettier":"^2.7.1","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/node":"^18.7.9","@trpc/client":"^9.27.1","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.0","@typescript-eslint/parser":"^5.33.1","@typescript-eslint/eslint-plugin":"^5.33.1","@trivago/prettier-plugin-sort-imports":"^3.3.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^9.23.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.6.0_1661177350616_0.1226417322441471","host":"s3://npm-registry-packages"}},"0.6.1":{"name":"trpc-openapi","version":"0.6.1","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.6.1","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"0fb64245b996b5d9e6f36b059999a5c9be279635","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.6.1.tgz","fileCount":75,"integrity":"sha512-KH2+GQQbUdSqgQx9gh6+1J6gT09HCY7Dxme9Q9CQwB98c4xA7vt7N01hUG1yAjXQe5tf4MMsXB7iuJmVHwhNdA==","signatures":[{"sig":"MEQCICi1H9Zf9M+PnD15vlusaz24vsc4KduiOOcr7wRXM5s4AiBKzxNu2JeXmugTBMFacybN8zgjJoFNGJLFcTxf2ATorw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":95931,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBARJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp6gw/8CeqwjQToqdT4qb6A9s/N7m3A1PdosoqR8u6jHZuudekvYcOa\r\n3EZl6M7GBI/F0XHRGV64sNvqfV91iVXatyWST77D/c9hIOrurxqopEgpBxKw\r\nxPmgmW2FIOPQnKReT7ekstycSeki1VICTrp4s7JWg40YdgkxsuYt3foOuiP9\r\nWumwJDG0fvaBrXZIO7kujYZAq8bUJQgOVtgCCDdBfdK0q5Qb9SIz9CP2Z4t6\r\nmODfzW/W8Hz9zlJYeC6LuTd5wmzbT66NdpavX7yqXq9wVV/gALIA1a4twxPa\r\nlYitXEFaxUHlNsJMVrzV02IlIgTuiw8tuoYrGQxxQnvRPGDiNx+ehFOvC8GG\r\nnIMFB3GIuMyc0tWUnHHMo8Kg4F4KsP1Y8AomMjg45tYNdbKTNxLLNExpV8Fn\r\nDq819wm+3KsQrCyl0xXWx9O4HO1Gze8cYRheNhffrzOZzeDmozxAoy0GqpV2\r\nnSWksWRCN5PEzbkFoc7dwa0Vy47BgYNjnoLe8s+Dqy+jmVKriNPc/E+FjJfL\r\ntR6/Z2vxs/1CaETlNgDHt7IEYY2rRzP+TmRqPdB5qDv+Bd21HgDGFB8SGA3Q\r\n1nvEZbNGcEbwG04RMHF4i27iF8bwFhMLg1F2JeunQp5TaeMFavBFWTSCsPhX\r\nIBiPGnwSp3RziJEUyC1kL/rXJBSRq/xpyQs=\r\n=FGP5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"9f6b061f23a2db3f48d906e86845e32715d53777","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.5","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.15.0","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","next":"12.2.5","eslint":"^8.22.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.8","ts-node":"^10.9.1","prettier":"^2.7.1","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/node":"^18.7.9","@trpc/client":"^9.27.1","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.0","@typescript-eslint/parser":"^5.33.1","@typescript-eslint/eslint-plugin":"^5.33.1","@trivago/prettier-plugin-sort-imports":"^3.3.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^9.23.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.6.1_1661207625729_0.09878656616443182","host":"s3://npm-registry-packages"}},"0.7.0":{"name":"trpc-openapi","version":"0.7.0","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@0.7.0","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"2819a39f80c394deb670dca13278b452d0d927cf","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-0.7.0.tgz","fileCount":75,"integrity":"sha512-QzUJMZ32HqPlk/d4Uax/uNAxZzFTuNz+Cm6QGwI/yphaXpQ7m28dVEMh7Akldy/jiEHaqcYjZl5ejWoTsfbRZw==","signatures":[{"sig":"MEYCIQCAtcuwiHdtRGQmZa40ePhwtjlurxCzecDUOoP0yN2+3AIhAI/1i5ytRIKNG7O1fqGQNcHQAjQ7So0kSqg6I1nw134F","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":96749,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjB19NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZng/+JuH3xFhoNfTRtr7gSnH3lBQTiFsLvvD+utw/7PzvQ7JUyk55\r\nATX0t6UPfHYLaKMSWyvyuopZOeyT3jl1bn4aoPhX06pcbAiphan08lYfrHUm\r\nv0MNeNScCl80ksPNtiDqQ+ZWvsB6Bw087QW+FfSFbkv+9QtwB3Knt31ZpGEH\r\nH2IJOJ1GKyRCeWH0lMr8dOIXaF+JsY2j+YcTsorcgHFYJpmOq6L6i83OHWQP\r\nWnX4BRFAhwKFrTnJLUwtzUNN+DneZlPGS/GYUthBLo4PwjMgq+7S9YK+P3V6\r\n62BTknI8iFLVAG+d2lql6kYutAWNIl6FziXfkiqyLWArdcX3jDdEwxzN65q7\r\nFBZUVXTUOjqGovXtAQ998DNmk1f8Gzsy2d+DoXhy2Z1bHVQoZESaBKZjasKb\r\nndL55WreuWSOo3gdwVgWP71e2z9JwBgz6832/4/Vq7vKr6sszK2VmPv/tTa6\r\n3e8n+Gxsi0l0VQ2jNqKUa1IrKWoaKyZiVaGora5EtQWXyjnCfP+tpgqrmZt0\r\nNtMoS4TUTZJJLF4FJAK4AtM9rBQJVvIrSL6NzV2DozbgitoxlzjtJO0pbfpi\r\nyQAuxLTYnePOAJiMJKwyM+rUyKroZnFTDxYTsWfEglSppJCRKUPVfuiQjw5q\r\nPtF8qY7Bx3Onvh5SKvQwJb9jYahmuTLes7A=\r\n=kuTB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"b1ef98d57041b9ab90fb2f0024ea8c1529612311","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.0","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.14.2","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","next":"12.2.5","eslint":"^8.22.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.8","ts-node":"^10.9.1","prettier":"^2.7.1","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.4","@types/jest":"^28.1.8","@types/node":"^18.7.13","@trpc/client":"^9.27.2","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.0","@typescript-eslint/parser":"^5.35.1","@typescript-eslint/eslint-plugin":"^5.35.1","@trivago/prettier-plugin-sort-imports":"^3.3.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^9.23.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_0.7.0_1661427533488_0.866810022513298","host":"s3://npm-registry-packages"}},"1.0.0-alpha.0":{"name":"trpc-openapi","version":"1.0.0-alpha.0","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@1.0.0-alpha.0","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"b64b330942d8d052cbe73df88656e80670cf3528","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-1.0.0-alpha.0.tgz","fileCount":75,"integrity":"sha512-HVSrxvhmh3zY2++FHnjTYZ0wbGpjv9J45h57nzZ626lLl8IKYn3zgtbYyEKX7anFRoE9ASypnb/ezLjWT18Rfg==","signatures":[{"sig":"MEUCIGrz6O1kToSOTiDEpvYcYQSdRHku0N1R/lqfWuKcs2I7AiEAzLYM+CPQlqUj8hPttVxQnm3r4qSPyVX6sgrnw8kzzK0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":95549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjB4AIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmogGQ//dAnFNsW/mL7RVHQF/1b9xLVH4MfITX7a2i4IAv5s0sudm/wm\r\n8Xb1KZ7fIzYWM+Kg0FGPOGvjZwYXyUKrJNSZY/kbH80yW7sFEcOtH4RFUABZ\r\nZixdEQQkqr+lOfSNPKRQTcj458FD/O1OCeQiAMWgvVB1Hl3Aqz4ZIz/fnLC3\r\nk/5IhAjLc3udkVe/pUH3NAJHAEHqkwJ/Vq8YbG1wuQbqnaawgd8qR0vfTjmp\r\n00k84arhx0BtU5DfvBYYNgGfIYJADkaAUpS2MUtviUOtbBDssY5obmyrMS39\r\nx4F1x9BwkK5ToMr6xw059IH8QKTm4JFDoNRAiaoz3hJumbMt8B2sa+eCcQvc\r\nKPvcRg4dTVMLl1DEaeoAtb27K1J2pnjLYuaL+MTh4T99aGM2UH0p/J700Hpj\r\ny1BUnABnNAafC436Kxhqhh+u0wMumy1Sx+f+0HOOdF6sKvdDoRgh1ekL2tbI\r\nw7TZ2cy41u7p65sLXnMRgRB219fFvtUJNPOQ2y/ok4360IgaTDtQVE3wjBT3\r\nXNkldUyXo4O0DFaW5QazFnvhH6eDhJ4y4ZrRUhUzXQj7WAD2VjdcE3wGVHub\r\nh8tQk2Z7l6CFW/7zxDl2HPhHEle85Z41/6arvcU7vKtaXyjYH0h3nPyOVutN\r\nzlFMLqfAiBATcf3YkvN9EnAiHnl932ONhoE=\r\n=zoT8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"![trpc-openapi](assets/trpc-openapi-readme.png)\n\n<div align=\"center\">\n  <h1>trpc-openapi</h1>\n  <a href=\"https://www.npmjs.com/package/trpc-openapi\"><img src=\"https://img.shields.io/npm/v/trpc-openapi.svg?style=flat&color=brightgreen\" target=\"_blank\" /></a>\n  <a href=\"./LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-black\" /></a>\n  <a href=\"https://trpc.io/discord\" target=\"_blank\"><img src=\"https://img.shields.io/badge/chat-discord-blue.svg\" /></a>\n  <br />\n  <hr />\n</div>\n\n## **[OpenAPI](https://swagger.io/specification/) support for [tRPC](https://trpc.io/)** 🧩\n\n- Easy REST endpoints for your tRPC procedures.\n- Perfect for incremental adoption.\n- OpenAPI version 3.0.3.\n\n## Usage\n\n**1. Install `trpc-openapi`.**\n\n```bash\n# npm\nnpm install trpc-openapi\n# yarn\nyarn add trpc-openapi\n```\n\n**2. Add `OpenApiMeta` to your tRPC router.**\n\n```typescript\nimport * as trpc from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\nexport const appRouter = trpc.router<any, OpenApiMeta /* 👈 */>();\n```\n\n**3. Enable `openapi` support for a procedure.**\n\n```typescript\nimport * as trpc from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\nexport const appRouter = trpc.router<any, OpenApiMeta>().query('sayHello', {\n  meta: { /* 👉 */ openapi: { method: 'GET', path: '/say-hello' } },\n  input: z.object({ name: z.string() }),\n  output: z.object({ greeting: z.string() }),\n  resolve: ({ input }) => {\n    return { greeting: `Hello ${input.name}!` };\n  },\n});\n```\n\n**4. Generate OpenAPI v3 document.**\n\n```typescript\nimport { generateOpenApiDocument } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\n/* 👇 */\nexport const openApiDocument = generateOpenApiDocument(appRouter, {\n  title: 'tRPC OpenAPI',\n  version: '1.0.0',\n  baseUrl: 'http://localhost:3000',\n});\n```\n\n**5. Add an `trpc-openapi` handler to your app.**\n\nWe currently support adapters for [`Express`](http://expressjs.com/), [`Next.js`](https://nextjs.org/) & [`node:http`](https://nodejs.org/api/http.html).\n\n[`Fastify`](https://www.fastify.io/) & [`Serverless`](https://www.serverless.com/) soon™, PRs are welcomed 🙌.\n\n```typescript\nimport http from 'http';\nimport { createOpenApiHttpHandler } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\nconst server = http.createServer(createOpenApiHttpHandler({ router: appRouter })); /* 👈 */\n\nserver.listen(3000);\n```\n\n**6. Profit 🤑**\n\n```typescript\n// client.ts\nconst res = await fetch('http://localhost:3000/say-hello?name=James', { method: 'GET' });\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n## Requirements\n\nPeer dependencies:\n\n- [`tRPC`](https://github.com/trpc/trpc) Server v9 (`@trpc/server@^9.23.0`) must be installed.\n- [`Zod`](https://github.com/colinhacks/zod) v3 (`zod@^3.14.4`) must be installed.\n\nFor a procedure to support OpenAPI the following _must_ be true:\n\n- Both `input` and `output` parsers are present AND use `Zod` validation.\n- Query `input` parsers extend `ZodObject<{ [string]: ZodString }>` or `ZodVoid`.\n- Mutation `input` parsers extend `ZodObject<{ [string]: ZodAnyType }>` or `ZodVoid`.\n- `meta.openapi.method` is `GET`, `POST`, `PATCH`, `PUT` or `DELETE`.\n- `meta.openapi.path` is a string starting with `/`.\n- `meta.openapi.path` parameters exist in `input` parser as `ZodString`\n\nPlease note:\n\n- Data [`transformers`](https://trpc.io/docs/data-transformers) are ignored.\n- Trailing slashes are ignored.\n- Routing is case-insensitive.\n\n## HTTP Requests\n\nProcedures with a `GET`/`DELETE` method will accept inputs via URL `query parameters`. Procedures with a `POST`/`PATCH`/`PUT` method will accept inputs via the `request body` with a `application/json` content type.\n\n### Path parameters\n\nA procedure can accept a set of inputs via URL path parameters. You can add a path parameter to any OpenAPI procedure by using curly brackets around an input name as a path segment in the `meta.openapi.path` field.\n\n#### Query parameters\n\nQuery & path parameter inputs are always accepted as a `string`, if you wish to support other primitives such as `number`, `boolean`, `Date` etc. please use [`z.preprocess()`](https://github.com/colinhacks/zod#preprocess).\n\n```typescript\n// Router\nexport const appRouter = trpc.router<Context, OpenApiMeta>().query('sayHello', {\n  meta: { openapi: { method: 'GET', path: '/say-hello/{name}' /* 👈 */ } },\n  input: z.object({ name: z.string() /* 👈 */, greeting: z.string() }),\n  output: z.object({ greeting: z.string() }),\n  resolve: ({ input }) => {\n    return { greeting: `${input.greeting} ${input.name}!` };\n  },\n});\n\n// Client\nconst res = await fetch('http://localhost:3000/say-hello/James?greeting=Hello' /* 👈 */, {\n  method: 'GET',\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n#### Request body\n\n```typescript\n// Router\nexport const appRouter = trpc.router<Context, OpenApiMeta>().mutation('sayHello', {\n  meta: { openapi: { method: 'POST', path: '/say-hello/{name}' /* 👈 */ } },\n  input: z.object({ name: z.string() /* 👈 */, greeting: z.string() }),\n  output: z.object({ greeting: z.string() }),\n  resolve: ({ input }) => {\n    return { greeting: `${input.greeting} ${input.name}!` };\n  },\n});\n\n// Client\nconst res = await fetch('http://localhost:3000/say-hello/James' /* 👈 */, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({ greeting: 'Hello' }),\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n### Custom headers\n\nAny custom headers can be specified in the `meta.openapi.headers` array, these headers will not be validated on request. Please consider using [Authorization](#authorization) for first-class OpenAPI auth/security support.\n\n## HTTP Responses\n\nStatus codes will be `200` by default for any successful requests. In the case of an error, the status code will be derived from the thrown `TRPCError` or fallback to `500`.\n\nYou can modify the status code or headers for any response using the `responseMeta` function.\n\nPlease see [error status codes here](src/adapters/node-http/errors.ts).\n\n```jsonc\n\"This is good\" /* Output from tRPC procedure */\n```\n\n```jsonc\n{\n  \"message\": \"This is bad\", /* Message from TRPCError */,\n  \"code\": \"BAD_REQUEST\", /* Code from TRPCError */\n  \"issues\": [...] /* (optional) ZodIssues[] from TRPCError */\n}\n```\n\n## Authorization\n\nTo create protected endpoints, add `protect: true` to the `meta.openapi` object of each tRPC procedure. You can then authenticate each request with the `createContext` function using the `Authorization` header with the `Bearer` scheme.\n\nExplore a [complete example here](examples/with-nextjs/src/server/router.ts).\n\n#### Server\n\n```typescript\nimport * as trpc from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\ntype User = { id: string; name: string };\n\nconst users: User[] = [\n  {\n    id: 'usr_123',\n    name: 'James',\n  },\n];\n\nexport type Context = { user: User | null };\n\nexport const createContext = async ({ req, res }): Promise<Context> => {\n  let user: User | null = null;\n  if (req.headers.authorization) {\n    const userId = req.headers.authorization.split(' ')[1];\n    user = users.find((_user) => _user.id === userId);\n  }\n  return { user };\n};\n\nexport const appRouter = trpc.router<Context, OpenApiMeta>().query('sayHello', {\n  meta: { openapi: { method: 'GET', path: '/say-hello', protect: true /* 👈 */ } },\n  input: z.void(), // no input expected\n  output: z.object({ greeting: z.string() }),\n  resolve: ({ input, ctx }) => {\n    if (!ctx.user) {\n      throw new trpc.TRPCError({ message: 'User not found', code: 'UNAUTHORIZED' });\n    }\n    return { greeting: `Hello ${ctx.user.name}!` };\n  },\n});\n```\n\n#### Client\n\n```typescript\nconst res = await fetch('http://localhost:3000/say-hello', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer usr_123' } /* 👈 */,\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n## Examples\n\n_For advanced use-cases, please find examples in our [complete test suite](test)._\n\n#### With Express\n\nPlease see [full example here](examples/with-express).\n\n```typescript\nimport { createExpressMiddleware } from '@trpc/server/adapters/express';\nimport express from 'express';\nimport { createOpenApiExpressMiddleware } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\nconst app = express();\n\napp.use('/api/trpc', createExpressMiddleware({ router: appRouter }));\napp.use('/api', createOpenApiExpressMiddleware({ router: appRouter })); /* 👈 */\n\napp.listen(3000);\n```\n\n#### With Next.js\n\nPlease see [full example here](examples/with-nextjs).\n\n```typescript\n// pages/api/[trpc].ts\nimport { createOpenApiNextHandler } from 'trpc-openapi';\n\nimport { appRouter } from '../../server/appRouter';\n\nexport default createOpenApiNextHandler({ router: appRouter });\n```\n\n## Types\n\n#### GenerateOpenApiDocumentOptions\n\nPlease see [full typings here](src/generator/index.ts).\n\n| Property      | Type       | Description                          | Required |\n| ------------- | ---------- | ------------------------------------ | -------- |\n| `title`       | `string`   | The title of the API.                | `true`   |\n| `description` | `string`   | A short description of the API.      | `false`  |\n| `version`     | `string`   | The version of the OpenAPI document. | `true`   |\n| `baseUrl`     | `string`   | The base URL of the target server.   | `true`   |\n| `docsUrl`     | `string`   | A URL to any external documentation. | `false`  |\n| `tags`        | `string[]` | A list for ordering endpoint groups. | `false`  |\n\n#### OpenApiMeta\n\nPlease see [full typings here](src/types.ts).\n\n| Property      | Type                | Description                                                                                                  | Required | Default     |\n| ------------- | ------------------- | ------------------------------------------------------------------------------------------------------------ | -------- | ----------- |\n| `enabled`     | `boolean`           | Exposes this procedure to `trpc-openapi` adapters and on the OpenAPI document.                               | `false`   | `true`     |\n| `method`      | `HttpMethod`        | HTTP method this endpoint is exposed on. Value can be `GET`, `POST`, `PATCH`, `PUT` or `DELETE`.             | `true`   | `undefined` |\n| `path`        | `string`            | Pathname this endpoint is exposed on. Value must start with `/`, specify path parameters using `{}`.         | `true`   | `undefined` |\n| `protect`     | `boolean`           | Requires this endpoint to use an `Authorization` header credential with `Bearer` scheme on OpenAPI document. | `false`  | `false`     |\n| `summary`     | `string`            | A short summary of the endpoint included in the OpenAPI document.                                            | `false`  | `undefined` |\n| `description` | `string`            | A verbose description of the endpoint included in the OpenAPI document.                                      | `false`  | `undefined` |\n| `tags`        | `string[]`          | A list of tags used for logical grouping of endpoints in the OpenAPI document.                               | `false`  | `undefined` |\n| `headers`     | `ParameterObject[]` | An array of custom headers to add for this endpoint in the OpenAPI document.                                 | `false`  | `undefined` |\n\n#### CreateOpenApiNodeHttpHandlerOptions\n\nPlease see [full typings here](src/adapters/node-http/core.ts).\n\n| Property        | Type       | Description                                            | Required |\n| --------------- | ---------- | ------------------------------------------------------ | -------- |\n| `router`        | `Router`   | Your application tRPC router.                          | `true`   |\n| `createContext` | `Function` | Passes contextual (`ctx`) data to procedure resolvers. | `false`  |\n| `responseMeta`  | `Function` | Returns any modifications to statusCode & headers.     | `false`  |\n| `onError`       | `Function` | Called if error occurs inside handler.                 | `false`  |\n| `teardown`      | `Function` | Called after each request is completed.                | `false`  |\n| `maxBodySize`   | `number`   | Maximum request body size in bytes (default: 100kb).   | `false`  |\n\n---\n\n## License\n\nDistributed under the MIT License. See LICENSE for more information.\n\n## Contact\n\nJames Berry - Follow me on Twitter [@jlalmes](https://twitter.com/jlalmes) 💚\n","gitHead":"41b3ee8bba658595336b897e05e91be076392fc5","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/*"],"_npmVersion":"8.5.0","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.14.2","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","next":"12.2.5","eslint":"^8.22.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.8","ts-node":"^10.9.1","prettier":"^2.7.1","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.7.4","@types/jest":"^28.1.8","@types/node":"^18.7.13","@trpc/client":"^9.27.2","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.0","@typescript-eslint/parser":"^5.35.1","@typescript-eslint/eslint-plugin":"^5.35.1","@trivago/prettier-plugin-sort-imports":"^3.3.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^9.23.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_1.0.0-alpha.0_1661435912018_0.07844818503431217","host":"s3://npm-registry-packages"}},"1.0.0-alpha.1":{"name":"trpc-openapi","version":"1.0.0-alpha.1","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@1.0.0-alpha.1","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"5068b02fea2d03147ab6d411aeb91e1e29dfe292","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-1.0.0-alpha.1.tgz","fileCount":75,"integrity":"sha512-qk0v9sdb6dBEjc0MO3PLJVChUqTncESaG4xBWEZm/68LDzKEj/KCwznMXt2vA/YM++1PXR1p0EhHeyEX+lHI5Q==","signatures":[{"sig":"MEQCICvfaIUWG6Ei2aeF3a6lLMq8dns3UNMX+LKMlo1R+zbVAiB9wm6g5JNFhiNlk/t5P3aOYP+Nu1Bh2vaYhuHt+mrBZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":95783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGbj5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/1w/+LcOt5nodT6sS7IvtUdNlTTpBMfIcOamzZZEmMn9LAjs/qzFZ\r\ne8QbFGyWLHksolCplAw5zb4/vFSs2FN0Bne9gQxF1+qmoJBC1BNk7DDUJVti\r\nmsu2ue5PPVZ/I4wgsD1lrjs5nzhqrV8au+CzeY6RNoXMBI9GJpf+oOJUE3qR\r\ncRZ+tOfSLDAyxHm8asY2B/72FFAsu50WaXopD1Skko6QoohZfH8dSPT+U4bb\r\nqAGhLQCVgEoIljP9Vm8VoIuSFjlitA2lNr3JJVrRPEPwJwqOWvZ8RJCipwWS\r\n8fB2QIs6Gm1+/hXUmmZsyJqHHsdkzLovG78+F/1b2b/KVohZHzGSZZHObaPv\r\nWE5rgdwrdM7O3qnIodbAZkFGheFDQtB52/UrH9/rWHo+2G4Bsva0DLAsS2nr\r\nY9uCTlLs4cJKB1KFLtJ7cHvY7k4Iniz/cegval/Cip0ZRFXMkVt58cot1Dwr\r\nPftjZI1nItLME7v6Ic63yIhztJRDpTNTTRJUa89NVki5/e8W2s9lzUoF0YKV\r\naJZpNKU3UyFkkAMAPQfv8VDQ+vDtUE3H1yJPeDHSftSnsUajz4PhlbHnukna\r\nNEEbGrLnYd/nK90xnrI0p4e4SH4ZjFUDZtFKepX0q2LNc2PzUzb7GMnzSC21\r\nqX0V+xUrqCyYzMfoBTb37sMl85rmLDm1/EA=\r\n=LSZM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"![trpc-openapi](assets/trpc-openapi-readme.png)\n\n<div align=\"center\">\n  <h1>trpc-openapi</h1>\n  <a href=\"https://www.npmjs.com/package/trpc-openapi\"><img src=\"https://img.shields.io/npm/v/trpc-openapi.svg?style=flat&color=brightgreen\" target=\"_blank\" /></a>\n  <a href=\"./LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-black\" /></a>\n  <a href=\"https://trpc.io/discord\" target=\"_blank\"><img src=\"https://img.shields.io/badge/chat-discord-blue.svg\" /></a>\n  <br />\n  <hr />\n</div>\n\n## **[OpenAPI](https://swagger.io/specification/) support for [tRPC](https://trpc.io/)** 🧩\n\n- Easy REST endpoints for your tRPC procedures.\n- Perfect for incremental adoption.\n- OpenAPI version 3.0.3.\n\n## Usage\n\n**1. Install `trpc-openapi`.**\n\n```bash\n# npm\nnpm install trpc-openapi@alpha\n# yarn\nyarn add trpc-openapi@alpha\n```\n\n**2. Add `OpenApiMeta` to your tRPC instance.**\n\n```typescript\nimport { initTRPC } from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\nconst t = initTRPC.meta<OpenApiMeta>().create(); /* 👈 */\n```\n\n**3. Enable `openapi` support for a procedure.**\n\n```typescript\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ /* 👉 */ openapi: { method: 'GET', path: '/say-hello' } })\n    .input(z.object({ name: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `Hello ${input.name}!` };\n    });\n});\n```\n\n**4. Generate an OpenAPI document.**\n\n```typescript\nimport { generateOpenApiDocument } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\n/* 👇 */\nexport const openApiDocument = generateOpenApiDocument(appRouter, {\n  title: 'tRPC OpenAPI',\n  version: '1.0.0',\n  baseUrl: 'http://localhost:3000',\n});\n```\n\n**5. Add an `trpc-openapi` handler to your app.**\n\nWe currently support adapters for [`Express`](http://expressjs.com/), [`Next.js`](https://nextjs.org/) & [`node:http`](https://nodejs.org/api/http.html).\n\n[`Fastify`](https://www.fastify.io/) & [`Serverless`](https://www.serverless.com/) soon™, PRs are welcomed 🙌.\n\n```typescript\nimport http from 'http';\nimport { createOpenApiHttpHandler } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\nconst server = http.createServer(createOpenApiHttpHandler({ router: appRouter })); /* 👈 */\n\nserver.listen(3000);\n```\n\n**6. Profit 🤑**\n\n```typescript\n// client.ts\nconst res = await fetch('http://localhost:3000/say-hello?name=James', { method: 'GET' });\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n## Requirements\n\nPeer dependencies:\n\n- [`tRPC`](https://github.com/trpc/trpc) Server v10 (`@trpc/server@^10.0.0-proxy-alpha.72`) must be installed.\n- [`Zod`](https://github.com/colinhacks/zod) v3 (`zod@^3.14.4`) must be installed.\n\nFor a procedure to support OpenAPI the following _must_ be true:\n\n- Both `input` and `output` parsers are present AND use `Zod` validation.\n- Query `input` parsers extend `ZodObject<{ [string]: ZodString }>` or `ZodVoid`.\n- Mutation `input` parsers extend `ZodObject<{ [string]: ZodAnyType }>` or `ZodVoid`.\n- `meta.openapi.method` is `GET`, `POST`, `PATCH`, `PUT` or `DELETE`.\n- `meta.openapi.path` is a string starting with `/`.\n- `meta.openapi.path` parameters exist in `input` parser as `ZodString`\n\nPlease note:\n\n- Data [`transformers`](https://trpc.io/docs/data-transformers) are ignored.\n- tRPC v9 `.interop()` routers are not supported.\n- Trailing slashes are ignored.\n- Routing is case-insensitive.\n\n## HTTP Requests\n\nProcedures with a `GET`/`DELETE` method will accept inputs via URL `query parameters`. Procedures with a `POST`/`PATCH`/`PUT` method will accept inputs via the `request body` with a `application/json` content type.\n\n### Path parameters\n\nA procedure can accept a set of inputs via URL path parameters. You can add a path parameter to any OpenAPI procedure by using curly brackets around an input name as a path segment in the `meta.openapi.path` field.\n\n#### Query parameters\n\nQuery & path parameter inputs are always accepted as a `string`, if you wish to support other primitives such as `number`, `boolean`, `Date` etc. please use [`z.preprocess()`](https://github.com/colinhacks/zod#preprocess).\n\n```typescript\n// Router\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'GET', path: '/say-hello/{name}' /* 👈 */ } })\n    .input(z.object({ name: z.string() /* 👈 */, greeting: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `${input.greeting} ${input.name}!` };\n    });\n});\n\n// Client\nconst res = await fetch('http://localhost:3000/say-hello/James?greeting=Hello' /* 👈 */, {\n  method: 'GET',\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n#### Request body\n\n```typescript\n// Router\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'POST', path: '/say-hello/{name}' /* 👈 */ } })\n    .input(z.object({ name: z.string() /* 👈 */, greeting: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .mutation(({ input }) => {\n      return { greeting: `${input.greeting} ${input.name}!` };\n    });\n});\n\n// Client\nconst res = await fetch('http://localhost:3000/say-hello/James' /* 👈 */, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({ greeting: 'Hello' }),\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n### Custom headers\n\nAny custom headers can be specified in the `meta.openapi.headers` array, these headers will not be validated on request. Please consider using [Authorization](#authorization) for first-class OpenAPI auth/security support.\n\n## HTTP Responses\n\nStatus codes will be `200` by default for any successful requests. In the case of an error, the status code will be derived from the thrown `TRPCError` or fallback to `500`.\n\nYou can modify the status code or headers for any response using the `responseMeta` function.\n\nPlease see [error status codes here](src/adapters/node-http/errors.ts).\n\n## Authorization\n\nTo create protected endpoints, add `protect: true` to the `meta.openapi` object of each tRPC procedure. You can then authenticate each request with the `createContext` function using the `Authorization` header with the `Bearer` scheme.\n\nExplore a [complete example here](examples/with-nextjs/src/server/router.ts).\n\n#### Server\n\n```typescript\nimport * as trpc from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\ntype User = { id: string; name: string };\n\nconst users: User[] = [\n  {\n    id: 'usr_123',\n    name: 'James',\n  },\n];\n\nexport type Context = { user: User | null };\n\nconst t = initTRPC.context<Context>().meta<OpenApiMeta>().create();\n\nexport const createContext = async ({ req, res }): Promise<Context> => {\n  let user: User | null = null;\n  if (req.headers.authorization) {\n    const userId = req.headers.authorization.split(' ')[1];\n    user = users.find((_user) => _user.id === userId);\n  }\n  return { user };\n};\n\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'GET', path: '/say-hello', protect: true /* 👈 */ } })\n    .input(z.void()) // no input expected\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input, ctx }) => {\n      if (!ctx.user) {\n        throw new trpc.TRPCError({ message: 'User not found', code: 'UNAUTHORIZED' });\n      }\n      return { greeting: `Hello ${ctx.user.name}!` };\n    }),\n});\n```\n\n#### Client\n\n```typescript\nconst res = await fetch('http://localhost:3000/say-hello', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer usr_123' } /* 👈 */,\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n## Examples\n\n_For advanced use-cases, please find examples in our [complete test suite](test)._\n\n#### With Express\n\nPlease see [full example here](examples/with-express).\n\n```typescript\nimport { createExpressMiddleware } from '@trpc/server/adapters/express';\nimport express from 'express';\nimport { createOpenApiExpressMiddleware } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\nconst app = express();\n\napp.use('/api/trpc', createExpressMiddleware({ router: appRouter }));\napp.use('/api', createOpenApiExpressMiddleware({ router: appRouter })); /* 👈 */\n\napp.listen(3000);\n```\n\n#### With Next.js\n\nPlease see [full example here](examples/with-nextjs).\n\n```typescript\n// pages/api/[...trpc].ts\nimport { createOpenApiNextHandler } from 'trpc-openapi';\n\nimport { appRouter } from '../../server/appRouter';\n\nexport default createOpenApiNextHandler({ router: appRouter });\n```\n\n## Types\n\n#### GenerateOpenApiDocumentOptions\n\nPlease see [full typings here](src/generator/index.ts).\n\n| Property      | Type       | Description                          | Required |\n| ------------- | ---------- | ------------------------------------ | -------- |\n| `title`       | `string`   | The title of the API.                | `true`   |\n| `description` | `string`   | A short description of the API.      | `false`  |\n| `version`     | `string`   | The version of the OpenAPI document. | `true`   |\n| `baseUrl`     | `string`   | The base URL of the target server.   | `true`   |\n| `docsUrl`     | `string`   | A URL to any external documentation. | `false`  |\n| `tags`        | `string[]` | A list for ordering endpoint groups. | `false`  |\n\n#### OpenApiMeta\n\nPlease see [full typings here](src/types.ts).\n\n| Property      | Type                | Description                                                                                                  | Required | Default     |\n| ------------- | ------------------- | ------------------------------------------------------------------------------------------------------------ | -------- | ----------- |\n| `enabled`     | `boolean`           | Exposes this procedure to `trpc-openapi` adapters and on the OpenAPI document.                               | `false`  | `true`      |\n| `method`      | `HttpMethod`        | HTTP method this endpoint is exposed on. Value can be `GET`, `POST`, `PATCH`, `PUT` or `DELETE`.             | `true`   | `undefined` |\n| `path`        | `string`            | Pathname this endpoint is exposed on. Value must start with `/`, specify path parameters using `{}`.         | `true`   | `undefined` |\n| `protect`     | `boolean`           | Requires this endpoint to use an `Authorization` header credential with `Bearer` scheme on OpenAPI document. | `false`  | `false`     |\n| `summary`     | `string`            | A short summary of the endpoint included in the OpenAPI document.                                            | `false`  | `undefined` |\n| `description` | `string`            | A verbose description of the endpoint included in the OpenAPI document.                                      | `false`  | `undefined` |\n| `tags`        | `string[]`          | A list of tags used for logical grouping of endpoints in the OpenAPI document.                               | `false`  | `undefined` |\n| `headers`     | `ParameterObject[]` | An array of custom headers to add for this endpoint in the OpenAPI document.                                 | `false`  | `undefined` |\n\n#### CreateOpenApiNodeHttpHandlerOptions\n\nPlease see [full typings here](src/adapters/node-http/core.ts).\n\n| Property        | Type       | Description                                            | Required |\n| --------------- | ---------- | ------------------------------------------------------ | -------- |\n| `router`        | `Router`   | Your application tRPC router.                          | `true`   |\n| `createContext` | `Function` | Passes contextual (`ctx`) data to procedure resolvers. | `false`  |\n| `responseMeta`  | `Function` | Returns any modifications to statusCode & headers.     | `false`  |\n| `onError`       | `Function` | Called if error occurs inside handler.                 | `false`  |\n| `maxBodySize`   | `number`   | Maximum request body size in bytes (default: 100kb).   | `false`  |\n\n---\n\n_Still using tRPC v9? See our [`v0`](https://github.com/jlalmes/trpc-openapi/tree/v0) branch._\n\n## License\n\nDistributed under the MIT License. See LICENSE for more information.\n\n## Contact\n\nJames Berry - Follow me on Twitter [@jlalmes](https://twitter.com/jlalmes) 💚\n","gitHead":"647db04abe246d296bcc00206fc964ff70cd1f99","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/with-nextjs","examples/with-express"],"_npmVersion":"8.5.0","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.14.2","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.2","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.17.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.2","next":"12.2.5","eslint":"^8.23.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^28.0.8","ts-node":"^10.9.1","prettier":"^2.7.1","superjson":"^1.9.1","node-fetch":"^2.6.7","typescript":"^4.8.2","@types/jest":"^29.0.0","@types/node":"^18.7.15","@trpc/client":"10.0.0-proxy-alpha.73","@types/co-body":"^6.1.0","@types/express":"^4.17.13","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.2","@typescript-eslint/parser":"^5.36.2","@typescript-eslint/eslint-plugin":"^5.36.2","@trivago/prettier-plugin-sort-imports":"^3.3.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^10.0.0-proxy-alpha.73"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_1.0.0-alpha.1_1662630136961_0.366489209195183","host":"s3://npm-registry-packages"}},"1.0.0-alpha.2":{"name":"trpc-openapi","version":"1.0.0-alpha.2","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@1.0.0-alpha.2","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"cfe6909a6f814ebf78ccc07af81408b444b4ed2d","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-1.0.0-alpha.2.tgz","fileCount":75,"integrity":"sha512-ug9A1wHuqQVy+P//JpRiXkiW1fxZbCUnmuu9fHbs5eysSvMMTozG16114W3A73Qg8u0CmJymgpSN0yh8k7gssA==","signatures":[{"sig":"MEYCIQDyq0GStlcUFWNIj9HsMZezNdTWYFUYbE3FbX2emtfmJwIhANJKxAFE5etmfIY84E3pEc+9rXqstXV/QE7+Cclmegnb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":96147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOvfkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoyZw/+OXWB4wIp2l1lRHpbKAMngD4EoXcWDrwKljmOO3xdPlfVaLbM\r\n9IsIErFio6/mmNS7HFVh47usjVlyoG5sEtBuvoAH0D378mWpMf9AKJkwlUol\r\nMQcsir7Ex0x6mBhK+yt5S+ct+0EZYdaHPGX8ly54I7xRFfgXwV0cmIPdI2eO\r\npKQr4si5+I//g74TPxvWbY2A08vDMSzwIClLHxaya0mGHhWUOWkrNFA+IDuY\r\n5X1o5kN007jygnBFDvJXNW2xw8BbVLQ5iCyPnlV97WnPR4IxvFgFOALEXXHB\r\nsjXCCcgM23hJ7MtHmZG6tUX375LBZfXqfh6MAktmWifRMmxVi/Jjq0z9dye/\r\na9thu84qC+mN85aytgrV91ldoRy0DAI7/WcAv0juMncJ+iSWhwXR/sKxxiEW\r\nVUwfrfJnwZ31+mr5EIeERYdaAO5xib9wFnhSDs46/uIxELATRDni4pOXOkzQ\r\nrgSoe1mUGRBrPccMgLkAXXVWYU77ouY5v7ICZNKlgTCjO3lCt090KY51oMUz\r\nJbmyiOHR4G40ONqkoe/SK4kjzvvuKeZHt2rt8pcS8S9lxmGM7c+3GG7Uq1Uk\r\nThnfJFb3nUetsozjk+7KsreyaADw5syRYopW1TFdQJOedBb8+wKkzpODng5M\r\nlRHSlSjlW4DjFUOG4a/RieEaRtkaResRzuM=\r\n=pp2s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"![trpc-openapi](assets/trpc-openapi-readme.png)\n\n<div align=\"center\">\n  <h1>trpc-openapi</h1>\n  <a href=\"https://www.npmjs.com/package/trpc-openapi\"><img src=\"https://img.shields.io/npm/v/trpc-openapi.svg?style=flat&color=brightgreen\" target=\"_blank\" /></a>\n  <a href=\"./LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-black\" /></a>\n  <a href=\"https://trpc.io/discord\" target=\"_blank\"><img src=\"https://img.shields.io/badge/chat-discord-blue.svg\" /></a>\n  <br />\n  <hr />\n</div>\n\n## **[OpenAPI](https://swagger.io/specification/) support for [tRPC](https://trpc.io/)** 🧩\n\n- Easy REST endpoints for your tRPC procedures.\n- Perfect for incremental adoption.\n- OpenAPI version 3.0.3.\n\n## Usage\n\n**1. Install `trpc-openapi`.**\n\n```bash\n# npm\nnpm install trpc-openapi@alpha\n# yarn\nyarn add trpc-openapi@alpha\n```\n\n**2. Add `OpenApiMeta` to your tRPC instance.**\n\n```typescript\nimport { initTRPC } from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\nconst t = initTRPC.meta<OpenApiMeta>().create(); /* 👈 */\n```\n\n**3. Enable `openapi` support for a procedure.**\n\n```typescript\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ /* 👉 */ openapi: { method: 'GET', path: '/say-hello' } })\n    .input(z.object({ name: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `Hello ${input.name}!` };\n    });\n});\n```\n\n**4. Generate an OpenAPI document.**\n\n```typescript\nimport { generateOpenApiDocument } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\n/* 👇 */\nexport const openApiDocument = generateOpenApiDocument(appRouter, {\n  title: 'tRPC OpenAPI',\n  version: '1.0.0',\n  baseUrl: 'http://localhost:3000',\n});\n```\n\n**5. Add an `trpc-openapi` handler to your app.**\n\nWe currently support adapters for [`Express`](http://expressjs.com/), [`Next.js`](https://nextjs.org/) & [`node:http`](https://nodejs.org/api/http.html).\n\n[`Fastify`](https://www.fastify.io/) & [`Serverless`](https://www.serverless.com/) soon™, PRs are welcomed 🙌.\n\n```typescript\nimport http from 'http';\nimport { createOpenApiHttpHandler } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\nconst server = http.createServer(createOpenApiHttpHandler({ router: appRouter })); /* 👈 */\n\nserver.listen(3000);\n```\n\n**6. Profit 🤑**\n\n```typescript\n// client.ts\nconst res = await fetch('http://localhost:3000/say-hello?name=James', { method: 'GET' });\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n## Requirements\n\nPeer dependencies:\n\n- [`tRPC`](https://github.com/trpc/trpc) Server v10 (`@trpc/server@next`) must be installed.\n- [`Zod`](https://github.com/colinhacks/zod) v3 (`zod@^3.14.4`) must be installed.\n\nFor a procedure to support OpenAPI the following _must_ be true:\n\n- Both `input` and `output` parsers are present AND use `Zod` validation.\n- Query `input` parsers extend `ZodObject<{ [string]: ZodString }>` or `ZodVoid`.\n- Mutation `input` parsers extend `ZodObject<{ [string]: ZodAnyType }>` or `ZodVoid`.\n- `meta.openapi.method` is `GET`, `POST`, `PATCH`, `PUT` or `DELETE`.\n- `meta.openapi.path` is a string starting with `/`.\n- `meta.openapi.path` parameters exist in `input` parser as `ZodString`\n\nPlease note:\n\n- Data [`transformers`](https://trpc.io/docs/data-transformers) are ignored.\n- tRPC v9 `.interop()` routers are not supported.\n- Trailing slashes are ignored.\n- Routing is case-insensitive.\n\n## HTTP Requests\n\nProcedures with a `GET`/`DELETE` method will accept inputs via URL `query parameters`. Procedures with a `POST`/`PATCH`/`PUT` method will accept inputs via the `request body` with a `application/json` content type.\n\n### Path parameters\n\nA procedure can accept a set of inputs via URL path parameters. You can add a path parameter to any OpenAPI procedure by using curly brackets around an input name as a path segment in the `meta.openapi.path` field.\n\n#### Query parameters\n\nQuery & path parameter inputs are always accepted as a `string`, if you wish to support other primitives such as `number`, `boolean`, `Date` etc. please use [`z.preprocess()`](https://github.com/colinhacks/zod#preprocess).\n\n```typescript\n// Router\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'GET', path: '/say-hello/{name}' /* 👈 */ } })\n    .input(z.object({ name: z.string() /* 👈 */, greeting: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `${input.greeting} ${input.name}!` };\n    });\n});\n\n// Client\nconst res = await fetch('http://localhost:3000/say-hello/James?greeting=Hello' /* 👈 */, {\n  method: 'GET',\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n#### Request body\n\n```typescript\n// Router\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'POST', path: '/say-hello/{name}' /* 👈 */ } })\n    .input(z.object({ name: z.string() /* 👈 */, greeting: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .mutation(({ input }) => {\n      return { greeting: `${input.greeting} ${input.name}!` };\n    });\n});\n\n// Client\nconst res = await fetch('http://localhost:3000/say-hello/James' /* 👈 */, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({ greeting: 'Hello' }),\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n### Custom headers\n\nAny custom headers can be specified in the `meta.openapi.headers` array, these headers will not be validated on request. Please consider using [Authorization](#authorization) for first-class OpenAPI auth/security support.\n\n## HTTP Responses\n\nStatus codes will be `200` by default for any successful requests. In the case of an error, the status code will be derived from the thrown `TRPCError` or fallback to `500`.\n\nYou can modify the status code or headers for any response using the `responseMeta` function.\n\nPlease see [error status codes here](src/adapters/node-http/errors.ts).\n\n## Authorization\n\nTo create protected endpoints, add `protect: true` to the `meta.openapi` object of each tRPC procedure. You can then authenticate each request with the `createContext` function using the `Authorization` header with the `Bearer` scheme.\n\nExplore a [complete example here](examples/with-nextjs/src/server/router.ts).\n\n#### Server\n\n```typescript\nimport * as trpc from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\ntype User = { id: string; name: string };\n\nconst users: User[] = [\n  {\n    id: 'usr_123',\n    name: 'James',\n  },\n];\n\nexport type Context = { user: User | null };\n\nconst t = initTRPC.context<Context>().meta<OpenApiMeta>().create();\n\nexport const createContext = async ({ req, res }): Promise<Context> => {\n  let user: User | null = null;\n  if (req.headers.authorization) {\n    const userId = req.headers.authorization.split(' ')[1];\n    user = users.find((_user) => _user.id === userId);\n  }\n  return { user };\n};\n\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'GET', path: '/say-hello', protect: true /* 👈 */ } })\n    .input(z.void()) // no input expected\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input, ctx }) => {\n      if (!ctx.user) {\n        throw new trpc.TRPCError({ message: 'User not found', code: 'UNAUTHORIZED' });\n      }\n      return { greeting: `Hello ${ctx.user.name}!` };\n    }),\n});\n```\n\n#### Client\n\n```typescript\nconst res = await fetch('http://localhost:3000/say-hello', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer usr_123' } /* 👈 */,\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n## Examples\n\n_For advanced use-cases, please find examples in our [complete test suite](test)._\n\n#### With Express\n\nPlease see [full example here](examples/with-express).\n\n```typescript\nimport { createExpressMiddleware } from '@trpc/server/adapters/express';\nimport express from 'express';\nimport { createOpenApiExpressMiddleware } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\nconst app = express();\n\napp.use('/api/trpc', createExpressMiddleware({ router: appRouter }));\napp.use('/api', createOpenApiExpressMiddleware({ router: appRouter })); /* 👈 */\n\napp.listen(3000);\n```\n\n#### With Next.js\n\nPlease see [full example here](examples/with-nextjs).\n\n```typescript\n// pages/api/[...trpc].ts\nimport { createOpenApiNextHandler } from 'trpc-openapi';\n\nimport { appRouter } from '../../server/appRouter';\n\nexport default createOpenApiNextHandler({ router: appRouter });\n```\n\n## Types\n\n#### GenerateOpenApiDocumentOptions\n\nPlease see [full typings here](src/generator/index.ts).\n\n| Property      | Type       | Description                          | Required |\n| ------------- | ---------- | ------------------------------------ | -------- |\n| `title`       | `string`   | The title of the API.                | `true`   |\n| `description` | `string`   | A short description of the API.      | `false`  |\n| `version`     | `string`   | The version of the OpenAPI document. | `true`   |\n| `baseUrl`     | `string`   | The base URL of the target server.   | `true`   |\n| `docsUrl`     | `string`   | A URL to any external documentation. | `false`  |\n| `tags`        | `string[]` | A list for ordering endpoint groups. | `false`  |\n\n#### OpenApiMeta\n\nPlease see [full typings here](src/types.ts).\n\n| Property      | Type                | Description                                                                                                  | Required | Default     |\n| ------------- | ------------------- | ------------------------------------------------------------------------------------------------------------ | -------- | ----------- |\n| `enabled`     | `boolean`           | Exposes this procedure to `trpc-openapi` adapters and on the OpenAPI document.                               | `false`  | `true`      |\n| `method`      | `HttpMethod`        | HTTP method this endpoint is exposed on. Value can be `GET`, `POST`, `PATCH`, `PUT` or `DELETE`.             | `true`   | `undefined` |\n| `path`        | `string`            | Pathname this endpoint is exposed on. Value must start with `/`, specify path parameters using `{}`.         | `true`   | `undefined` |\n| `protect`     | `boolean`           | Requires this endpoint to use an `Authorization` header credential with `Bearer` scheme on OpenAPI document. | `false`  | `false`     |\n| `summary`     | `string`            | A short summary of the endpoint included in the OpenAPI document.                                            | `false`  | `undefined` |\n| `description` | `string`            | A verbose description of the endpoint included in the OpenAPI document.                                      | `false`  | `undefined` |\n| `tags`        | `string[]`          | A list of tags used for logical grouping of endpoints in the OpenAPI document.                               | `false`  | `undefined` |\n| `headers`     | `ParameterObject[]` | An array of custom headers to add for this endpoint in the OpenAPI document.                                 | `false`  | `undefined` |\n\n#### CreateOpenApiNodeHttpHandlerOptions\n\nPlease see [full typings here](src/adapters/node-http/core.ts).\n\n| Property        | Type       | Description                                            | Required |\n| --------------- | ---------- | ------------------------------------------------------ | -------- |\n| `router`        | `Router`   | Your application tRPC router.                          | `true`   |\n| `createContext` | `Function` | Passes contextual (`ctx`) data to procedure resolvers. | `false`  |\n| `responseMeta`  | `Function` | Returns any modifications to statusCode & headers.     | `false`  |\n| `onError`       | `Function` | Called if error occurs inside handler.                 | `false`  |\n| `maxBodySize`   | `number`   | Maximum request body size in bytes (default: 100kb).   | `false`  |\n\n---\n\n_Still using tRPC v9? See our [`master`](https://github.com/jlalmes/trpc-openapi/tree/master) branch._\n\n## License\n\nDistributed under the MIT License. See LICENSE for more information.\n\n## Contact\n\nJames Berry - Follow me on Twitter [@jlalmes](https://twitter.com/jlalmes) 💚\n","gitHead":"9337571d13c290809525cbb8b49b6845525c67c2","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/with-nextjs","examples/with-express"],"_npmVersion":"8.19.2","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"18.10.0","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.2","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.18.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","next":"12.3.1","eslint":"^8.24.0","rimraf":"^3.0.2","express":"^4.18.1","ts-jest":"^29.0.3","ts-node":"^10.9.1","prettier":"^2.7.1","superjson":"^1.10.0","node-fetch":"^2.6.7","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/node":"^18.8.0","@trpc/client":"10.0.0-proxy-beta.13","@types/co-body":"^6.1.0","@types/express":"^4.17.14","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.2","@typescript-eslint/parser":"^5.38.1","@typescript-eslint/eslint-plugin":"^5.38.1","@trivago/prettier-plugin-sort-imports":"^3.3.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^10.0.0-proxy-beta.13"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_1.0.0-alpha.2_1664808931993_0.16219339643746378","host":"s3://npm-registry-packages"}},"1.0.0-alpha.3":{"name":"trpc-openapi","version":"1.0.0-alpha.3","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@1.0.0-alpha.3","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"bd2b9251436ec0c873714dc3317d4f5a6a961c9b","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-1.0.0-alpha.3.tgz","fileCount":79,"integrity":"sha512-3cdqTHlY6Y8nyMurdDQ0fAquIqIpDoDK7UcqNpYaZLBKXv8x5HjyrcCGZKPDqpVCtzIidq9td3bcxm4Z/9Mc+g==","signatures":[{"sig":"MEYCIQCz0jA05y2PIg2F1ed3fv/L2coxAdIojX76bg8BFoiAfgIhAM5Og4b23mNCGfZXexRgTVxHdMzhS0NXeuS9BE4xhKbS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSTgsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoA9xAAlOxp54dZLycun5IbO91wn6setVOjleAjJBskiNXip5stGCu5\r\nQ65jV7kXgE8KGkbysxpz1UragIrEuT1TelO5a7zF6SNfnZToKcbqS7sQOJ1J\r\nIahHd2T/azK1x3Rok67+8yKE6GIHDCU7D8R/wZKfXhmjRx2Q3EdJh2LRDy1e\r\n/VW3Mnb2Pg2RfvxGENOw0WjfwBEmL6UPUm+SBmDjWhh2V3H8WiYxxPns45m/\r\nQ/YM/PZ6yBYNge0d4p929ncWHJflN8Y0Z+A4UAJWfSqwpWaJFbcsDLP0kA/b\r\ndir9DFOI0QH5ssGONOXwea1ijjpcGoppcczKt0MKPZplnxN9/Kx+Dq35ivxo\r\nGIbwIhl5gjLoJqQif1LrkHXmPS1XC8HjZrIemHY7hKI1hbwN8pUwS8LUQpMI\r\n5kWnNi3Kgjfz/GkZS8HFNHMyC3tLAp+FZgV8D1bE2GwGJ1JwaChngHojbb6t\r\ntI7UZDNVtVLIoRy+j+PL7L0hEHf6WG4Q3sKYYZ4DI57lVYRndm1WpOHHqzQg\r\n5rZF2Qifvt7LhVgxNT0sbJy4GMEFiqecaTEARN4Dau7r5jaTYvu6n34rxmdp\r\n8dI+abHHr3lzZ38ARL5EUIuf6ZgBkmFM/no893+G4JthKepxg4aAJojXFfxJ\r\n/zm0G5IfdwuYUP4SqYSgAcQpVvbvZG9oJqE=\r\n=JBBc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"![trpc-openapi](assets/trpc-openapi-readme.png)\n\n<div align=\"center\">\n  <h1>trpc-openapi</h1>\n  <a href=\"https://www.npmjs.com/package/trpc-openapi\"><img src=\"https://img.shields.io/npm/v/trpc-openapi.svg?style=flat&color=brightgreen\" target=\"_blank\" /></a>\n  <a href=\"./LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-black\" /></a>\n  <a href=\"https://trpc.io/discord\" target=\"_blank\"><img src=\"https://img.shields.io/badge/chat-discord-blue.svg\" /></a>\n  <br />\n  <hr />\n</div>\n\n## **[OpenAPI](https://swagger.io/specification/) support for [tRPC](https://trpc.io/)** 🧩\n\n- Easy REST endpoints for your tRPC procedures.\n- Perfect for incremental adoption.\n- OpenAPI version 3.0.3.\n\n## Usage\n\n**1. Install `trpc-openapi`.**\n\n```bash\n# npm\nnpm install trpc-openapi@alpha\n# yarn\nyarn add trpc-openapi@alpha\n```\n\n**2. Add `OpenApiMeta` to your tRPC instance.**\n\n```typescript\nimport { initTRPC } from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\nconst t = initTRPC.meta<OpenApiMeta>().create(); /* 👈 */\n```\n\n**3. Enable `openapi` support for a procedure.**\n\n```typescript\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ /* 👉 */ openapi: { method: 'GET', path: '/say-hello' } })\n    .input(z.object({ name: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `Hello ${input.name}!` };\n    });\n});\n```\n\n**4. Generate an OpenAPI document.**\n\n```typescript\nimport { generateOpenApiDocument } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\n/* 👇 */\nexport const openApiDocument = generateOpenApiDocument(appRouter, {\n  title: 'tRPC OpenAPI',\n  version: '1.0.0',\n  baseUrl: 'http://localhost:3000',\n});\n```\n\n**5. Add an `trpc-openapi` handler to your app.**\n\nWe currently support adapters for [`Express`](http://expressjs.com/), [`Next.js`](https://nextjs.org/) & [`node:http`](https://nodejs.org/api/http.html).\n\n[`Fastify`](https://www.fastify.io/) & [`Serverless`](https://www.serverless.com/) soon™, PRs are welcomed 🙌.\n\n```typescript\nimport http from 'http';\nimport { createOpenApiHttpHandler } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\nconst server = http.createServer(createOpenApiHttpHandler({ router: appRouter })); /* 👈 */\n\nserver.listen(3000);\n```\n\n**6. Profit 🤑**\n\n```typescript\n// client.ts\nconst res = await fetch('http://localhost:3000/say-hello?name=James', { method: 'GET' });\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n## Requirements\n\nPeer dependencies:\n\n- [`tRPC`](https://github.com/trpc/trpc) Server v10 (`@trpc/server@next`) must be installed.\n- [`Zod`](https://github.com/colinhacks/zod) v3 (`zod@^3.14.4`) must be installed.\n\nFor a procedure to support OpenAPI the following _must_ be true:\n\n- Both `input` and `output` parsers are present AND use `Zod` validation.\n- Query `input` parsers extend `ZodObject<{ [string]: ZodString }>` or `ZodVoid`.\n- Mutation `input` parsers extend `ZodObject<{ [string]: ZodAnyType }>` or `ZodVoid`.\n- `meta.openapi.method` is `GET`, `POST`, `PATCH`, `PUT` or `DELETE`.\n- `meta.openapi.path` is a string starting with `/`.\n- `meta.openapi.path` parameters exist in `input` parser as `ZodString`\n\nPlease note:\n\n- Data [`transformers`](https://trpc.io/docs/data-transformers) are ignored.\n- tRPC v9 `.interop()` routers are not supported.\n- Trailing slashes are ignored.\n- Routing is case-insensitive.\n\n## HTTP Requests\n\nProcedures with a `GET`/`DELETE` method will accept inputs via URL `query parameters`. Procedures with a `POST`/`PATCH`/`PUT` method will accept inputs via the `request body` with a `application/json` content type.\n\n### Path parameters\n\nA procedure can accept a set of inputs via URL path parameters. You can add a path parameter to any OpenAPI procedure by using curly brackets around an input name as a path segment in the `meta.openapi.path` field.\n\n#### Query parameters\n\nQuery & path parameter inputs are always accepted as a `string`, if you wish to support other primitives such as `number`, `boolean`, `Date` etc. please use [`z.preprocess()`](https://github.com/colinhacks/zod#preprocess).\n\n```typescript\n// Router\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'GET', path: '/say-hello/{name}' /* 👈 */ } })\n    .input(z.object({ name: z.string() /* 👈 */, greeting: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `${input.greeting} ${input.name}!` };\n    });\n});\n\n// Client\nconst res = await fetch('http://localhost:3000/say-hello/James?greeting=Hello' /* 👈 */, {\n  method: 'GET',\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n#### Request body\n\n```typescript\n// Router\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'POST', path: '/say-hello/{name}' /* 👈 */ } })\n    .input(z.object({ name: z.string() /* 👈 */, greeting: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .mutation(({ input }) => {\n      return { greeting: `${input.greeting} ${input.name}!` };\n    });\n});\n\n// Client\nconst res = await fetch('http://localhost:3000/say-hello/James' /* 👈 */, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({ greeting: 'Hello' }),\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n### Custom headers\n\nAny custom headers can be specified in the `meta.openapi.headers` array, these headers will not be validated on request. Please consider using [Authorization](#authorization) for first-class OpenAPI auth/security support.\n\n## HTTP Responses\n\nStatus codes will be `200` by default for any successful requests. In the case of an error, the status code will be derived from the thrown `TRPCError` or fallback to `500`.\n\nYou can modify the status code or headers for any response using the `responseMeta` function.\n\nPlease see [error status codes here](src/adapters/node-http/errors.ts).\n\n## Authorization\n\nTo create protected endpoints, add `protect: true` to the `meta.openapi` object of each tRPC procedure. You can then authenticate each request with the `createContext` function using the `Authorization` header with the `Bearer` scheme.\n\nExplore a [complete example here](examples/with-nextjs/src/server/router.ts).\n\n#### Server\n\n```typescript\nimport * as trpc from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\ntype User = { id: string; name: string };\n\nconst users: User[] = [\n  {\n    id: 'usr_123',\n    name: 'James',\n  },\n];\n\nexport type Context = { user: User | null };\n\nconst t = initTRPC.context<Context>().meta<OpenApiMeta>().create();\n\nexport const createContext = async ({ req, res }): Promise<Context> => {\n  let user: User | null = null;\n  if (req.headers.authorization) {\n    const userId = req.headers.authorization.split(' ')[1];\n    user = users.find((_user) => _user.id === userId);\n  }\n  return { user };\n};\n\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'GET', path: '/say-hello', protect: true /* 👈 */ } })\n    .input(z.void()) // no input expected\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input, ctx }) => {\n      if (!ctx.user) {\n        throw new trpc.TRPCError({ message: 'User not found', code: 'UNAUTHORIZED' });\n      }\n      return { greeting: `Hello ${ctx.user.name}!` };\n    }),\n});\n```\n\n#### Client\n\n```typescript\nconst res = await fetch('http://localhost:3000/say-hello', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer usr_123' } /* 👈 */,\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n## Examples\n\n_For advanced use-cases, please find examples in our [complete test suite](test)._\n\n#### With Express\n\nPlease see [full example here](examples/with-express).\n\n```typescript\nimport { createExpressMiddleware } from '@trpc/server/adapters/express';\nimport express from 'express';\nimport { createOpenApiExpressMiddleware } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\nconst app = express();\n\napp.use('/api/trpc', createExpressMiddleware({ router: appRouter }));\napp.use('/api', createOpenApiExpressMiddleware({ router: appRouter })); /* 👈 */\n\napp.listen(3000);\n```\n\n#### With Next.js\n\nPlease see [full example here](examples/with-nextjs).\n\n```typescript\n// pages/api/[...trpc].ts\nimport { createOpenApiNextHandler } from 'trpc-openapi';\n\nimport { appRouter } from '../../server/appRouter';\n\nexport default createOpenApiNextHandler({ router: appRouter });\n```\n\n#### With AWS Lambda\n\nPlease see [full example here](examples/with-serverless).\n\n```typescript\nimport { createOpenApiAwsLambdaHandler } from 'trpc-openapi';\n\nimport { appRouter } from './appRouter';\n\nexport const openApi = createOpenApiAwsLambdaHandler({ router: appRouter });\n```\n\n## Types\n\n#### GenerateOpenApiDocumentOptions\n\nPlease see [full typings here](src/generator/index.ts).\n\n| Property      | Type       | Description                          | Required |\n| ------------- | ---------- | ------------------------------------ | -------- |\n| `title`       | `string`   | The title of the API.                | `true`   |\n| `description` | `string`   | A short description of the API.      | `false`  |\n| `version`     | `string`   | The version of the OpenAPI document. | `true`   |\n| `baseUrl`     | `string`   | The base URL of the target server.   | `true`   |\n| `docsUrl`     | `string`   | A URL to any external documentation. | `false`  |\n| `tags`        | `string[]` | A list for ordering endpoint groups. | `false`  |\n\n#### OpenApiMeta\n\nPlease see [full typings here](src/types.ts).\n\n| Property      | Type                | Description                                                                                                  | Required | Default     |\n| ------------- | ------------------- | ------------------------------------------------------------------------------------------------------------ | -------- | ----------- |\n| `enabled`     | `boolean`           | Exposes this procedure to `trpc-openapi` adapters and on the OpenAPI document.                               | `false`  | `true`      |\n| `method`      | `HttpMethod`        | HTTP method this endpoint is exposed on. Value can be `GET`, `POST`, `PATCH`, `PUT` or `DELETE`.             | `true`   | `undefined` |\n| `path`        | `string`            | Pathname this endpoint is exposed on. Value must start with `/`, specify path parameters using `{}`.         | `true`   | `undefined` |\n| `protect`     | `boolean`           | Requires this endpoint to use an `Authorization` header credential with `Bearer` scheme on OpenAPI document. | `false`  | `false`     |\n| `summary`     | `string`            | A short summary of the endpoint included in the OpenAPI document.                                            | `false`  | `undefined` |\n| `description` | `string`            | A verbose description of the endpoint included in the OpenAPI document.                                      | `false`  | `undefined` |\n| `tags`        | `string[]`          | A list of tags used for logical grouping of endpoints in the OpenAPI document.                               | `false`  | `undefined` |\n| `headers`     | `ParameterObject[]` | An array of custom headers to add for this endpoint in the OpenAPI document.                                 | `false`  | `undefined` |\n\n#### CreateOpenApiNodeHttpHandlerOptions\n\nPlease see [full typings here](src/adapters/node-http/core.ts).\n\n| Property        | Type       | Description                                            | Required |\n| --------------- | ---------- | ------------------------------------------------------ | -------- |\n| `router`        | `Router`   | Your application tRPC router.                          | `true`   |\n| `createContext` | `Function` | Passes contextual (`ctx`) data to procedure resolvers. | `false`  |\n| `responseMeta`  | `Function` | Returns any modifications to statusCode & headers.     | `false`  |\n| `onError`       | `Function` | Called if error occurs inside handler.                 | `false`  |\n| `maxBodySize`   | `number`   | Maximum request body size in bytes (default: 100kb).   | `false`  |\n\n---\n\n_Still using tRPC v9? See our [`master`](https://github.com/jlalmes/trpc-openapi/tree/master) branch._\n\n## License\n\nDistributed under the MIT License. See LICENSE for more information.\n\n## Contact\n\nJames Berry - Follow me on Twitter [@jlalmes](https://twitter.com/jlalmes) 💚\n","gitHead":"90c41df8d98ec669ab5069d140f4fdec13aad2b3","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/with-nextjs","examples/with-express","examples/with-interop","examples/with-serverless"],"_npmVersion":"8.5.5","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.15.0","dependencies":{"co-body":"6.1.0","openapi-types":"12.0.2","node-mocks-http":"^1.11.0","lodash.clonedeep":"4.5.0","zod-to-json-schema":"3.18.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","next":"12.3.1","eslint":"^8.25.0","rimraf":"^3.0.2","express":"^4.18.2","ts-jest":"^29.0.3","ts-node":"^10.9.1","prettier":"^2.7.1","superjson":"^1.10.1","aws-lambda":"^1.0.7","node-fetch":"^2.6.7","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/node":"^18.8.4","@trpc/client":"10.0.0-proxy-beta.18","@types/co-body":"^6.1.0","@types/express":"^4.17.14","@types/aws-lambda":"^8.10.107","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.0.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.2","@typescript-eslint/parser":"^5.40.0","@typescript-eslint/eslint-plugin":"^5.40.0","@trivago/prettier-plugin-sort-imports":"^3.3.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^10.0.0-proxy-beta.18"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_1.0.0-alpha.3_1665742892114_0.5505488681593322","host":"s3://npm-registry-packages"}},"1.0.0-alpha.4":{"name":"trpc-openapi","version":"1.0.0-alpha.4","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@1.0.0-alpha.4","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"ea43c5ba46f4e3dde4d4ece066fc880894d6c965","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-1.0.0-alpha.4.tgz","fileCount":79,"integrity":"sha512-Zt+IUlYY/pw3Kk78ByTCOZb47r8zJFBUqr1imiOzyVjpaUMVMSPA2RpATCiOJQGSvR70YqoZAMPAu+KPoDmh2w==","signatures":[{"sig":"MEUCIF/WTgmxHl3gF7gOgSmxYcURJeC2cfQQfL1fn3mVHBBbAiEAwcm53KZryqHlP8aqhnL+IzkOrEYCBAlzY+tdyM5qhHo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106730,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJja+cWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr62Q/+Iz86ldFn9FuKk190ElujzucT7DElDZtANj44HDpmzRY3/WO1\r\nl4HqsQMTNKJ8lEJnyy86oBpfrmSroQN9YQjvVusKVJwH0WX9Y6wM4gdyhZUJ\r\n+Ygz5T8UzIUXsCkcnaQrHzwrgSv8W6C11BGz2YZmpQTm9l10eKGmFEdnjc8w\r\nKs2XU47xTFWE9jpN2BglyayBzHwDbbaG1TyQdej6CLsGJNc4z92eIAgJABmk\r\nS4a52JSVakM4CCMeL/2CcHmgk1JyhxwLChl/IEN29iZbFTJiX9DNj1EjNF80\r\n77OymmakV5Zd+VHE2XnMgBkSrvefxeYSNlpzfr5l2+V9JHMksGoDHGrgpjjg\r\nWtdSeUAsNM1A+Rd6NxyAARgquUl3IzkgVlfcyyJEVGuFR6IuNZLty5daU6YV\r\nxMijnK77wHfJF1J1xOiwmI+TZ3Db/CphNcclv34rVbyUAGWavJvsYF6hAeMw\r\n0EgTX9jWQt/KnTRPPjajctzruNoYTmajU3LvpWPpnXXnkdHKLAflq1vSm7WU\r\nxXAeav9ib4I1mwLS78g3tkqXaWhJS8WQTHlbULHzG2d8ve8+RfHhw0UF0ykh\r\nKuHhXrdaq0MEDtkbRU+C+Hhiywp5Qz60rS40PL2lx2yPlNvBydsNPuolzeMY\r\nqX3mB+tqUrW3L6czFewoihErazDE2wHw3o8=\r\n=u9f0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"![trpc-openapi](assets/trpc-openapi-readme.png)\n\n<div align=\"center\">\n  <h1>trpc-openapi</h1>\n  <a href=\"https://www.npmjs.com/package/trpc-openapi\"><img src=\"https://img.shields.io/npm/v/trpc-openapi.svg?style=flat&color=brightgreen\" target=\"_blank\" /></a>\n  <a href=\"./LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-black\" /></a>\n  <a href=\"https://trpc.io/discord\" target=\"_blank\"><img src=\"https://img.shields.io/badge/chat-discord-blue.svg\" /></a>\n  <br />\n  <hr />\n</div>\n\n## **[OpenAPI](https://swagger.io/specification/) support for [tRPC](https://trpc.io/)** 🧩\n\n- Easy REST endpoints for your tRPC procedures.\n- Perfect for incremental adoption.\n- OpenAPI version 3.0.3.\n\n## Usage\n\n**1. Install `trpc-openapi`.**\n\n```bash\n# npm\nnpm install trpc-openapi@alpha\n# yarn\nyarn add trpc-openapi@alpha\n```\n\n**2. Add `OpenApiMeta` to your tRPC instance.**\n\n```typescript\nimport { initTRPC } from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\nconst t = initTRPC.meta<OpenApiMeta>().create(); /* 👈 */\n```\n\n**3. Enable `openapi` support for a procedure.**\n\n```typescript\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ /* 👉 */ openapi: { method: 'GET', path: '/say-hello' } })\n    .input(z.object({ name: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `Hello ${input.name}!` };\n    });\n});\n```\n\n**4. Generate an OpenAPI document.**\n\n```typescript\nimport { generateOpenApiDocument } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\n/* 👇 */\nexport const openApiDocument = generateOpenApiDocument(appRouter, {\n  title: 'tRPC OpenAPI',\n  version: '1.0.0',\n  baseUrl: 'http://localhost:3000',\n});\n```\n\n**5. Add an `trpc-openapi` handler to your app.**\n\nWe currently support adapters for [`Express`](http://expressjs.com/), [`Next.js`](https://nextjs.org/) & [`node:http`](https://nodejs.org/api/http.html).\n\n[`Fastify`](https://www.fastify.io/) & [`Serverless`](https://www.serverless.com/) soon™, PRs are welcomed 🙌.\n\n```typescript\nimport http from 'http';\nimport { createOpenApiHttpHandler } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\nconst server = http.createServer(createOpenApiHttpHandler({ router: appRouter })); /* 👈 */\n\nserver.listen(3000);\n```\n\n**6. Profit 🤑**\n\n```typescript\n// client.ts\nconst res = await fetch('http://localhost:3000/say-hello?name=James', { method: 'GET' });\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n## Requirements\n\nPeer dependencies:\n\n- [`tRPC`](https://github.com/trpc/trpc) Server v10 (`@trpc/server@next`) must be installed.\n- [`Zod`](https://github.com/colinhacks/zod) v3 (`zod@^3.14.4`) must be installed.\n\nFor a procedure to support OpenAPI the following _must_ be true:\n\n- Both `input` and `output` parsers are present AND use `Zod` validation.\n- Query `input` parsers extend `ZodObject<{ [string]: ZodString }>` or `ZodVoid`.\n- Mutation `input` parsers extend `ZodObject<{ [string]: ZodAnyType }>` or `ZodVoid`.\n- `meta.openapi.method` is `GET`, `POST`, `PATCH`, `PUT` or `DELETE`.\n- `meta.openapi.path` is a string starting with `/`.\n- `meta.openapi.path` parameters exist in `input` parser as `ZodString`\n\nPlease note:\n\n- Data [`transformers`](https://trpc.io/docs/data-transformers) are ignored.\n- tRPC v9 `.interop()` routers are not supported.\n- Trailing slashes are ignored.\n- Routing is case-insensitive.\n\n## HTTP Requests\n\nProcedures with a `GET`/`DELETE` method will accept inputs via URL `query parameters`. Procedures with a `POST`/`PATCH`/`PUT` method will accept inputs via the `request body` with a `application/json` content type.\n\n### Path parameters\n\nA procedure can accept a set of inputs via URL path parameters. You can add a path parameter to any OpenAPI procedure by using curly brackets around an input name as a path segment in the `meta.openapi.path` field.\n\n#### Query parameters\n\nQuery & path parameter inputs are always accepted as a `string`, if you wish to support other primitives such as `number`, `boolean`, `Date` etc. please use [`z.preprocess()`](https://github.com/colinhacks/zod#preprocess).\n\n```typescript\n// Router\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'GET', path: '/say-hello/{name}' /* 👈 */ } })\n    .input(z.object({ name: z.string() /* 👈 */, greeting: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `${input.greeting} ${input.name}!` };\n    });\n});\n\n// Client\nconst res = await fetch('http://localhost:3000/say-hello/James?greeting=Hello' /* 👈 */, {\n  method: 'GET',\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n#### Request body\n\n```typescript\n// Router\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'POST', path: '/say-hello/{name}' /* 👈 */ } })\n    .input(z.object({ name: z.string() /* 👈 */, greeting: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .mutation(({ input }) => {\n      return { greeting: `${input.greeting} ${input.name}!` };\n    });\n});\n\n// Client\nconst res = await fetch('http://localhost:3000/say-hello/James' /* 👈 */, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({ greeting: 'Hello' }),\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n### Custom headers\n\nAny custom headers can be specified in the `meta.openapi.headers` array, these headers will not be validated on request. Please consider using [Authorization](#authorization) for first-class OpenAPI auth/security support.\n\n## HTTP Responses\n\nStatus codes will be `200` by default for any successful requests. In the case of an error, the status code will be derived from the thrown `TRPCError` or fallback to `500`.\n\nYou can modify the status code or headers for any response using the `responseMeta` function.\n\nPlease see [error status codes here](src/adapters/node-http/errors.ts).\n\n## Authorization\n\nTo create protected endpoints, add `protect: true` to the `meta.openapi` object of each tRPC procedure. You can then authenticate each request with the `createContext` function using the `Authorization` header with the `Bearer` scheme.\n\nExplore a [complete example here](examples/with-nextjs/src/server/router.ts).\n\n#### Server\n\n```typescript\nimport * as trpc from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\ntype User = { id: string; name: string };\n\nconst users: User[] = [\n  {\n    id: 'usr_123',\n    name: 'James',\n  },\n];\n\nexport type Context = { user: User | null };\n\nconst t = initTRPC.context<Context>().meta<OpenApiMeta>().create();\n\nexport const createContext = async ({ req, res }): Promise<Context> => {\n  let user: User | null = null;\n  if (req.headers.authorization) {\n    const userId = req.headers.authorization.split(' ')[1];\n    user = users.find((_user) => _user.id === userId);\n  }\n  return { user };\n};\n\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'GET', path: '/say-hello', protect: true /* 👈 */ } })\n    .input(z.void()) // no input expected\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input, ctx }) => {\n      if (!ctx.user) {\n        throw new trpc.TRPCError({ message: 'User not found', code: 'UNAUTHORIZED' });\n      }\n      return { greeting: `Hello ${ctx.user.name}!` };\n    }),\n});\n```\n\n#### Client\n\n```typescript\nconst res = await fetch('http://localhost:3000/say-hello', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer usr_123' } /* 👈 */,\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n## Examples\n\n_For advanced use-cases, please find examples in our [complete test suite](test)._\n\n#### With Express\n\nPlease see [full example here](examples/with-express).\n\n```typescript\nimport { createExpressMiddleware } from '@trpc/server/adapters/express';\nimport express from 'express';\nimport { createOpenApiExpressMiddleware } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\nconst app = express();\n\napp.use('/api/trpc', createExpressMiddleware({ router: appRouter }));\napp.use('/api', createOpenApiExpressMiddleware({ router: appRouter })); /* 👈 */\n\napp.listen(3000);\n```\n\n#### With Next.js\n\nPlease see [full example here](examples/with-nextjs).\n\n```typescript\n// pages/api/[...trpc].ts\nimport { createOpenApiNextHandler } from 'trpc-openapi';\n\nimport { appRouter } from '../../server/appRouter';\n\nexport default createOpenApiNextHandler({ router: appRouter });\n```\n\n#### With AWS Lambda\n\nPlease see [full example here](examples/with-serverless).\n\n```typescript\nimport { createOpenApiAwsLambdaHandler } from 'trpc-openapi';\n\nimport { appRouter } from './appRouter';\n\nexport const openApi = createOpenApiAwsLambdaHandler({ router: appRouter });\n```\n\n## Types\n\n#### GenerateOpenApiDocumentOptions\n\nPlease see [full typings here](src/generator/index.ts).\n\n| Property      | Type       | Description                          | Required |\n| ------------- | ---------- | ------------------------------------ | -------- |\n| `title`       | `string`   | The title of the API.                | `true`   |\n| `description` | `string`   | A short description of the API.      | `false`  |\n| `version`     | `string`   | The version of the OpenAPI document. | `true`   |\n| `baseUrl`     | `string`   | The base URL of the target server.   | `true`   |\n| `docsUrl`     | `string`   | A URL to any external documentation. | `false`  |\n| `tags`        | `string[]` | A list for ordering endpoint groups. | `false`  |\n\n#### OpenApiMeta\n\nPlease see [full typings here](src/types.ts).\n\n| Property      | Type                | Description                                                                                                  | Required | Default     |\n| ------------- | ------------------- | ------------------------------------------------------------------------------------------------------------ | -------- | ----------- |\n| `enabled`     | `boolean`           | Exposes this procedure to `trpc-openapi` adapters and on the OpenAPI document.                               | `false`  | `true`      |\n| `method`      | `HttpMethod`        | HTTP method this endpoint is exposed on. Value can be `GET`, `POST`, `PATCH`, `PUT` or `DELETE`.             | `true`   | `undefined` |\n| `path`        | `string`            | Pathname this endpoint is exposed on. Value must start with `/`, specify path parameters using `{}`.         | `true`   | `undefined` |\n| `protect`     | `boolean`           | Requires this endpoint to use an `Authorization` header credential with `Bearer` scheme on OpenAPI document. | `false`  | `false`     |\n| `summary`     | `string`            | A short summary of the endpoint included in the OpenAPI document.                                            | `false`  | `undefined` |\n| `description` | `string`            | A verbose description of the endpoint included in the OpenAPI document.                                      | `false`  | `undefined` |\n| `tags`        | `string[]`          | A list of tags used for logical grouping of endpoints in the OpenAPI document.                               | `false`  | `undefined` |\n| `headers`     | `ParameterObject[]` | An array of custom headers to add for this endpoint in the OpenAPI document.                                 | `false`  | `undefined` |\n\n#### CreateOpenApiNodeHttpHandlerOptions\n\nPlease see [full typings here](src/adapters/node-http/core.ts).\n\n| Property        | Type       | Description                                            | Required |\n| --------------- | ---------- | ------------------------------------------------------ | -------- |\n| `router`        | `Router`   | Your application tRPC router.                          | `true`   |\n| `createContext` | `Function` | Passes contextual (`ctx`) data to procedure resolvers. | `false`  |\n| `responseMeta`  | `Function` | Returns any modifications to statusCode & headers.     | `false`  |\n| `onError`       | `Function` | Called if error occurs inside handler.                 | `false`  |\n| `maxBodySize`   | `number`   | Maximum request body size in bytes (default: 100kb).   | `false`  |\n\n---\n\n_Still using tRPC v9? See our [`master`](https://github.com/jlalmes/trpc-openapi/tree/master) branch._\n\n## License\n\nDistributed under the MIT License. See LICENSE for more information.\n\n## Contact\n\nJames Berry - Follow me on Twitter [@jlalmes](https://twitter.com/jlalmes) 💚\n","gitHead":"ae0190f195d8e03def7e4febfb9726b9a517c368","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/with-nextjs","examples/with-express","examples/with-interop","examples/with-serverless"],"_npmVersion":"8.5.5","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.15.0","dependencies":{"co-body":"^6.1.0","openapi-types":"^12.0.2","node-mocks-http":"^1.11.0","lodash.clonedeep":"^4.5.0","zod-to-json-schema":"^3.18.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","next":"^13.0.2","eslint":"^8.27.0","rimraf":"^3.0.2","express":"^4.18.2","ts-jest":"^29.0.3","ts-node":"^10.9.1","prettier":"^2.7.1","superjson":"^1.11.0","aws-lambda":"^1.0.7","node-fetch":"^2.6.7","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/node":"^18.11.9","@trpc/client":"^10.0.0-rc.7","@types/co-body":"^6.1.0","@types/express":"^4.17.14","@types/aws-lambda":"^8.10.108","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.1.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.2","@typescript-eslint/parser":"^5.42.1","@typescript-eslint/eslint-plugin":"^5.42.1","@trivago/prettier-plugin-sort-imports":"^3.4.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^10.0.0-rc.7"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_1.0.0-alpha.4_1668015894042_0.6230563367809838","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"trpc-openapi","version":"1.0.0","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@1.0.0","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"ecb100b277cba19ba4bf490ab7b9e327142b5ce4","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-1.0.0.tgz","fileCount":79,"integrity":"sha512-JpvY/gwHBbeyn84QpRA/LgDG8m/9qrqSP2DRS7TBdHU6IggK6cJzOa1au8rXU828GUPtnicqbRpI4uJ/4rDiQA==","signatures":[{"sig":"MEUCIGtFfZ5jUAXeuSqFOgIqvUfggubKdRbjHg6iSRjQSuSiAiEA4jJ8YHy6WYBBl4B29yz/ryUQG61zOiHLPAxdPk4xr2Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjg2loACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmptSQ//Vk1DO5+UpH61LLEoV0kRI6igrRavpqT/Rf36hNpMGO0oBpSv\r\nbyARoprjC1fjUK0DYyoI6tcB+wlQUYdESB2OHGePVDhYYoXwP8j8oZgqRW4d\r\nblgtkTULknSKdKGQOgigOWfbKORiPmFTwi/9+1HqmJkdzdQNk+V5thtZlEFA\r\n4HGtJb1AE3+Stz3Zzlga2MHTv2Up/xvTGX7xfjm0n/sGaShO+mfI2kltrIJJ\r\nX1fm8ElYZRXnse6iIie2UtU4RqqY9z5MxIwnCsdR+JDdp3AJ91lJLMLT/37W\r\nT7s6QxnPIAovl9HB6+QlFO7jNSEYbuo80wisNfYb1ri+X0bDnWsAZoutWk3T\r\nrVkmMShJjhywe/sYDtZj4mrwizj41ex1Qv4NgCX9Wyl2BxOd+yFVfESqgOhO\r\n6SnQBAU2SK2y2GUVQPjW511kwKJP5s9Q/wb6pyo/q3l+kq0P4CCNtzRggTBN\r\nk1R3KASN67FT+xb/F4FAxIg8y2Nr5SgdTG+Ke2LK56/NMioqx4Em7DuX8yyP\r\n7O9P87Pwfq05zK619re2SIC9I46QkzcHZcXVUj0npF2BGs6kPLf8tlU+DIgJ\r\nuk4TYSpMaa5ZFfR0JfrGRc0jtznKd7TIChN6eYfOl4hygp/ug3hOHd0hUudP\r\n7r3auwxuNaZs0TRC6kNpYOE1Dbzlk5mcWyQ=\r\n=El1B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"a2842b425ec728623d11654bf04726bdb1c682a5","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/with-nextjs","examples/with-express","examples/with-interop","examples/with-serverless"],"_npmVersion":"8.5.5","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"16.15.0","dependencies":{"co-body":"^6.1.0","openapi-types":"^12.0.2","node-mocks-http":"^1.12.1","lodash.clonedeep":"^4.5.0","zod-to-json-schema":"^3.19.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","next":"^13.0.5","eslint":"^8.28.0","rimraf":"^3.0.2","express":"^4.18.2","ts-jest":"^29.0.3","ts-node":"^10.9.1","prettier":"^2.8.0","superjson":"^1.11.0","aws-lambda":"^1.0.7","node-fetch":"^2.6.7","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.9","@trpc/client":"^10.3.0","@types/co-body":"^6.1.0","@types/express":"^4.17.14","@types/aws-lambda":"^8.10.109","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.1.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.0.2","@typescript-eslint/parser":"^5.44.0","@typescript-eslint/eslint-plugin":"^5.44.0","@trivago/prettier-plugin-sort-imports":"^4.0.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_1.0.0_1669556584736_0.7262825200208689","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"trpc-openapi","version":"1.1.0","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@1.1.0","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"ff0125564df077756343dc52976bd07902790c30","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-1.1.0.tgz","fileCount":75,"integrity":"sha512-7hR8Rz4KCVnWxVn7Ug6bItvURoMUdjFr+G3zOPi6kJZKy6i2c6nA1nAvi6w5jYVewimZmVHyPcGU200XrNsPsw==","signatures":[{"sig":"MEUCIQD1E6Tiv5br9aGKlXC0UytEwupOcRjLGyU4Vg2kgVUhfQIgAf/w/rru/ThajIvAWxD3ffgWwYW4kI1ZUKDd8YXRH3E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjs3A8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLOA/9F49NmuK5HNb4qH/hKX/wmuvbfwu/gRYNRgF75f3VfXCV3NP5\r\nMB/m9k4Gi69h5JvvIrDAhc4wNIQicen9ARIp+zqnqLElUNIudGxM/RAET6sF\r\nL1I9Yhpx/Fa4eEkt+2PRn+43hqUMB+j25Us/i/0Gfpbb/bs1W752G5zU9FVN\r\nfjj5kwYptoqmW2bZuanvpCSOuHhB6vyvvatJUTZ5imYPOodeqDLnCiykUJBE\r\n1cKoVAHvFFJ/oCc6VgWAxbOks2aab9tnRrphutDywlQ7EQQmLCFx6F7tLz99\r\nB7MQs01FHl8ZPLhwfBhBA7vEX4NnjNfG8jucNOOSEyI8HXw2FjzILvNqhk+/\r\n6nSx1HpAw6DdFoR1WkJO6HT9y7bEZw8RVT7oWfe7nCSwo6svMw19Wgi/BcaS\r\n4F2RjAo22RZKUEBXZBMSVac1AQN6cfOMKujwS2syzBQEfXGS5IDEyEOUzHzK\r\nlvuFQkMYvBztbazEyIc75bSs0XLjzeWEZ7i+2I2QFeGyCNpJyevEpMxGYMiW\r\nOkLRBLlHmLGXursktB03dQaalqubUNswoXQMnmkiteMoB45EMm158VQQ4EtS\r\nKoDfq2KGR0mZ9RNdhFb6jY5Hx3y/MqQ4K8VJjnXhdJ8tsPHRj7JTKk+VPAYh\r\nbjB6M9EITuVRrhMwMKpouk3IUVbNX3LH93c=\r\n=7Uwb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"49adf9d67542b9d6c0737bcf5798a894d0e64ac5","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/with-nextjs","examples/with-express","examples/with-interop","examples/with-serverless"],"_npmVersion":"8.19.2","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"18.12.1","dependencies":{"co-body":"^6.1.0","openapi-types":"^12.1.0","node-mocks-http":"^1.12.1","lodash.clonedeep":"^4.5.0","zod-to-json-schema":"^3.20.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","next":"^13.1.1","eslint":"^8.31.0","rimraf":"^3.0.2","express":"^4.18.2","ts-jest":"^29.0.3","ts-node":"^10.9.1","prettier":"^2.8.1","superjson":"^1.12.1","aws-lambda":"^1.0.7","node-fetch":"^2.6.7","typescript":"^4.9.4","@types/jest":"^29.2.5","@types/node":"^18.11.18","@trpc/client":"^10.7.0","@types/co-body":"^6.1.0","@types/express":"^4.17.15","@types/aws-lambda":"^8.10.109","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.1.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.1.0","@typescript-eslint/parser":"^5.47.1","@typescript-eslint/eslint-plugin":"^5.47.1","@trivago/prettier-plugin-sort-imports":"^4.0.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_1.1.0_1672704060231_0.3591633292530054","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"trpc-openapi","version":"1.1.1","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@1.1.1","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"895e6276095f36d30e801c98125956c63a582a22","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-1.1.1.tgz","fileCount":75,"integrity":"sha512-yz9uu2qdvVNjyU5pAVn9CAg9ZWu8YIOg5exgxwE7t1B/Pr94foIsLeQY0NV8SPpdqpJKVCcKrrl2VtTOLlnmJQ==","signatures":[{"sig":"MEUCIGjuvHXo9hG/NyxVQ5EKFiyrJslDJGuKDUcVM11mfhSEAiEAlYSINEcezfze/Sv9mkduQP/QWRWb3nwTlCShD2w8plI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtE6WACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoFuw/+L3SLsWFcHTnYH+/jhOQ06xrGiLJpv2jSF5fYAe1n3978ziVV\r\nXTFIDCtuF2uctgw4/9PU7ViQLNLYDwmkFMjfhAzsv9hcjZbwsU06bdrWlAU3\r\nt3joj8TSDc9DJOBxFHRfrAGnBuNQ9g7XuDtF9Ru4oY55i3xwACFndccfEXT5\r\nMo/pzcQm1Of3KWrraMKb8snKuSZGnZMGdoCsHkz+71vJBfa61cZevATMeVfh\r\nxxZO44FHM7waDOiLAhEDZUdTH4oRlt4rA1T3AEDgRiOEx2L8Zoyf9YKNZk9V\r\nydcMrcSYIx6tfl/qtHz+ls19BdMHgKzOwU7AswQ3ZTMBe+mZd17RQXSruH1k\r\ntQEy8a67/0XMYRHRj5yC6b4HTaEhSNKVwtmDsJ7gXDroGTTvNqlV8w/fW6RP\r\nhLms+ALbRHj/UArFDnWZQvSBccO7LRRZQ0HEo8NY9LMpj2Yahqg20JZ0WGA5\r\ntj5n+DCAXQthGM4uH+7HeK3BLfUE/0Kidqf/Uflz7VoyTpgndP/5ueUlVtsT\r\n6U7cAubyhMF6jGfoC9kNWCdNWz108kdD3+UgY2m+BQi1wm7Ic1qw1T+5Uj72\r\nfjqrJuakOayq0Ec/5taI5QLAqkn9NAnNM4T8vTcSB5YXqDOIvUXZTng+P1M/\r\nKSfKex1XPguTPqlYKzu3J31rghGiCVL2bXQ=\r\n=pGZD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"056ece0f586be9f11a66c9bca59ee66dee7b7f19","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/with-nextjs","examples/with-express","examples/with-interop","examples/with-serverless"],"_npmVersion":"8.19.2","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"18.12.1","dependencies":{"co-body":"^6.1.0","openapi-types":"^12.1.0","node-mocks-http":"^1.12.1","lodash.clonedeep":"^4.5.0","zod-to-json-schema":"^3.20.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","next":"^13.1.1","eslint":"^8.31.0","rimraf":"^3.0.2","express":"^4.18.2","ts-jest":"^29.0.3","ts-node":"^10.9.1","prettier":"^2.8.1","superjson":"^1.12.1","aws-lambda":"^1.0.7","node-fetch":"^2.6.7","typescript":"^4.9.4","@types/jest":"^29.2.5","@types/node":"^18.11.18","@trpc/client":"^10.7.0","@types/co-body":"^6.1.0","@types/express":"^4.17.15","@types/aws-lambda":"^8.10.109","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.26.0","eslint-plugin-promise":"^6.1.1","eslint-config-prettier":"^8.6.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.1.0","@typescript-eslint/parser":"^5.48.0","@typescript-eslint/eslint-plugin":"^5.48.0","@trivago/prettier-plugin-sort-imports":"^4.0.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_1.1.1_1672760982512_0.5375128968951997","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"trpc-openapi","version":"1.1.2","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@1.1.2","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"5627c2cd1f957fba4399124264898cdd90c50827","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-1.1.2.tgz","fileCount":75,"integrity":"sha512-G2CT6q0nhhOGcYeAaK+volHNXRE8BFmNY+LwQA1cMXonh+iEUvl6T3OjF2HEGVvF0am9u9uo5hlMuXq5Wdweww==","signatures":[{"sig":"MEYCIQDF1PRa6Qy9OqRstRtRBmiJ2QDKeANWC0t/rCjvudheNQIhAKCMBdvJmuaUFuK3H9NSesfeLSqlCINsKH6OoEOSPUT9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0oiNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYoQ/8DlfhZs0KbkKelEMS7R5Qa3Qplu8n6EZkbO0DkgkJuk3WhQfd\r\nV89m9KKxR1MR8hDzVS6cV32Xr4T1O82C9XBGJqwczeShuhtX7IwMPQi8L06w\r\nm/79Skk587DKwudIkDp7oHpt4zx4/Bd9av3oZE0qpiaE73caOl7VHhJREmWH\r\n+KvJKi1Q7qjBDDoE95mg3xpaK1OZ7sQBa/4f5/jX2ELpTRq9ENw5zWrMbrv2\r\nvi3UpxuT4pAmn8ZKkQXFEpDncT3oSQ6Z5DCxxbpKBKuXlwC5AJyxGuIAGqJH\r\n5c7ELF32vTE34iAuJBAz4sPAsj7kBouKu6Rcmnp8bOOMZaxAsY6VwWjOm5xJ\r\nhSeIq7DOFyJa0/Gv3tCR8ZH3UqsywGz7x82KoMC+RAN7DtcAnaC8DgDBi5Gh\r\n0jP1zLafDPhQx+7XP/5seraCVC+iL0Lj9VoRKE8kodHiGAKbx38G3wpNSIVQ\r\n3s88LBaRIx4fN7J6tt2M2m8rj5W057jUYofR92NYMF161C1tJR3urDcDKBjI\r\nKUHrt2HrIohdMD7PT7srYZ3eNiW9jyZ2JB4UnQLRJjhC2ue5vErQcqdsMwO+\r\nctlM5a6W0uFWOAqzCCVrTWHN5zNtnPe6KAyz45CgWqjKY156xeGEMsLMSFVd\r\nWeYD0IJt3HJIgybbDMmrcppmMr3ucYfFASA=\r\n=gWNg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"85ae236e3689b5dc27e901b975dc6cec51f46e6c","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/with-nextjs","examples/with-express","examples/with-interop","examples/with-serverless"],"_npmVersion":"8.19.2","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"18.12.1","dependencies":{"co-body":"^6.1.0","openapi-types":"^12.1.0","node-mocks-http":"^1.12.1","lodash.clonedeep":"^4.5.0","zod-to-json-schema":"^3.20.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.4.0","next":"^13.1.5","eslint":"^8.32.0","rimraf":"^4.1.2","express":"^4.18.2","ts-jest":"^29.0.5","ts-node":"^10.9.1","prettier":"^2.8.3","superjson":"^1.12.2","aws-lambda":"^1.0.7","node-fetch":"^2.6.7","typescript":"^4.9.4","@types/jest":"^29.4.0","@types/node":"^18.11.18","@trpc/client":"^10.9.0","@types/co-body":"^6.1.0","@types/express":"^4.17.16","@types/aws-lambda":"^8.10.109","@types/node-fetch":"^2.6.2","eslint-plugin-import":"^2.27.5","eslint-plugin-promise":"^6.1.1","eslint-config-prettier":"^8.6.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.1.0","@typescript-eslint/parser":"^5.49.0","@typescript-eslint/eslint-plugin":"^5.49.0","@trivago/prettier-plugin-sort-imports":"^4.0.0"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_1.1.2_1674741901729_0.9471361643433907","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"trpc-openapi","version":"1.2.0","keywords":["trpc","openapi","swagger"],"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","_id":"trpc-openapi@1.2.0","maintainers":[{"name":"jlalmes","email":"jb@jamesbe.com"}],"homepage":"https://github.com/jlalmes/trpc-openapi","bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"dist":{"shasum":"2aa1495cd66809fc28a4a512992c6a3e7b865c71","tarball":"https://registry.npmjs.org/trpc-openapi/-/trpc-openapi-1.2.0.tgz","fileCount":83,"integrity":"sha512-pfYoCd/3KYXWXvUPZBKJw455OOwngKN/6SIcj7Yit19OMLJ+8yVZkEvGEeg5wUSwfsiTdRsKuvqkRPXVSwV7ew==","signatures":[{"sig":"MEUCIQCTXITOskyE/w4bk1JD0DM8FQyOnvNEcrd38T9STFKd5AIgZlwkJ0JXgGVORo9MyJ1T9dOSLt29QIbOLpkMjT/o9Ew=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123318},"main":"dist/index.js","gitHead":"fe4c270ca7ec444e70a3fa7ac452e42863a1f3d1","private":false,"scripts":{"test":"tsc --noEmit && jest --verbose","build":"rimraf dist && tsc -p tsconfig.build.json"},"typings":"dist/index.d.ts","_npmUser":{"name":"jlalmes","email":"jb@jamesbe.com"},"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"workspaces":[".","examples/with-nextjs","examples/with-express","examples/with-interop","examples/with-serverless","examples/with-fastify","examples/with-nuxtjs"],"_npmVersion":"9.6.0","description":"tRPC OpenAPI","directories":{},"_nodeVersion":"18.12.1","dependencies":{"h3":"^1.6.4","co-body":"^6.1.0","openapi-types":"^12.1.1","node-mocks-http":"^1.12.2","lodash.clonedeep":"^4.5.0","zod-to-json-schema":"^3.21.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","next":"^13.4.3","eslint":"^8.41.0","rimraf":"^5.0.1","express":"^4.18.2","fastify":"^4.17.0","ts-jest":"^29.1.0","ts-node":"^10.9.1","prettier":"^2.8.8","superjson":"^1.12.3","aws-lambda":"^1.0.7","node-fetch":"^2.6.11","typescript":"^5.0.4","@types/jest":"^29.5.1","@types/node":"^20.2.3","@trpc/client":"^10.27.1","@types/co-body":"^6.1.0","@types/express":"^4.17.17","@types/aws-lambda":"^8.10.115","@types/node-fetch":"^2.6.4","eslint-plugin-import":"^2.27.5","eslint-plugin-promise":"^6.1.1","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^4.2.1","@types/lodash.clonedeep":"^4.5.7","openapi-schema-validator":"^12.1.1","@typescript-eslint/parser":"^5.59.7","@typescript-eslint/eslint-plugin":"^5.59.7","@trivago/prettier-plugin-sort-imports":"^4.1.1"},"peerDependencies":{"zod":"^3.14.4","@trpc/server":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-openapi_1.2.0_1684926348085_0.5908636901944633","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-05-04T10:20:25.196Z","modified":"2024-11-19T18:16:17.858Z","0.0.1":"2022-05-04T10:20:25.350Z","0.1.0-alpha.1":"2022-05-17T13:51:04.360Z","0.1.0-alpha.2":"2022-05-17T14:10:26.773Z","0.1.0-alpha.3":"2022-05-17T15:26:06.245Z","0.1.0-alpha.4":"2022-05-17T15:34:09.729Z","0.1.0-alpha.5":"2022-05-17T15:55:09.557Z","0.1.0-alpha.6":"2022-05-17T16:36:11.580Z","0.1.0-alpha.7":"2022-05-17T16:55:16.575Z","0.1.0-alpha.8":"2022-05-17T22:16:41.172Z","0.1.0-alpha.9":"2022-05-17T22:23:26.724Z","0.1.0-alpha.10":"2022-05-17T23:07:52.376Z","0.1.0-alpha.11":"2022-05-17T23:19:40.584Z","0.1.0-alpha.12":"2022-05-17T23:36:15.922Z","0.1.0-alpha.13":"2022-05-18T12:20:02.607Z","0.1.0-alpha.14":"2022-05-23T17:53:58.635Z","0.1.0-alpha.15":"2022-05-24T01:43:21.101Z","0.1.0-alpha.16":"2022-05-25T14:38:33.001Z","0.1.0-alpha.17":"2022-05-29T20:02:56.038Z","0.1.0-alpha.18":"2022-06-01T12:33:03.526Z","0.1.0-alpha.19":"2022-06-06T11:10:36.019Z","0.1.0-alpha.20":"2022-06-06T11:12:20.082Z","0.1.0-alpha.21":"2022-06-07T15:20:29.187Z","0.1.0-alpha.22":"2022-06-08T14:52:56.072Z","0.1.0-alpha.23":"2022-06-09T08:37:47.434Z","0.1.0":"2022-06-10T11:07:52.379Z","0.1.1-alpha.1":"2022-06-13T11:46:09.996Z","0.1.1-alpha.2":"2022-06-13T11:52:09.676Z","0.2.0":"2022-06-13T12:01:34.970Z","0.1.1":"2022-06-13T12:02:01.850Z","0.1.2":"2022-07-05T10:46:47.841Z","0.1.3-alpha.0":"2022-07-07T18:10:39.140Z","0.2.1-alpha.0":"2022-07-07T18:12:03.541Z","0.1.3":"2022-07-11T11:17:51.918Z","0.2.2":"2022-07-14T18:05:08.258Z","0.3.0":"2022-07-19T08:34:23.299Z","0.4.0":"2022-07-22T13:26:20.009Z","0.5.0":"2022-08-08T20:37:15.324Z","0.6.0":"2022-08-22T14:09:10.862Z","0.6.1":"2022-08-22T22:33:45.901Z","0.7.0":"2022-08-25T11:38:53.653Z","1.0.0-alpha.0":"2022-08-25T13:58:32.195Z","1.0.0-alpha.1":"2022-09-08T09:42:17.143Z","1.0.0-alpha.2":"2022-10-03T14:55:32.185Z","1.0.0-alpha.3":"2022-10-14T10:21:32.231Z","1.0.0-alpha.4":"2022-11-09T17:44:54.252Z","1.0.0":"2022-11-27T13:43:04.937Z","1.1.0":"2023-01-03T00:01:00.427Z","1.1.1":"2023-01-03T15:49:42.750Z","1.1.2":"2023-01-26T14:05:01.911Z","1.2.0":"2023-05-24T11:05:48.258Z"},"bugs":{"url":"https://github.com/jlalmes/trpc-openapi/issues"},"author":{"name":"James Berry","email":"jb@jamesbe.com"},"license":"MIT","homepage":"https://github.com/jlalmes/trpc-openapi","keywords":["trpc","openapi","swagger"],"repository":{"url":"git+https://github.com/jlalmes/trpc-openapi.git","type":"git"},"description":"tRPC OpenAPI","maintainers":[{"email":"alexander@n1s.se","name":"katt"}],"readme":"![trpc-openapi](assets/trpc-openapi-readme.png)\n\n<div align=\"center\">\n  <h1>trpc-openapi</h1>\n  <a href=\"https://www.npmjs.com/package/trpc-openapi\"><img src=\"https://img.shields.io/npm/v/trpc-openapi.svg?style=flat&color=brightgreen\" target=\"_blank\" /></a>\n  <a href=\"./LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-black\" /></a>\n  <a href=\"https://trpc.io/discord\" target=\"_blank\"><img src=\"https://img.shields.io/badge/chat-discord-blue.svg\" /></a>\n  <br />\n  <hr />\n</div>\n\n## **[OpenAPI](https://swagger.io/specification/) support for [tRPC](https://trpc.io/)** 🧩\n\n- Easy REST endpoints for your tRPC procedures.\n- Perfect for incremental adoption.\n- OpenAPI version 3.0.3.\n\n## Usage\n\n**1. Install `trpc-openapi`.**\n\n```bash\n# npm\nnpm install trpc-openapi\n# yarn\nyarn add trpc-openapi\n```\n\n**2. Add `OpenApiMeta` to your tRPC instance.**\n\n```typescript\nimport { initTRPC } from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\nconst t = initTRPC.meta<OpenApiMeta>().create(); /* 👈 */\n```\n\n**3. Enable `openapi` support for a procedure.**\n\n```typescript\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ /* 👉 */ openapi: { method: 'GET', path: '/say-hello' } })\n    .input(z.object({ name: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `Hello ${input.name}!` };\n    });\n});\n```\n\n**4. Generate an OpenAPI document.**\n\n```typescript\nimport { generateOpenApiDocument } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\n/* 👇 */\nexport const openApiDocument = generateOpenApiDocument(appRouter, {\n  title: 'tRPC OpenAPI',\n  version: '1.0.0',\n  baseUrl: 'http://localhost:3000',\n});\n```\n\n**5. Add an `trpc-openapi` handler to your app.**\n\nWe currently support adapters for [`Express`](http://expressjs.com/), [`Next.js`](https://nextjs.org/), [`Serverless`](https://www.serverless.com/), [`Fastify`](https://www.fastify.io/), [`Nuxt`](https://nuxtjs.org/) & [`Node:HTTP`](https://nodejs.org/api/http.html).\n\n[`Fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), [`Cloudflare Workers`](https://workers.cloudflare.com/) & more soon™, PRs are welcomed 🙌.\n\n```typescript\nimport http from 'http';\nimport { createOpenApiHttpHandler } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\nconst server = http.createServer(createOpenApiHttpHandler({ router: appRouter })); /* 👈 */\n\nserver.listen(3000);\n```\n\n**6. Profit 🤑**\n\n```typescript\n// client.ts\nconst res = await fetch('http://localhost:3000/say-hello?name=James', { method: 'GET' });\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n## Requirements\n\nPeer dependencies:\n\n- [`tRPC`](https://github.com/trpc/trpc) Server v10 (`@trpc/server`) must be installed.\n- [`Zod`](https://github.com/colinhacks/zod) v3 (`zod@^3.14.4`) must be installed (recommended `^3.20.0`).\n\nFor a procedure to support OpenAPI the following _must_ be true:\n\n- Both `input` and `output` parsers are present AND use `Zod` validation.\n- Query `input` parsers extend `Object<{ [string]: String | Number | BigInt | Date }>` or `Void`.\n- Mutation `input` parsers extend `Object<{ [string]: AnyType }>` or `Void`.\n- `meta.openapi.method` is `GET`, `POST`, `PATCH`, `PUT` or `DELETE`.\n- `meta.openapi.path` is a string starting with `/`.\n- `meta.openapi.path` parameters exist in `input` parser as `String | Number | BigInt | Date`\n\nPlease note:\n\n- Data [`transformers`](https://trpc.io/docs/data-transformers) (such as `superjson`) are ignored.\n- Trailing slashes are ignored.\n- Routing is case-insensitive.\n\n## HTTP Requests\n\nProcedures with a `GET`/`DELETE` method will accept inputs via URL `query parameters`. Procedures with a `POST`/`PATCH`/`PUT` method will accept inputs via the `request body` with a `application/json` or `application/x-www-form-urlencoded` content type.\n\n### Path parameters\n\nA procedure can accept a set of inputs via URL path parameters. You can add a path parameter to any OpenAPI procedure by using curly brackets around an input name as a path segment in the `meta.openapi.path` field.\n\n### Query parameters\n\nQuery & path parameter inputs are always accepted as a `string`. This library will attempt to [coerce](https://github.com/colinhacks/zod#coercion-for-primitives) your input values to the following primitive types out of the box: `number`, `boolean`, `bigint` and `date`. If you wish to support others such as `object`, `array` etc. please use [`z.preprocess()`](https://github.com/colinhacks/zod#preprocess).\n\n```typescript\n// Router\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'GET', path: '/say-hello/{name}' /* 👈 */ } })\n    .input(z.object({ name: z.string() /* 👈 */, greeting: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input }) => {\n      return { greeting: `${input.greeting} ${input.name}!` };\n    });\n});\n\n// Client\nconst res = await fetch('http://localhost:3000/say-hello/James?greeting=Hello' /* 👈 */, {\n  method: 'GET',\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n### Request body\n\n```typescript\n// Router\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'POST', path: '/say-hello/{name}' /* 👈 */ } })\n    .input(z.object({ name: z.string() /* 👈 */, greeting: z.string() }))\n    .output(z.object({ greeting: z.string() }))\n    .mutation(({ input }) => {\n      return { greeting: `${input.greeting} ${input.name}!` };\n    });\n});\n\n// Client\nconst res = await fetch('http://localhost:3000/say-hello/James' /* 👈 */, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({ greeting: 'Hello' }),\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n### Custom headers\n\nAny custom headers can be specified in the `meta.openapi.headers` array, these headers will not be validated on request. Please consider using [Authorization](#authorization) for first-class OpenAPI auth/security support.\n\n## HTTP Responses\n\nStatus codes will be `200` by default for any successful requests. In the case of an error, the status code will be derived from the thrown `TRPCError` or fallback to `500`.\n\nYou can modify the status code or headers for any response using the `responseMeta` function.\n\nPlease see [error status codes here](src/adapters/node-http/errors.ts).\n\n## Authorization\n\nTo create protected endpoints, add `protect: true` to the `meta.openapi` object of each tRPC procedure. By default, you can then authenticate each request with the `createContext` function using the `Authorization` header with the `Bearer` scheme. If you wish to authenticate requests using a different/additional methods (such as custom headers, or cookies) this can be overwritten by specifying `securitySchemes` object.\n\nExplore a [complete example here](examples/with-nextjs/src/server/router.ts).\n\n#### Server\n\n```typescript\nimport { TRPCError, initTRPC } from '@trpc/server';\nimport { OpenApiMeta } from 'trpc-openapi';\n\ntype User = { id: string; name: string };\n\nconst users: User[] = [\n  {\n    id: 'usr_123',\n    name: 'James',\n  },\n];\n\nexport type Context = { user: User | null };\n\nexport const createContext = async ({ req, res }): Promise<Context> => {\n  let user: User | null = null;\n  if (req.headers.authorization) {\n    const userId = req.headers.authorization.split(' ')[1];\n    user = users.find((_user) => _user.id === userId);\n  }\n  return { user };\n};\n\nconst t = initTRPC.context<Context>().meta<OpenApiMeta>().create();\n\nexport const appRouter = t.router({\n  sayHello: t.procedure\n    .meta({ openapi: { method: 'GET', path: '/say-hello', protect: true /* 👈 */ } })\n    .input(z.void()) // no input expected\n    .output(z.object({ greeting: z.string() }))\n    .query(({ input, ctx }) => {\n      if (!ctx.user) {\n        throw new TRPCError({ message: 'User not found', code: 'UNAUTHORIZED' });\n      }\n      return { greeting: `Hello ${ctx.user.name}!` };\n    }),\n});\n```\n\n#### Client\n\n```typescript\nconst res = await fetch('http://localhost:3000/say-hello', {\n  method: 'GET',\n  headers: { Authorization: 'Bearer usr_123' } /* 👈 */,\n});\nconst body = await res.json(); /* { greeting: 'Hello James!' } */\n```\n\n## Examples\n\n_For advanced use-cases, please find examples in our [complete test suite](test)._\n\n#### With Express\n\nPlease see [full example here](examples/with-express).\n\n```typescript\nimport { createExpressMiddleware } from '@trpc/server/adapters/express';\nimport express from 'express';\nimport { createOpenApiExpressMiddleware } from 'trpc-openapi';\n\nimport { appRouter } from '../appRouter';\n\nconst app = express();\n\napp.use('/api/trpc', createExpressMiddleware({ router: appRouter }));\napp.use('/api', createOpenApiExpressMiddleware({ router: appRouter })); /* 👈 */\n\napp.listen(3000);\n```\n\n#### With Next.js\n\nPlease see [full example here](examples/with-nextjs).\n\n```typescript\n// pages/api/[...trpc].ts\nimport { createOpenApiNextHandler } from 'trpc-openapi';\n\nimport { appRouter } from '../../server/appRouter';\n\nexport default createOpenApiNextHandler({ router: appRouter });\n```\n\n#### With AWS Lambda\n\nPlease see [full example here](examples/with-serverless).\n\n```typescript\nimport { createOpenApiAwsLambdaHandler } from 'trpc-openapi';\n\nimport { appRouter } from './appRouter';\n\nexport const openApi = createOpenApiAwsLambdaHandler({ router: appRouter });\n```\n\n#### With Fastify\n\nPlease see [full example here](examples/with-fastify).\n\n```typescript\nimport { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify';\nimport Fastify from 'fastify';\nimport { fastifyTRPCOpenApiPlugin } from 'trpc-openapi';\n\nimport { appRouter } from './router';\n\nconst fastify = Fastify();\n\nasync function main() {\n  await fastify.register(fastifyTRPCPlugin, { router: appRouter });\n  await fastify.register(fastifyTRPCOpenApiPlugin, { router: appRouter }); /* 👈 */\n\n  await fastify.listen({ port: 3000 });\n}\n\nmain();\n```\n\n## Types\n\n#### GenerateOpenApiDocumentOptions\n\nPlease see [full typings here](src/generator/index.ts).\n\n| Property          | Type                                   | Description                                             | Required |\n| ----------------- | -------------------------------------- | ------------------------------------------------------- | -------- |\n| `title`           | `string`                               | The title of the API.                                   | `true`   |\n| `description`     | `string`                               | A short description of the API.                         | `false`  |\n| `version`         | `string`                               | The version of the OpenAPI document.                    | `true`   |\n| `baseUrl`         | `string`                               | The base URL of the target server.                      | `true`   |\n| `docsUrl`         | `string`                               | A URL to any external documentation.                    | `false`  |\n| `tags`            | `string[]`                             | A list for ordering endpoint groups.                    | `false`  |\n| `securitySchemes` | `Record<string, SecuritySchemeObject>` | Defaults to `Authorization` header with `Bearer` scheme | `false`  |\n\n#### OpenApiMeta\n\nPlease see [full typings here](src/types.ts).\n\n| Property       | Type                | Description                                                                                          | Required | Default                |\n| -------------- | ------------------- | ---------------------------------------------------------------------------------------------------- | -------- | ---------------------- |\n| `enabled`      | `boolean`           | Exposes this procedure to `trpc-openapi` adapters and on the OpenAPI document.                       | `false`  | `true`                 |\n| `method`       | `HttpMethod`        | HTTP method this endpoint is exposed on. Value can be `GET`, `POST`, `PATCH`, `PUT` or `DELETE`.     | `true`   | `undefined`            |\n| `path`         | `string`            | Pathname this endpoint is exposed on. Value must start with `/`, specify path parameters using `{}`. | `true`   | `undefined`            |\n| `protect`      | `boolean`           | Requires this endpoint to use a security scheme.                                                     | `false`  | `false`                |\n| `summary`      | `string`            | A short summary of the endpoint included in the OpenAPI document.                                    | `false`  | `undefined`            |\n| `description`  | `string`            | A verbose description of the endpoint included in the OpenAPI document.                              | `false`  | `undefined`            |\n| `tags`         | `string[]`          | A list of tags used for logical grouping of endpoints in the OpenAPI document.                       | `false`  | `undefined`            |\n| `headers`      | `ParameterObject[]` | An array of custom headers to add for this endpoint in the OpenAPI document.                         | `false`  | `undefined`            |\n| `contentTypes` | `ContentType[]`     | A set of content types specified as accepted in the OpenAPI document.                                | `false`  | `['application/json']` |\n| `deprecated`   | `boolean`           | Whether or not to mark an endpoint as deprecated                                                     | `false`  | `false`                |\n\n#### CreateOpenApiNodeHttpHandlerOptions\n\nPlease see [full typings here](src/adapters/node-http/core.ts).\n\n| Property        | Type       | Description                                            | Required |\n| --------------- | ---------- | ------------------------------------------------------ | -------- |\n| `router`        | `Router`   | Your application tRPC router.                          | `true`   |\n| `createContext` | `Function` | Passes contextual (`ctx`) data to procedure resolvers. | `false`  |\n| `responseMeta`  | `Function` | Returns any modifications to statusCode & headers.     | `false`  |\n| `onError`       | `Function` | Called if error occurs inside handler.                 | `false`  |\n| `maxBodySize`   | `number`   | Maximum request body size in bytes (default: 100kb).   | `false`  |\n\n---\n\n_Still using tRPC v9? See our [`.interop()`](examples/with-interop) example._\n\n## License\n\nDistributed under the MIT License. See LICENSE for more information.\n\n## Contact\n\nJames Berry - Follow me on Twitter [@jlalmes](https://twitter.com/jlalmes) 💚\n","readmeFilename":"README.md"}