{"_id":"@accility/protoc-swagger-plugin","_rev":"4-09b5189f242f5f4fce51cedfd581d1b2","name":"@accility/protoc-swagger-plugin","dist-tags":{"latest":"0.11.0"},"versions":{"0.9.0":{"name":"@accility/protoc-swagger-plugin","version":"0.9.0","description":"Convert .proto files to OpenAPI v2 (swagger) files.","keywords":["protoc","protobuffer","REST","plugin","swagger","openapi","convert"],"author":{"name":"Accility AB"},"license":"MIT","public":true,"repository":{"url":"git+https://github.com/accility/protoc-swagger-plugin.git"},"engines":{"node":">=8.0.0"},"main":"./dist/lib/protoc-gen-swagger.js","types":"./dist/lib/protoc-gen-swagger.d.ts","bin":{"protoc":"dist/bin/protoc-gen-swagger-cli.js"},"scripts":{"build":"npx tsc","test":"node test/simpleProductApi.js"},"dependencies":{"@accility/protoc-tools":"^0.9.1","google-proto-files":"^2.0.0"},"devDependencies":{"@types/node":"^13.9.8","typescript":"^3.8.3"},"gitHead":"ac51a4b3c6152052c8ac00329ccdcd7e1f2bcb31","bugs":{"url":"https://github.com/accility/protoc-swagger-plugin/issues"},"homepage":"https://github.com/accility/protoc-swagger-plugin#readme","_id":"@accility/protoc-swagger-plugin@0.9.0","_nodeVersion":"10.15.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-ufMdGYkNqr4OaVmKRI7Cgo4NXeERmopBWPCw317QyDlnBXXF990v8vtfdlCI4GO7eRD/cVMHHV1C64W9M7/wXw==","shasum":"3b84c586383c0ed9c1bf762b95a7461dae60c60a","tarball":"https://registry.npmjs.org/@accility/protoc-swagger-plugin/-/protoc-swagger-plugin-0.9.0.tgz","fileCount":13,"unpackedSize":17625732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehbPpCRA9TVsSAnZWagAAp8cP/3MRhumodWsCBORWie+A\nSRRHV95zteI6Fvmb3wRxGZj4AnAmK11xLSvBg0eYLbP4iLMzLfPwYwTBweb4\nyOYSIp56sqqgRnzpM/fk8hfP3iyCUsvASyx6c9kNh8updyU+dGugC9tn1OWV\nluIZ+xIGdQhc8SiltQSj4krKA1aH0zbtiSaNRJezmEu8yaiYKflND4EpUkyG\nHUEeO4TGnmexvGb1IBFMHDG6Tc8ACwSulWclzREzV7esv87teT/vdKF2PjgH\npAxRU/bN2AlkKHKEFOMbDkv2i+bOL6blVtuvfL8BY7iX0oeLNkAL0l0++apH\nxomdTAzKhPKWKXSdfI84+ps4e4xh3F4PUZ1arNLcxU0QCxOWTJVoytiN/a9W\nF58bU3JbBlYmb9fRqj1B1CH66VUHCMSru32c5zxn0bUd3lJPac+FtX7zZYNC\nwdJl0hb/YB/gUBIlWvSw1rgTib6W3wY5XE2RznRjuA/Aiq0cmy+zHn77AxmZ\niOYeyj0s7KSOCJTaPtpqsRoNsX2JiX7wzefuXwbFn0Ibc5Y5AnyyuUM9tVN3\n4csOx+ppR3PKyZeMQJOAav0pZv+BZLJhVRWdfpG+uAHoYhhzGIn5jC82eGbL\nxfsCek08HvXDK5BUef2ixCZKJE+fiiCWXGPA5PUOLzEhaX6QKJM8njIa+d+Z\n4oYy\r\n=CvN7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDc2sxplUP6xD7/GN3vF2QJWNT7aAryJ7Rat7jUFQeEsgIgM89bafZToEzZeYcYHctGTsnLSw9Dnxq/17Zdfyu+zFc="}]},"maintainers":[{"name":"acc-mart","email":"martin.skogevall@accility.se"}],"_npmUser":{"name":"acc-mart","email":"martin.skogevall@accility.se"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protoc-swagger-plugin_0.9.0_1585820648538_0.4758872408751198"},"_hasShrinkwrap":false},"0.9.1":{"name":"@accility/protoc-swagger-plugin","version":"0.9.1","description":"Convert .proto files to OpenAPI v2 (swagger) files.","keywords":["protoc","protobuffer","REST","plugin","swagger","openapi","convert"],"author":{"name":"Accility AB"},"license":"MIT","public":true,"repository":{"url":"git+https://github.com/accility/protoc-swagger-plugin.git"},"engines":{"node":">=8.0.0"},"main":"./dist/lib/protoc-gen-swagger.js","types":"./dist/lib/protoc-gen-swagger.d.ts","scripts":{"build":"npx tsc","test":"node test/simpleProductApi.js"},"dependencies":{"@accility/protoc-tools":"^0.9.1","google-proto-files":"^2.0.0"},"devDependencies":{"@types/node":"^13.9.8","typescript":"^3.8.3"},"gitHead":"b21d8f22e51b0877e37e249972e7c2d10048bf8d","bugs":{"url":"https://github.com/accility/protoc-swagger-plugin/issues"},"homepage":"https://github.com/accility/protoc-swagger-plugin#readme","_id":"@accility/protoc-swagger-plugin@0.9.1","_nodeVersion":"10.15.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-KKnbWN5n6zkX02NxlFvxKpYSfx84Fp959tb8TtrR6OsSRqa+ZJwuPVR1ZGjox4rj6blRW2UMmdaUsF35rrJRhA==","shasum":"39c0a3d9421ed7d2eb811a4315b0e79dc5d9f419","tarball":"https://registry.npmjs.org/@accility/protoc-swagger-plugin/-/protoc-swagger-plugin-0.9.1.tgz","fileCount":13,"unpackedSize":17625660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehfheCRA9TVsSAnZWagAAKhYP/RwQNGoc4izzX1vrcle8\nnzTILQP142xNfAtqTchNq8BKi3TqL09zOC/30AhYSXuV+9wQKQY4rRhwNUiM\n1FnqEH0W6Vv2PUzxcYB+mDE2OFxIS2u4g6voo2Cw9jcjN53H/YxtYMfKQJJo\nQ9MOUxM+V8dKgY65Bcpai+nWAo8KsVUzXrmvbgz78TuzO+k98Qk4eRRtxuyG\nm9zl6T8Npc/p4Rk6Tc3SsAb0OJciP45aDiMj+QNxkYVrrkGKlbo7asDjDBBJ\nLLD25TYeQxBHPx14Tzac/EytIfg7hBvARlGSCOHRZHZ41R3F7ijtMZUsDWVZ\nL6rSSsvBEZMkGQsFYvH4EXbWO2SDQZ5aj4mqY5+V25VTHO3WpFF0pjsZZvtW\nDUeAJ5QcE2WhidEaKgC4e8m3r9MUfBuhL7Jed1BZO4v31T6wQV7XeMeuTMhE\nmhgK2K7YctSzb9Od9CEufUZe4u88x+MJf1kPSRuHzzLKxc2sJnNiIENjsihD\nROu8JJGUFhFS0f89LCzZ0/OKgTqcP42mW+dEDLgnFpZq+iVwGNGVAQouYpJC\nhTEUuW/Gswx4aEs4XIninldKIiaoxJSP8ZagYH3u1KbBgElOtDecbWgA93gk\n0gTRHcPxk423G5GUyzbKKDRFaLOBk4Gqq+9inAItEf4w7eIY5Jh2dZS/3KAg\nEj9w\r\n=xuiL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRmwoFxUjq2E8Ab6zhl5/lwYITQb6kUX6w6kwlMKQeOQIhAIjnwS2ugBBftTEUQR0+a7K+lJzQqQ0LNfbEiy8XQUAJ"}]},"maintainers":[{"name":"acc-mart","email":"martin.skogevall@accility.se"}],"_npmUser":{"name":"acc-mart","email":"martin.skogevall@accility.se"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protoc-swagger-plugin_0.9.1_1585838173816_0.5825181074099857"},"_hasShrinkwrap":false},"0.10.0":{"name":"@accility/protoc-swagger-plugin","version":"0.10.0","description":"Convert .proto files to OpenAPI v2 (swagger) files.","keywords":["protoc","protobuffer","REST","plugin","swagger","openapi","convert"],"author":{"name":"Accility AB"},"license":"MIT","public":true,"repository":{"url":"git+https://github.com/accility/protoc-swagger-plugin.git"},"engines":{"node":">=8.0.0"},"main":"./dist/lib/protoc-gen-swagger.js","types":"./dist/lib/protoc-gen-swagger.d.ts","scripts":{"build":"npx tsc","test":"node test/simpleProductApi.js"},"dependencies":{"@accility/protoc-tools":"^0.10.0","google-proto-files":"^2.0.0"},"devDependencies":{"@types/node":"^13.9.8","typescript":"^3.8.3"},"gitHead":"e2e1e6a6e00c9ec0d5b84f4d509bd4eba9bd051c","bugs":{"url":"https://github.com/accility/protoc-swagger-plugin/issues"},"homepage":"https://github.com/accility/protoc-swagger-plugin#readme","_id":"@accility/protoc-swagger-plugin@0.10.0","_nodeVersion":"10.15.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-G7N7kqUzDywMIC8WQI93wFbGsE6pTm7AFXIu/5Ykr82pW085+C/tUyhaXuBlavYxngZUQ/RaEeZSOmwGrwph6A==","shasum":"d1d6fe6ad5ac3382ebbf73464d18033bfb9fce1d","tarball":"https://registry.npmjs.org/@accility/protoc-swagger-plugin/-/protoc-swagger-plugin-0.10.0.tgz","fileCount":13,"unpackedSize":17625843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeh8A4CRA9TVsSAnZWagAAdYEP/jgPNzKf2TAbYL3U4GoI\nnW8DiJyzIBTdNBzfvhuQETgpzaOLwQLOtwhuuKnF2TZsEv7YLc7bOOAu7aeU\npDnFXml9yc1u8v+5rXv+/1SvV0afO8abR0fjdXQ8uO951Lu8Ze7hvOtFSRUR\ngoZ9V8lUtqgS87PCNCr5cej/R4HqbSCpZUp3Hz69HoerrYuCN8B/Swqesa8t\ns231V5Ft1o6ProvOy5AdskR6okdt0RctgU2MjizFIvQwHJ2k9+1jyj2vAafu\n3uc97jPYU8upIvWYJ9G1864tE87YhO7hLlUQXdiJde9lrXSOwqLPBAEeFHC3\nWsVaAdAU1/6TU8DQTDKebFblj3iD5hheATCDT1raDbGXYgRroiWClpQ0jL/T\n5Rkj6ge4Qd3Ulhg1IdRDLcacZlGNiLEsfggk3lLl9Qx1XYDYVDM3J1T+yEGP\nsAdKFqSItXwo9kSEzPmm7iT8xLW3He5pyLPdtIMD0mbOUhkxSrMMzKQorLpy\nUdb918AuU3G5P835fWYxBOFv1gfoKMxcRxRNok+goOPvAcpse5U8ZlaHD87U\nyvZJ8kI32ELFPgTYbWJf/hbn7+GfLtRdo0FeM2AaJ2Nj/gFGrK2ITle7uJy/\nlkXxYRmgNb0YFg1J++rjNmtwJdb7qSrceJND/yWaex9/VpOPBED247AtRbQZ\ncFqR\r\n=EUow\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBVjjQaFJ/0YgMHE/aoT7ZuBvm+ApVk60i+ElrCaFafOAiEAgBo1UwhjbDYA0NA3kZSxnkFkcbdY7cVVzND3zF/BZDY="}]},"maintainers":[{"name":"acc-mart","email":"martin.skogevall@accility.se"}],"_npmUser":{"name":"acc-mart","email":"martin.skogevall@accility.se"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protoc-swagger-plugin_0.10.0_1585954871757_0.7313444176062402"},"_hasShrinkwrap":false},"0.11.0":{"name":"@accility/protoc-swagger-plugin","version":"0.11.0","description":"Convert .proto files to OpenAPI v2 (swagger) files.","keywords":["protoc","protobuffer","REST","plugin","swagger","openapi","convert"],"author":{"name":"Accility AB"},"license":"MIT","public":true,"repository":{"url":"git+https://github.com/accility/protoc-swagger-plugin.git"},"engines":{"node":">=8.0.0"},"main":"./dist/lib/protoc-gen-swagger.js","types":"./dist/lib/protoc-gen-swagger.d.ts","scripts":{"build":"npx tsc","test":"npx tsc --project test/tsconfig.json && node test/simpleProductApi.js"},"dependencies":{"@accility/protoc-tools":"^0.11.0","google-proto-files":"^2.0.0"},"devDependencies":{"@types/node":"^13.9.8","typescript":"^3.8.3"},"gitHead":"fc47520c6d9dee571f0f9385a56a5b5253f794b3","bugs":{"url":"https://github.com/accility/protoc-swagger-plugin/issues"},"homepage":"https://github.com/accility/protoc-swagger-plugin#readme","_id":"@accility/protoc-swagger-plugin@0.11.0","_nodeVersion":"10.15.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-E1XKh1MHoMCKAs3QLd41jf3/8rwQe6CIbcba6tJ9iOdEgYpdyB2nyH4e0gaoNASFgivACiuhVN8XM+VFgHFmWg==","shasum":"cd4ecb16cbd35e3db9916b55b75748126b0d8a2d","tarball":"https://registry.npmjs.org/@accility/protoc-swagger-plugin/-/protoc-swagger-plugin-0.11.0.tgz","fileCount":13,"unpackedSize":17627302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejHRECRA9TVsSAnZWagAASIYP/2+ynQY2o2iZH0sfqmS5\n3Sg0E4pjtpKz30kBd7ih7pY4zzUFbMhVns9jvhQ+DwjQshNI8It7KPLYE+Ux\n9wTTztIOcy2/Ra0umNw4A0mo6KqpAtbGQ/uvkqdRm3Lv0c49wurXS2tztlJ2\naJXbATK5bnjXR0FrU3oGhrBwmDZdlhkIrYjL6pIIth96ohLPdADer63iERjl\nWbjC5ps5XGdD5jZt4mBfLii8IUlxWcWa881LLgO+BZ4Oty18lDY2FnOM6Vr8\n1MUZi2A0Lu/S+qkDwmvdxegDVOpYZDFOJvj6OmhaA7k19eFaJZKciWzdrHCf\nat/aR5wRTZ5eTwo2dWo75LsaABDs7A0/7vT5Cu6H6gg81rGh8/jzJQZugn7x\nx4xN5NKo1SofXtHc666YxYhqst6nGdtDMiVBi6YfafPKInEEoeKSJC5kHvkl\nqKpOez0/a6TTpp9WuoZuU1N3hNg+GUuod5DPk6+6D4iwKAyZd86E28ZLdEAa\nPhOCeETHkIWELgGtoICkqTOZYCGpcOAYq1wRRkZKTRsIHMHgbh5Gc8Gq1jXM\nhHnK/CTNGnQHP1WBICs5S1/GU+o9YOoGCtNpXPjek2WBawA9CuGyNAYg2o/N\nwS0tYB19J4H71es2xQYiFgPmpxzME8RFhtaTXr79OrICzxPMzjmxgsrvhkzr\ng58T\r\n=x+xx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5ibfH+/uYwNmYl6F1SSxYQZWRPUnyqNwvCfxGcIdNcQIgX0IjPQuODWGV//lGvvk1knNROrb9XLWAR8s6dJvjHzM="}]},"maintainers":[{"name":"acc-mart","email":"martin.skogevall@accility.se"}],"_npmUser":{"name":"acc-mart","email":"martin.skogevall@accility.se"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protoc-swagger-plugin_0.11.0_1586263108231_0.9027754333294338"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-02T09:44:08.294Z","0.9.0":"2020-04-02T09:44:09.001Z","modified":"2022-04-04T11:07:16.005Z","0.9.1":"2020-04-02T14:36:14.102Z","0.10.0":"2020-04-03T23:01:12.201Z","0.11.0":"2020-04-07T12:38:28.619Z"},"maintainers":[{"name":"acc-mart","email":"martin.skogevall@accility.se"}],"description":"Convert .proto files to OpenAPI v2 (swagger) files.","homepage":"https://github.com/accility/protoc-swagger-plugin#readme","keywords":["protoc","protobuffer","REST","plugin","swagger","openapi","convert"],"repository":{"url":"git+https://github.com/accility/protoc-swagger-plugin.git"},"author":{"name":"Accility AB"},"bugs":{"url":"https://github.com/accility/protoc-swagger-plugin/issues"},"license":"MIT","readme":"# .proto to OpenApi Conversion\r\n\r\n:warning: This package is still in early days and the interfaces might change back and forth. When stable enough it will be released as v1.0.\r\n\r\nGenerate [OpenAPI v2 (Swagger)](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md) files from [.proto](https://developers.google.com/protocol-buffers) files.\r\n\r\nThis package includes the [protoc-gen-swagger plugin](https://github.com/grpc-ecosystem/grpc-gateway/releases) from the [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway) project.\r\nIt also makes available the collection of the [google common protos](https://github.com/googleapis/api-common-protos.git).\r\n\r\n## Installing\r\n\r\n```bash\r\nnpm install -D @accility/protoc-tools\r\n```\r\n\r\n## Usage\r\n\r\n```javascript\r\nconst protoc = require('@accility/protoc-tools');\r\nconst swagger = require('@accility/protoc-swagger-plugin');\r\nconst apis = require('google-proto-files');\r\nconst path = require('path');\r\n\r\ntools.protoc({\r\n    includeDirs: [\r\n        path.resolve(apis.getProtoPath(), '..'),\r\n        path.resolve('./test/protos')\r\n    ],\r\n    files: ['product.proto'],\r\n    outDir: path.resolve(__dirname, 'generated'),\r\n    outOptions: [\r\n        swagger.createSwaggerOptions({ outOptions: 'logtostderr=true' }),\r\n        tools.generators.js(),\r\n    ]\r\n});\r\n```\r\n\r\nOr with the shorthand protoc-swagger-wrapper\r\n\r\n```javascript\r\nconst swagger = require('@accility/protoc-swagger-plugin');\r\nconst path = require('path');\r\n\r\n// The .proto-files from the package google-proto-files is automatically added\r\n// to the include paths since we always need the REST annotations when\r\n// converting from .proto to OpenApi.\r\nswagger.fromProto({\r\n    includeDirs: [path.resolve('./test/protos')],\r\n    files: ['product.proto'],\r\n    outDir: path.resolve(__dirname, 'generated')\r\n});\r\n```\r\n\r\n\r\n","readmeFilename":"README.md"}