{"_id":"nodehandler-utils","_rev":"157-e2d71f6bf422dc711e4d6ff0f42ca928","name":"nodehandler-utils","dist-tags":{"v4-next":"2.1.1-4","v4-preview1":"3.0.0-1","v4-preview2":"3.0.0-2","v4-preview3":"3.0.0-10","rdpp-feat-4940":"3.1.0-rdpp-feat-4940.3de41a.0","rdpp-feat-5235":"4.0.0-rdpp-feat-5235.b37758.0","rdpp-feat-5162":"4.0.0-rdpp-feat-5162.b48298.0","rdpp-feat-4918":"4.0.0-rdpp-feat-4918.d87e6a.0","swagger-v2-preview":"4.0.0-swagger-v2-preview.7862b0.0","v3-latest":"2.2.13","next":"4.3.11","latest":"4.3.11"},"versions":{"2.0.1":{"name":"nodehandler-utils","version":"2.0.1","keywords":["amplify"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENCE","_id":"nodehandler-utils@2.0.1","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"dist":{"shasum":"c3c75bc9cdcaa8931caf254cf986915a4fcd6b04","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.0.1.tgz","integrity":"sha512-YVJ/3q4taoGk1j++ZCmoY+oRwEmK1654yzlQ2W13htIN0E0WN6L8KpKJL9EYny9ul0Q2QwIXcPZV/OjpcoGThw==","signatures":[{"sig":"MEUCIQCG07AWT0R6tzI9WXNxHNRo46Ny0bp5qMqIwn9FCcKSMAIgYHoGgmgoYUNsXaaKC15hlK2ilinyCOSFZm6qTzEl7Jc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":"nodehandler-utils-2.0.1.tgz","files":["dist","README.md","LICENCE","index.js"],"_shasum":"c3c75bc9cdcaa8931caf254cf986915a4fcd6b04","scripts":{"test":"rimraf coverage && rimraf .nyc-output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary node_modules/mocha/bin/mocha --compilers babel-core/register ./test --recursive -R spec","build":"npm run build:dev && npm run security","clean":"rimraf dist coverage .nyc-output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && rimraf .nyc_output","security":"echo '[]' > scan-retire.json && echo '[]' > scan-nsp.json","build:dev":"npm run build:lint && npm run test && npm run build:dist","build:dist":"npm run build:readme && babel -d ./dist ./src","build:lint":"eslint .","release:npm":"curl -X GET http://registry.ecd.axway.int:8081/artifactory/local-npm/$npm_package_name/-/$npm_package_name-$npm_package_version.tgz 2>/dev/null > $npm_package_name-$npm_package_version.tgz && npm publish --registry  https://registry.npmjs.org ./$npm_package_name-$npm_package_version.tgz && rm ./$npm_package_name-$npm_package_version.tgz","build:readme":"node-readme && mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && rimraf README.hbs","security:nsp":"nsp check --output json > scan-nsp.json","release:major":"npm version major && npm run release:publish && git push --follow-tags","release:minor":"npm version minor && npm run release:publish && git push --follow-tags","release:patch":"npm version patch && npm run release:publish && git push --follow-tags","release:publish":"git add -A && git push && git push --tags && npm publish","security:retire":"retire --exitwith 0 --package --jspath ./dist --nodepath ./ --outputformat json --outputpath scan-retire.json","release:prerelease":"npm version prerelease && npm run release:publish && git push --follow-tags"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"_resolved":"file:nodehandler-utils-2.0.1.tgz","repository":{"url":"https://git.ecd.axway.int/amplify/nodehandler-utils","type":"git"},"_npmVersion":"4.5.0","description":"nodehandler utils","directories":{},"_nodeVersion":"7.9.0","dependencies":{"json-refs":"^3.0.1","capitalize":"^1.0.0","axway-schema":"^2.0.0","json-pointer":"^0.6.0"},"devDependencies":{"nsp":"^2.7.0","nyc":"^10.2.0","chai":"^3.5.0","esdoc":"^0.5.2","mocha":"^3.4.2","eslint":"4.3.0","retire":"^1.3.3","rimraf":"^2.6.1","istanbul":"^0.4.5","babel-cli":"^6.24.1","cross-env":"^5.0.1","axway-flow":"^2.0.0","babel-core":"^6.25.0","node-readme":"^0.1.9","simple-mock":"^0.8.0","babel-eslint":"^7.2.3","eslint-loader":"^1.9.0","babel-istanbul":"^0.12.2","babel-polyfill":"^6.23.0","jsdoc-to-markdown":"^3.0.0","babel-preset-es2015":"^6.24.1","eslint-plugin-mocha":"4.11.0","babel-preset-stage-2":"^6.24.1","eslint-plugin-import":"2.7.0","eslint-plugin-jsx-a11y":"5.1.1","eslint-config-axway-base":"^2.0.0-0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils-2.0.1.tgz_1510763182228_0.8361690032761544","host":"s3://npm-registry-packages"}},"2.0.2":{"name":"nodehandler-utils","version":"2.0.2","keywords":["amplify"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENCE","_id":"nodehandler-utils@2.0.2","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"dist":{"shasum":"fc8736ded8018392aae68a8707b63b49ffa3ed3e","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.0.2.tgz","integrity":"sha512-Ba0511fICv4+G3va0sCWyZkLy+7UYa/qa1BiAIxUW0rZSOZMjKBDHAcN8P2OnhaYQ/ak1gXnrt2tyZDOPd54gg==","signatures":[{"sig":"MEYCIQDepwsugphcNl8tpNORkT+6zyjaf9fuN6y56Db/wHRzkwIhAPSbjM58Ur957+4cdBvMyupBqR4SaPckxgfS4CR7IA9L","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":"nodehandler-utils-2.0.2.tgz","files":["dist","README.md","LICENCE","index.js"],"_shasum":"fc8736ded8018392aae68a8707b63b49ffa3ed3e","scripts":{"test":"rimraf coverage && rimraf .nyc-output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary node_modules/mocha/bin/mocha --compilers babel-core/register ./test --recursive -R spec","build":"npm run build:dev && npm run security","clean":"rimraf dist coverage .nyc-output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && rimraf .nyc_output","security":"echo '[]' > scan-retire.json && echo '[]' > scan-nsp.json","build:dev":"npm run build:lint && npm run test && npm run build:dist","build:dist":"npm run build:readme && babel -d ./dist ./src","build:lint":"eslint .","release:npm":"curl -X GET http://registry.ecd.axway.int:8081/artifactory/local-npm/$npm_package_name/-/$npm_package_name-$npm_package_version.tgz 2>/dev/null > $npm_package_name-$npm_package_version.tgz && npm publish --registry  https://registry.npmjs.org ./$npm_package_name-$npm_package_version.tgz && rm ./$npm_package_name-$npm_package_version.tgz","build:readme":"node-readme && mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && rimraf README.hbs","security:nsp":"nsp check --output json > scan-nsp.json","release:major":"npm version major && npm run release:publish && git push --follow-tags","release:minor":"npm version minor && npm run release:publish && git push --follow-tags","release:patch":"npm version patch && npm run release:publish && git push --follow-tags","release:publish":"git add -A && git push && git push --tags && npm publish","security:retire":"retire --exitwith 0 --package --jspath ./dist --nodepath ./ --outputformat json --outputpath scan-retire.json","release:prerelease":"npm version prerelease && npm run release:publish && git push --follow-tags"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"_resolved":"file:nodehandler-utils-2.0.2.tgz","repository":{"url":"https://git.ecd.axway.int/amplify/nodehandler-utils","type":"git"},"_npmVersion":"4.5.0","description":"nodehandler utils","directories":{},"_nodeVersion":"7.9.0","dependencies":{"json-refs":"^3.0.1","capitalize":"^1.0.0","axway-schema":"^2.0.0","json-pointer":"^0.6.0"},"devDependencies":{"nsp":"^2.7.0","nyc":"^10.2.0","chai":"^3.5.0","esdoc":"^0.5.2","mocha":"^3.4.2","eslint":"4.3.0","retire":"^1.3.3","rimraf":"^2.6.1","istanbul":"^0.4.5","babel-cli":"^6.24.1","cross-env":"^5.0.1","axway-flow":"^2.0.0","babel-core":"^6.25.0","node-readme":"^0.1.9","simple-mock":"^0.8.0","babel-eslint":"^7.2.3","eslint-loader":"^1.9.0","babel-istanbul":"^0.12.2","babel-polyfill":"^6.23.0","jsdoc-to-markdown":"^3.0.0","babel-preset-es2015":"^6.24.1","eslint-plugin-mocha":"4.11.0","babel-preset-stage-2":"^6.24.1","eslint-plugin-import":"2.7.0","eslint-plugin-jsx-a11y":"5.1.1","eslint-config-axway-base":"^2.0.0-0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils-2.0.2.tgz_1511287923671_0.22176985279656947","host":"s3://npm-registry-packages"}},"2.0.3-101":{"name":"nodehandler-utils","version":"2.0.3-101","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.0.3-101","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"1f16b3236528fd029f4ed57a427a0443f674942d","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.0.3-101.tgz","integrity":"sha512-ZdsO2rJ3EQvDp5CxurOFBH9hhMJixL28XB5RfFt2QKwmBmLOzIN3Iu7xA1p94XiDOw3C10uBugf5sLpevkj3VQ==","signatures":[{"sig":"MEYCIQCvDhQel7eAMo//Lf9iNM1bJWX7vFBY2sMZMnJEBN8zygIhALGmCtGx+03exVEmQsj/yvJDFOI+LCE+24Q5HBFN7lu7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","files":["src","README.md","LICENSE"],"engines":{"node":">= 8"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.0.5-101","json-pointer":"^0.6.0"},"devDependencies":{"axway-flow":"2.1.0-101"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils-2.0.3-101.tgz_1517849256610_0.3979902481660247","host":"s3://npm-registry-packages"}},"2.0.3-102":{"name":"nodehandler-utils","version":"2.0.3-102","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.0.3-102","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"f978eda7a6ac4f95988e7cefed20a2990dd8310d","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.0.3-102.tgz","fileCount":4,"integrity":"sha512-Tby0t535jC70KFn6Y6afIty3e62+lTBc+rMwBdKaDxd2wwT1xN/MjhMXNhzg/sU7p4D/szt+qD7YCs3aAPn99Q==","signatures":[{"sig":"MEQCIHHbq5xIBRsEWNVW6/5CfrXjIWhY4upaeVxdYFX7VVsQAiBFK3fnLBkcZfmWBaltwg4J+1wdn8bbK6qjh8kjdo8+Hw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26078},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.0.5-102","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.1.0-102"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.0.3-102_1518531197471_0.722884824300495","host":"s3://npm-registry-packages"}},"2.0.3-103":{"name":"nodehandler-utils","version":"2.0.3-103","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.0.3-103","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"7115dcfd5966d295574b5ddf748933e2d564be76","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.0.3-103.tgz","fileCount":4,"integrity":"sha512-+ldCD5uOte/r5hXiQ+pmMLDQnLTLve4nPf1l+TzfYxntmoZGlJBzlLfRGu37aSPU1ELyXN+SMmHpabYz6MzK3w==","signatures":[{"sig":"MEUCIDE5sfv4zsJPAETX+0ovuYQjouQUj8jCvLALBw6cWXNjAiEApYco2Bg1JJuf2RLQrU1bF7RCOnSITsBqoGACQUofe1U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26078},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.0.5-102","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.1.0-103"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.0.3-103_1519063299511_0.16790433064010402","host":"s3://npm-registry-packages"}},"2.0.3-104":{"name":"nodehandler-utils","version":"2.0.3-104","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.0.3-104","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"72c267b00234b594ff17e32b1f5504b12e9121f2","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.0.3-104.tgz","fileCount":4,"integrity":"sha512-oSAJcgBV1o6uPla9pwjwAYF0E+lTXDgPPsiyhA8Hi8Hp3q9QUEBDF4Q3QinOXCVQSXRKBsRu4sWdVwEbQJkquw==","signatures":[{"sig":"MEUCIQC3ZrqDyKc/KYQ4ceXrczTXDua1uX5rEjRYdBSPyapCUAIgXBG9dMsfFaTXLZyg9rE9mXzG4rNWEi61dkfGKEvmPh0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26078},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.0.5-102","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.1.0-104"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.0.3-104_1519226004298_0.4797949836983211","host":"s3://npm-registry-packages"}},"2.0.3-105":{"name":"nodehandler-utils","version":"2.0.3-105","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.0.3-105","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"ab7c2018c45155c562f1246af67260437db17eb0","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.0.3-105.tgz","fileCount":4,"integrity":"sha512-2dJoWkNovkHUapTvngvxOSbTCcA8Y+KgcXjCvM1rb8gT2ULqZV0g4M2mIWQsZLAUnUAuzm89O0q36GNK2bDJVA==","signatures":[{"sig":"MEUCIQDlMdrhBUuvsLc/4T5H2AI1ufIYKVyPUnFAOHhzK6Ni1gIgVXBSIwPCSUjEkFRx2jh3/wpFkjOX0ELkDqvzYPi1TH8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26078},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.0.5-102","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.1.0-105"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.0.3-105_1519248631991_0.5177043340615239","host":"s3://npm-registry-packages"}},"2.0.3-106":{"name":"nodehandler-utils","version":"2.0.3-106","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.0.3-106","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"83453c47e07de821a9cd443336a613630f0625f6","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.0.3-106.tgz","fileCount":4,"integrity":"sha512-1xNdjsGBfe5pvtRsf4F6F3Ioewm3HfFzPp6MflKjhk8AmZ9pNkyKRziGcg9zul2r0D40glZwSv6bL+atK1Zx1A==","signatures":[{"sig":"MEQCIH5/okXwWQVYYbPOmkEsyoSYvQ/CrSf3ou/8k17yXQDkAiAQb9etX8lFMPNfvVkK3ix5aIgiQSmgM2JVQ1L9LyX9wQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26078},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.0.5-103","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.1.0-106"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.0.3-106_1519274316248_0.3724577024659783","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"nodehandler-utils","version":"2.1.0","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.1.0","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"20f0b39a8931976be0e1d30e366d8fad2a60f65d","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.1.0.tgz","fileCount":4,"integrity":"sha512-IvwfSJHCQwybL949tBEYQEUzGLqvflGHReJV0Gk6sYZRQqJA9YGtCqdneH1Cemcr+vPWgpvOrVkfGTcnW96Yxw==","signatures":[{"sig":"MEYCIQC0nw0zT9rNgdjh4ZUWZIa/2sWvJ6v8MEyMgk4suYRtjwIhAMXD7eqjBs92DLWBqB8N4bADI4t21yBeBvnU5dhBXZZq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26068},"main":"src/index.js","files":["src","README.md","LICENSE"],"engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"^2.1.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"axway-flow":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.1.0_1519323978855_0.6830494531437892","host":"s3://npm-registry-packages"}},"2.1.1-0":{"name":"nodehandler-utils","version":"2.1.1-0","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.1.1-0","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"0bb1f92535548736bd83da86ace9b73594f3c6a1","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.1.1-0.tgz","fileCount":4,"integrity":"sha512-4So6cEApA3TsWQesWJq8r9WlFN5WjVJbKK6kpZ8QGX2EeRfyjhO7KtXrzdQ28PMUnKZTchzMWNC2+W5VpWE/Pg==","signatures":[{"sig":"MEYCIQDM5EIcMmSKZiXc/Gy2Zu8tAqJs52lERMONWzncZySfLQIhALaDq1dT1+jDl/u+etOXJ+7ybdmVklWWy42LlqM/e4o/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26125},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"^2.1.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.1.1-0_1520507677012_0.4094064921513687","host":"s3://npm-registry-packages"}},"2.1.1-1":{"name":"nodehandler-utils","version":"2.1.1-1","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.1.1-1","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"d1d94cc3bb800ef318675405f4433c1f7f435242","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.1.1-1.tgz","fileCount":4,"integrity":"sha512-VGpe/G7Uqoz9PoAm06d/6gyTvxAz2J0BfVPFxTw2XZPNtK15MsqbTIDx9FwczLNTt99FO8k+h81NEk1rxvUCkQ==","signatures":[{"sig":"MEQCIDqx96rp4AppNJasfhqdbqfCSbafJa38IdmVTW3MJryhAiAfHLwmaimclp/A998RKoBoj/W4htuxv3QUbSp02jqHbw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26136},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.1.1-0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.1.1-1_1521553936018_0.8195462276714351","host":"s3://npm-registry-packages"}},"2.1.1-2":{"name":"nodehandler-utils","version":"2.1.1-2","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.1.1-2","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"4d91fcba92ce61fef55780dfa057e696a388aa24","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.1.1-2.tgz","fileCount":4,"integrity":"sha512-Z3nzNC18Yas+SpRM81G9VYs3Mguf+zAg8FxjYDYPM1bOpeZCEw5Z6A9VM0By8GFmKVF8A4+zg7u/L6q05ekTXQ==","signatures":[{"sig":"MEQCIGXxbJZbqgRdDSz0RoZYTZYuDsRskIr0PayWJgtLwWsEAiB7YbPtFx9tL2L7AKK3R828uO8UgVYPDOBa1XbEXR1W/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26136},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.1.1-0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.1.1-2_1521635868796_0.2722933135954033","host":"s3://npm-registry-packages"}},"2.1.1-3":{"name":"nodehandler-utils","version":"2.1.1-3","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.1.1-3","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"f21b677cf3dae3f3606e6b4f91ffcbff415147e4","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.1.1-3.tgz","fileCount":4,"integrity":"sha512-tnyRxlbsVjxI86Y/EQ4Tbc/cQT7505iYj7N8GlSf9mqp7lt/CY6U7OI0B8dW5RPAhZuyvW10JpSf6K/9LzlR7g==","signatures":[{"sig":"MEYCIQC/hFoEzT+CH/C5+Mf5OZl7eXAg777WIdlI79agKRSt7QIhAOTOFdj8xzH95qzoBuPuAVZLV5s6/mcMEyfXqN+P0tFq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26138},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.1.1-0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"^2.2.0-2"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.1.1-3_1521841634817_0.5676276892897167","host":"s3://npm-registry-packages"}},"2.1.1-4":{"name":"nodehandler-utils","version":"2.1.1-4","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.1.1-4","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"63edde1b5d969f85df2f37c763296b248fda1b14","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.1.1-4.tgz","fileCount":4,"integrity":"sha512-JkHq3/fcbfFnd1tj/oAAWg/kIvzT2TLFH96DD5PXj6UnT8ta05vveO/9rsZfeHhdfd7/x34kSwoTsObdp4T3cA==","signatures":[{"sig":"MEUCIQDO8kVTi7PY9yhn6BpRE+xzgcI39i+yO7Ylh5ZECE0ODwIgVYFnf633apj1OahayCdxJLMBYfXWL5bIGUYrxkWQY80=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26137},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.1.1-0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.2.0-3"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.1.1-4_1522157652595_0.6119335631764156","host":"s3://npm-registry-packages"}},"2.1.1-5":{"name":"nodehandler-utils","version":"2.1.1-5","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.1.1-5","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"a64e83ae31aa1d5d6306d78326df819c89d225dd","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.1.1-5.tgz","fileCount":4,"integrity":"sha512-KraNUdEYTuqm7+6Z/8xT/pIszMC52kf5KarV5q1L//e+JJmnX5nnAQxvYC155mqCHCXzYKK5gF1VdGv23AFQBw==","signatures":[{"sig":"MEUCIQDjpoDSN2m+XOf+OWAOqFmFeUshqxXdIGIqRhfPNHXpnwIgS1PNskqc4ITgZhit8yyxwaGSkMhNz7MV88u4wVY1Ir8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26148},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.1.1-1","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.2.0-4"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.1.1-5_1523458249887_0.2005537364535861","host":"s3://npm-registry-packages"}},"3.0.0-1":{"name":"nodehandler-utils","version":"3.0.0-1","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.0-1","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"23953b7a1ed3ef111b767736b9e7febc36fa8c99","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.0-1.tgz","fileCount":4,"integrity":"sha512-drm9L08ibjMtIjOXpDnUnkj8eG3TDXwv9MTnXi0xxvrdrVMFQvoOlvu9URkYB1lkAH6aaubosTJmNh8Z/XN0zg==","signatures":[{"sig":"MEYCIQC0BgA/fyjijzl9AZFzQ9yQptUeXJBV648LI92RxOQELgIhAPyEfFbqR3dtQPFkQ2lARyhKlUmeFxgMEshHsCosIOeL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26148},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"3.0.0-1","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"3.0.0-1"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.0-1_1523531960621_0.64557512684208","host":"s3://npm-registry-packages"}},"3.0.0-2":{"name":"nodehandler-utils","version":"3.0.0-2","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.0-2","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"df43f344ca890921c7a80103b2058167c239da4a","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.0-2.tgz","fileCount":4,"integrity":"sha512-/IUoIE26X+aX/uCSrtA8kpcDM3rnHkoP1nzvyn9YUmuU2Ni89fCZY617gYJHV0t2lOM8Hcnb+QQeYlQ9LJUUdg==","signatures":[{"sig":"MEYCIQDY24a9hVT37mamXdD2s5Syg+CBp7ycVLvujccIZwZJBwIhAPkaffU5/JI8069Mw8LxjNkKyG57e8+0pcyf4MydBnzZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4LJSCRA9TVsSAnZWagAAzvMP/AhsPIB2mnsOW23olWWn\n2+EEp954P/NQb5yfYceZBOljgYFP9vveWTPQfHM/0o7pR0ZTjYfSGNlNcdtB\ndlkXeU6i2NBnL12tgcpwz7IgsDITfWwFQUL7bW1YVnXJMBAtw3fbGYaJ9dE+\nLspeDDBWJFeuppRKnPvJKBI6k9eXCl9E6qTyspGPZ8CVqH66xin7hAESV2XW\npLNS3ZZsuZPGlJHrwCMc/ONuB+UFvOWzxMG3drk0YtDj1LyR+XK82koYHrJZ\nHBPvSJPqocZOMNwVHGaHNqTFP4hB4ksQPr3w1s/SHaUpUqoKwNOz6LNHXQwx\nW0lft+BCBBu6IM08+LoDnQd5YhRN6fIJgAtRBiWfXmh+fSuq+zNSPYOHc/8X\nQIbSBUBFdFvHLVpEko+QKIgNXl1fkzSzIHWi3m/INT2iOmXAyNpT/Ap/2c5J\nW66Pfkn6y11htJlBOEQVlHoiaus+tBJXSLtfi947C7DA8dj3Ck8kGUo9yDIH\nN6eFn78Kp8uRQct32NkMMbxnBhN3vjBUES3FHPMO9C8QP6aECdh6sltwJytI\nhq0Y0sPqyM/o3WxSiyLlXR8oxzy3UZd+2j9MlVOW7c0pJm1P/luvvCnYJq8q\n3aTccJkEcXPTkBiKCXWS2XD0eAQWE1PzSwTqMVpp2Q7zILnUbqA25gC6EC+6\nTUKi\r\n=NUjh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"3.0.0-1","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"3.0.0-2"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.0-2_1524675153615_0.6389576097076515","host":"s3://npm-registry-packages"}},"3.0.0-3":{"name":"nodehandler-utils","version":"3.0.0-3","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.0-3","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"bbe83d6409768fc0fc2d798272a852a042024c24","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.0-3.tgz","fileCount":4,"integrity":"sha512-77lt5dKTlF78SzRSPylx7jHEk3td0qspqbq6saKlCa0PnVES3S2X8dwjUNu4HG0DvKJ87v9zTHh+/b9fFJkZrQ==","signatures":[{"sig":"MEYCIQD7RIe+HSco0Rrx2RITSjs5V2txu0pywJcYQqn81fMQqgIhANHqtmlVa9IDrX1Grgyhz5L9YtaloghnUVFtgv+Tz3kF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa9AjtCRA9TVsSAnZWagAASBwP/jP4ieOaw+uaKJIhnd67\nHYJ68emj5fMIbbDN4mNMWdrfs4s8cs7Ou4lOw2Ywyw1UDE7ZUuWr+Avq+//3\n17d6y3w7FqJyC0dN+r+H+VHqAOZ9lWD2LMQXFOGRpKrF3fa2WTuOcHA9GDWH\nf1xJzQEfwVEYVTnRMZFrNbxm7BpuBf3aYJ7JPm7aWqiH/zI+KWUBnjDaRvOl\nf63BuNt7yQixczsX2mwBHcVCijwCsff6klPoyOOSbW7zm9sg2xeQUrBn9Srd\nYsgAg0+R3bA8AVsx28qypX4os31n/4bk6SpXpgNYjGweiS5FkF103prB0XJP\nDAUgjpuHBoBjniFcOaOM3h7JNkFq6u8Yx/FZ33NI1YJCk6hhAgS5AOcmvRf+\nwY6kOCOF9LSbEzAG7Y3H8eqk1GqoGFjs9ROuA4CvXl2smt0Cpgv+9GdaRFMb\nssodBbbsvFqwkI5wsMz+eeLsJ548CBLVCImaZ7c4G6UJRi4Y77gfNlq5rRxs\nqR/gGU43oQZPnuQvys3MqKsEc2vs0zN2wfh/2AZ+rMTAJkApv4xQNND8Owvp\nuwGqu+abX9VXmmfcXJGVWL5TehNYpH56FyQ2ndyMUAJ9u8cy8jFhwbK4wOvN\nUbo/cszdklXSGzyEyLOKO9NT+hmW3elZ4f+0QcYqMcbfC55imo1KAwpuYrad\npnX3\r\n=Iqqw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"3.0.0-2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"3.0.0-3"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.0-3_1525942508682_0.905862686464904","host":"s3://npm-registry-packages"}},"3.0.0-4":{"name":"nodehandler-utils","version":"3.0.0-4","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.0-4","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"b2951bf6dd1e4af52f34183d3e840343741add86","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.0-4.tgz","fileCount":4,"integrity":"sha512-+M4OXyahwk83uO41xv5c3Koq0m0sq7HzhFb2MSPDF7PkbP4h9FsncZ4gu8dHmvDhFda4Cf3upcE/FTkq5ob3Wg==","signatures":[{"sig":"MEUCIQC9BWH5mCq/KimYJNiE6pdMb6GwLC72olgDuqPW43bzBgIgLd/LNbSLjPOcl5G1YMHKjk8fLY3+Mf5LgeZzZDEtCws=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBv4gCRA9TVsSAnZWagAARykP+wcoalFUu7tPFW1n+LD/\nyUoF5yWtiLsQBJ3v1fuahxixeXdY2WGGO4x5m05/Wxn2cHVwVtWF+gdGtT7w\nYJFmbAcKOJNh4dv5/GhvRIALM+eerqaqy76OX3BiQIsqo0d4ziZbXIXUcA/4\nVvwNIWF6gawzUVXKu1axnl3FJ/zE29lO5AJjXurvKclPj8IgGmLpLUoC8RMo\nAySyMDcwO7XvNKJIb/6Lt/vS/ZJOopD9391Ln302Yt0vijUqG6bKnmOeVANe\nqgQtZ1V91aqws42r1BMTvQEt2NEZbEeLGcj7NRfh2k6WDZRVV2qP9dqiEwbQ\npUGaMZ7pYddhyMZmMY1YNR9bamvO2xEafIjMezHHLLdGRtj0fwe6hezpQCKX\np0RTTug4MbjOiqKSVZTN7/QXgPtB0PjwdWD9Tilq5Vu45B8L1OAjQfaP5wRW\nYeBxezlZo8BLQQbkOiCpGvs4guz7aLTR1h9nHfKB0DxCixAYDYhgbmib9yHS\n+4Lmn6Nc1lUgKMjG8Wf6KCETjkC6DW40E+Pqb3AqHRPqKcDscEc67icdfrRH\nGuqKGZTfrUoDPp9kPoox34C+bpERYqoUhP30qQT7oAf7rX377IscwHD2Uw3G\nQO/YLDsIeckFMr7dQT77+jqZRFur3oeUzKWYYhZLvh7qZG0VIZLO7hxwVFQ9\nJI0N\r\n=p8KN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"3.0.0-3","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"3.0.0-4"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.0-4_1527184926107_0.6577508113224213","host":"s3://npm-registry-packages"}},"3.0.0-5":{"name":"nodehandler-utils","version":"3.0.0-5","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.0-5","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"a7645b5f2ec48c7d7533e625f72da47ebf1fb4b0","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.0-5.tgz","fileCount":4,"integrity":"sha512-OyCbUgNPvDRyRCcClORA11ilGHxlcr70505hKVF1wM+2VesO06nnlDqOpWidE3t5lrvsHegNUSccqz7xmFS/dQ==","signatures":[{"sig":"MEUCIHzAbebYuyXjD0N/NW66oeiSFJuPVxkFHFtyxceul7/KAiEAljKsksimGz5uciE4zEjxToYyv7MTVEOAm0UI4Q1VsjY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":63223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCDUZCRA9TVsSAnZWagAAY6MP/AzrBrTpozviUT0hDMiZ\nPP0ovDN+xrKwaAAekyx3dzZlN7xuJF/w2As3zCLo3NJ3A+BAgEg1JTxR44F2\nRiClu2qpdg1qRD0E574rHLSzBgbSsInOkMk2V9TJsff2hboC1bou5inaqcDO\nQmYVuihNP/9iHftD9UeJdcOuGxhrb+ClE4gG/179L5gii1HpzhQyyR8RjExv\nWbBEG3BxZto/KjFcCvBBFEmsKvD5qR1i/rZowcxoI6UWy3VL5OS6fLc6ROWY\n/7aKfZN85REhlIHBaxykSGx7yNrXlgX7jp8Sc85j4n/k8DqVwbGI9XbZu71b\nzFGk6lLsCXs7M2a7jx7X8Y+83zaEUyCdwLF3MGUCSBEcUfPhGCf2ktXABjBE\nMYCTM/NZ0HZyZBcmHkW2qpJlgrW/aeZqLFZoYMeUOafNRSirvLO5tWMedPmh\nrjnBJ60SUcbVeGPPuEJ6VRkaFKjIZglm9SC6dyCRYlCCx7JLOy+hLJPBvBEY\nH7tXH+r7a6QTcxJqM9cnlIUe/ks/SVpyvpATPCsUohTNUiLGD5Og/7FYQwhc\nbRq8r5FF4uImAt7YZFfCLSNVqvhltTCj9CV1+1CR5ysbSkOSWrzWNg0mbbcr\nzOoB1AokLGJimBWK39qcTLLN7MIqbbCWOiYR4elVZCNVzgpRVxu6CXhVb4X0\nzgAA\r\n=V+7s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"gmatthews@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"3.0.0-4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"3.0.0-5"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.0-5_1527264536647_0.5687077957401669","host":"s3://npm-registry-packages"}},"3.0.0-6":{"name":"nodehandler-utils","version":"3.0.0-6","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.0-6","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"8f323b176f881a46adeb0348b99f3b61f16258cf","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.0-6.tgz","fileCount":6,"integrity":"sha512-rljYQtnIHqP/oIkei78x2tpIsBfjTHbGnccOy004XD7fFFVkRP6NAI/NmwqLEciJZiLgL4A92DCVwIuCu3XaVw==","signatures":[{"sig":"MEYCIQDluPdGl5xuWLt2hJl0uEPVGi5/b9D2tOQON3PzhVB+OQIhALZtnNPVloHJRo+XKebTmjJOVYH9RaIE3ikJ9uHdm+vj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHRW3CRA9TVsSAnZWagAA1lkP/RNHDKO4KmisitdYJvl1\nQ0FQkpu2h22uMX1VeJSqa6UR7vIYL8nkkuH77tKl7Ms5EkSmx6aImUNzHIge\nIh+91D6v9/9iG/2eUGOhJrxhrkAtgw9PI2AGxZqJHXQ37jQeCqUuE/tKbmu0\nGswf8L/+k1rj6wWva3PHV7zbGYylvB0qlz6wMFAixrX5P8cPtkcCgQNlo9GT\nyWY8i8Aj9BOdOZsog9/kH31TmwC5rhF+kM4vOAx1jVkMNSWv+DEEVt28wz4M\n+6cpxYKSR4ILiWJSSQPwtLbvELE3HCQpXzpXQrtGlBMQV3mVJ16GgZ1tMkyR\niytdcSSg/fXnc6ide7vExtZ6dwrAi6uUgsUcG4tRvpvGaKMOBGDFSz99FVV4\nOFEqyJN9n/gS9c0eC2IB4XRNPQWp71cVpN2q5YHQ9aAGqQzDvVtSuN0PcgEg\nlkKHen0gvMPPzgnH0vS7QAZOT3M8V+RwOu1aRtsy0CfJlH5sFo9ZVwoQ8YYA\n67p8EtvqodABRNLdviNSNv7NPhu5m0mjvQglmLEEdLpL5T/FY3R5TY5oyG7+\nu/Ut1Bm5cnlbTkXunKyKR5CJoPMjZ86c+x2jKMrOuYGx1r87dLj4DivBiYVY\nEb1R74LtFn6/EX0l+VHR0R9MaeRWHGDPuSqLBbiVCkqjiWdyo/PSTD5qKjjF\nYZPz\r\n=Kw/N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, name) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"builder11@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"3.0.0-6"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.0-6_1528632758411_0.404472948158489","host":"s3://npm-registry-packages"}},"3.0.0-7":{"name":"nodehandler-utils","version":"3.0.0-7","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.0-7","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"2ccddb49dd24c7652e5783b688fb0189d8ee2440","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.0-7.tgz","fileCount":6,"integrity":"sha512-SbBXmv40UsNds7v+4hcv0ecbxAkYQiQg7l8PdUZ8Ay3UnyHVtYFbE1EcYU0Fe/OYJpZ+r0e+fbcV1bxogzkliA==","signatures":[{"sig":"MEUCID0vRtM+VWtvggiep82AdpPVnoHPTNjsTy9pB/juPod2AiEAiMYWCB8c2QzR0gA6n8svgcL8sgbIRC1oYe+OGeOVJt0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbI5x4CRA9TVsSAnZWagAAHmQP/0134hktW2ugGDiM98pj\n+1w1NYWNtEcM3u1boftJm0voHZiQFc5/ILDhGB53jtFtGrHEOzppq7Qhj/RR\nvLnXPprMCpYrrkL1aBcKxu8V0a4UrZXjIJepTx6gElAzUfKau/nYjR6rDG2k\nDrDF/cwOHcZP14J4S36KmZN3ERvicMCtvSVmi1KNkwlZQ9xo9mx29xDOb9BF\nnUGu1SqXPc/d2XjJ67FrASjs94E/iVaCSXKlY6ez+HJqHS+9zG+TaDRA6Z2I\nVxP3PYiu8v8dXOc+KJeYMaQ/3fC7iIyAeBBehWpFrOzE075ZHddyFBjpOixd\nOetIfUjSx52uK5dD1xHaqgQZTN4pudzSdenZwJhd+11zl5K6cnKeXdVjhygK\nszcz83m1yLuLH7umc13NxXfTPy0Z8XFO/we9sbWntP3QsSHgaMSwyGiRkw/u\n/+VbN82/ujLh5II86WHengMJHEh0pEDLClx/WLa69c5CdikuqlOIw/0GEkLt\nq1BzvpPASLOU0VHWG4R+BURl8x2Jbn3wZNbG/W307ymUNvYJzPpWxQuzvble\nE3vUkISRC374oI8awBKvvwhMWSp6EtHaO79zkjkrOYWAEpoZp62KbHkpbRQx\n/+GH04yAL6kTUK9FSJ45hDDYoQwZZ4hzqL8EEH0eqflTMWiiO0JwWzfp3lB1\nD8fw\r\n=1lsJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, name) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"builder11@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"3.0.0-7"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.0-7_1529060471599_0.5566517982487615","host":"s3://npm-registry-packages"}},"3.0.0-8":{"name":"nodehandler-utils","version":"3.0.0-8","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.0-8","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"45ce8f0bc9e8aec5088acdf42d0eb011a8d537fe","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.0-8.tgz","fileCount":6,"integrity":"sha512-oiMHvxOgUsZac9bk6uo/+XbAh+QnHBiei/4HLKGm3k2hEJI2Jt4TT9IVQH5sGVoc0hEhi0R68x1bYIUcdqYsGw==","signatures":[{"sig":"MEYCIQCw40V7iRiiZxofA8abQHQzOFzldkMogBr1k1DFseJsRAIhANJCVp73vZHxw7j7yya/VzhLdcm46/wXQqBKkn1uy8Bf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbJ6btCRA9TVsSAnZWagAAUcoQAKOH5sUnWjoNuFEn2TRu\nFeUYf0X0Vr4UUaI6jHx2Qa4PlJeloLsnCMhuX6DLiCkdvzyJrpwhBfu2Qe0c\nUYku0lBEk+DvdMsjrgj0Jcq1qxBECPyx1E9uEisnKSa/A2MkVwsy17YpEt/+\nAy2eNK5m9qPzF+DMyCu4mqW91Yoliy6/1zuV8aLIepUqel1BKYRb8LpeV+xt\nWlErZN5qg8qDB1LYtLvmzDcxNIFptcgWzb11HhObFPPxloL1PoTPW+bihxPd\n75d0NrMLjmNT650xy/CcWxBx5e515bl97CT5fhgcaM7CZTwVmpEE6x4efSiP\nqQG2EfUuD0Nhq+2uQkYkWyxUlvMXQFPNC3ay+O8Ut5FOMQKjD1chkkbXkgns\n8JFmY3YE/GqJFpVvazTmrSYJLWakhrc336KwV5bOyVuk44KEPDbHQB13ZTcp\nuySrxKZsakv9Es+7wIaFO29L3L73vJXGj7jSOtlyY37FmvoGrBaBMMpW8IqT\nLYNJ0xbpLoHi/CnoqSblCQHsBzmChqxJUiJsKs5loz1VKt6D5zcdKuEwKCbS\n9epDtyjbS2KRFUYybFw/y6JXXoPZ/uWItWGW6y4oM2icxzI9zLzllHV5rp6R\n/tiamFeXVJ0WtdQIVllodmuKB62L1d+ew2ukIpkjqWejSHBhBtpo2lUnnIM9\ncxcs\r\n=1B3K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, name) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"builder11@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"3.0.0-8"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.0-8_1529325288432_0.06870822762558126","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"nodehandler-utils","version":"2.1.1","keywords":["amplify"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENCE","_id":"nodehandler-utils@2.1.1","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"dist":{"shasum":"b9e29a4ce849f73c76de23c423b5e52023c82ebc","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.1.1.tgz","fileCount":4,"integrity":"sha512-RrH65LYMFM3QgbwNU3dCJPcjpWo/g95BGCUdGnF1h3AyOxSufXjJUa+/EWIJCPISY+kU1lGAUT8UrwDidMLGEw==","signatures":[{"sig":"MEUCIHnEvxMjhbHtPF9cjR7nTzrZZ0mprvzg7ydYoFJeQdGRAiEAgAVdC2MOGAddxnJkdfTipeDYuR0DZQd0pxauBton2t0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbJ8ZmCRA9TVsSAnZWagAA30kP/0V9aDX1ftfzbbWVHGV9\nBqV/GK4ecSFCZVJAgPX4GN9WGPVvhbADYjTskJ+pSPwAjLQIo2t1NVCDFqkt\n9FKmDNqrNpyIrNh++AQ9KFOnMGlM8NFSjt517ehCGrABO1dC0kQdpB1zrO75\nMjf2+DQOeMLI8G+1ffEuih/sP1gnPvkbFe+gb76YM7iEhTMiBQcr2zDw6E83\n/1AQmk+ZQ41dSAaV8B8XSfDE899KqNOnHDVtlCPjO6Bj8So1Meqq63F/e+eN\nIQ8dUVLuX8O3/ocOGPOBATI877eA/gwGK9k1pfRht0FBMD4C4ynqLI1MR/yK\nl4vk7/MVnmarAUwFrTglcsyHhSvc6trhjhUP+VTdBkBVjGzTNOcD00jg4G2o\nHN020cG28ZF3jXEY02zM5RPx1jvXftjBsU8e4axAO0LVbSibupBLV25ndctB\n8SP19bGV9USyf3q6XZcH+sTrTTkWUtXbUpDFr8UVttdwyNiMmc9UXcGFR6aB\nmr/BMfORdkFvibvthBY9V7xyHANC2uPzdLhWl5tpOy0lMHYGi0rmssX/eRO1\nZDlVGCmliMQJ+MsBn6LskTcPZRlG+zuH2DrSN0shUY6F2UvG2USah29f3N9Z\nujOsrvHWD2RK4yy53YDnL1tEUT/4FCH2rBV17ymGq3mqUDulU0s7P51SskQv\nRYb0\r\n=5Vfm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","files":["dist","README.md","LICENCE","index.js"],"scripts":{"test":"rimraf coverage && rimraf .nyc-output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary node_modules/mocha/bin/mocha --compilers babel-core/register ./test --recursive -R spec","build":"npm run build:dev && npm run security","clean":"rimraf dist coverage .nyc-output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && rimraf .nyc_output","security":"echo '[]' > scan-retire.json && echo '[]' > scan-nsp.json","build:dev":"npm run build:lint && npm run test && npm run build:dist","build:dist":"npm run build:readme && babel -d ./dist ./src","build:lint":"eslint .","release:npm":"curl -X GET http://registry.ecd.axway.int:8081/artifactory/local-npm/$npm_package_name/-/$npm_package_name-$npm_package_version.tgz 2>/dev/null > $npm_package_name-$npm_package_version.tgz && npm publish --registry  https://registry.npmjs.org ./$npm_package_name-$npm_package_version.tgz && rm ./$npm_package_name-$npm_package_version.tgz","build:readme":"node-readme && mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && rimraf README.hbs","security:nsp":"nsp check --output json > scan-nsp.json","release:major":"npm version major && npm run release:publish && git push --follow-tags","release:minor":"npm version minor && npm run release:publish && git push --follow-tags","release:patch":"npm version patch && npm run release:publish && git push --follow-tags","release:publish":"git add -A && git push && git push --tags && npm publish","security:retire":"retire --exitwith 0 --package --jspath ./dist --nodepath ./ --outputformat json --outputpath scan-retire.json","release:prerelease":"npm version prerelease && npm run release:publish && git push --follow-tags"},"_npmUser":{"name":"axway","email":"builder11@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/nodehandler-utils","type":"git"},"_npmVersion":"6.0.0","description":"nodehandler utils","directories":{},"_nodeVersion":"10.0.0","dependencies":{"json-refs":"^3.0.1","capitalize":"^1.0.0","axway-schema":"^2.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"nsp":"^2.7.0","nyc":"^10.2.0","chai":"^3.5.0","esdoc":"^0.5.2","mocha":"^3.4.2","eslint":"4.3.0","retire":"^1.3.3","rimraf":"^2.6.1","istanbul":"^0.4.5","babel-cli":"^6.24.1","cross-env":"^5.0.1","axway-flow":"^2.0.0","babel-core":"^6.25.0","node-readme":"^0.1.9","simple-mock":"^0.8.0","babel-eslint":"^7.2.3","eslint-loader":"^1.9.0","babel-istanbul":"^0.12.2","babel-polyfill":"^6.23.0","jsdoc-to-markdown":"^3.0.0","babel-preset-es2015":"^6.24.1","eslint-plugin-mocha":"4.11.0","babel-preset-stage-2":"^6.24.1","eslint-plugin-import":"2.7.0","eslint-plugin-jsx-a11y":"5.1.1","eslint-config-axway-base":"^2.0.0-0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.1.1_1529333349262_0.6405730010757318","host":"s3://npm-registry-packages"}},"3.0.0-9":{"name":"nodehandler-utils","version":"3.0.0-9","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.0-9","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"dfbbaf30082cd516300ca7242814a2750a2c57a4","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.0-9.tgz","fileCount":6,"integrity":"sha512-Y1AuwfshZtu6jeS+N/yxDXKpNTK88kbpLPG3hklygXwzLLYj6jX1amHeOfiX8nhPwK8z6/ew4okAOVjRqyHl+Q==","signatures":[{"sig":"MEUCICfvhE5LBNPqksvtA9uE6dHGmdj58lVa7g26gHjdeTPiAiEAsqm3jtbjcsELrppjNsRvFHG5Bg4burG3aBMEdx6ZdtE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKinYCRA9TVsSAnZWagAAe9AP/2gczP2brMGYZRhv/2DO\ngevzYVl+xnp2T8LgUQhrbkhaM0UYW5pV2kWAaUOXnFH2R4b/1foBb6xZDFCo\nUBoXoYXwS2oils22HC1RqztZBYRAQ0jVWgUeeTwErqzdSoaRgKgzfYnExBM9\n2k8xX5hyjTYgFJjPHGbRu91GT+nj6fzq0bV7MS9VSVvPRlPjw1cShnWjMnDy\nG5mvm3+PPGDve9Vg70fqYml3xxInTIu3A6WGMp9B8M1i6TTK8A1PP6Ax3i+o\nWRrGIGOZbcJUgZFVdk1SLN5E0pOYk9Ix0nCGtQKGb5u4oF/drQiFr2SblTip\nqGOUQR5CnkxeFiIk40LeghiNb2tlafPJDAz7S3MEMHVEZgFYvYrqhcL7xpCs\n2A5L2AKL8hiCLKrxJ3G9OVcZI26TOEGDBRU1SsmJZ4sNFntq+iMUqqVW+vWa\ngdP5x6wJoa44eGaUYJtBip54CceMoQH2Ljn5nVjRyak0qA28aAMSkoaJFqlX\n5z4j92NHwn4yXbnXz9dBQyZo6n4JBx8/PXXTKl0JXMZ62Ddl0Rr535y6S83x\nG5SBeN2+Ljmy30ub/PqsHoQtc30mHKIsH4CioflYCPJY9OZv7IGEAYyy677A\nESwv0EwGAhXkSIyAi1CIJw6K4cO3HMQ6pDyt6pvRKc8e+RV2Tq2asE32Lo0v\ngCrZ\r\n=gpeG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"builder11@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"3.0.0-9"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.0-9_1529489879260_0.18327855236319257","host":"s3://npm-registry-packages"}},"3.0.0-10":{"name":"nodehandler-utils","version":"3.0.0-10","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.0-10","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"c0426bdf59a430ef159989e96be4f20112759359","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.0-10.tgz","fileCount":6,"integrity":"sha512-wW17Cz/cOXKGX94N2DOF2/c6CdR2+1vVS/jYoZPI9tTN/swm0jK5zWYwfw7+otaIjH6qKCUHqLwP97ROxFC//w==","signatures":[{"sig":"MEQCICyLihNv2qiHzpZ2Q+NYs3gexILeLbGqBGuEXAB8CbPCAiAWs8vtoQzP4TacPoxAJV/6mgTIByXaELFogRbIT42NHA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbK4e6CRA9TVsSAnZWagAAbfIP/3/lna5J4ieZ0vkTPhVZ\ncnwctgSeCyXfovp2o1CfirPlRe2CHT/h5uGkp+F/bEIsxge1p3JbswlncmDr\naET9g0XC5suDI9O7kBw6vfVfKxwYAGhOQdQ0cVOCGgUDNq/h2R6nLubQwb0U\nmX2DIl6UCJ9DEmLMLwzSNbBaWVtsqI48YWdR2i2GHgurwgix4fJaGxT3U/5q\nP/1oInztO5vyrWzK8Q8iBNqZ4SgwhFW043ankAVMGioX+smMnRbl5JRmsbyv\n1CXQB4+g1gHza7Eo8FydaWlvNkz4lVMQSSpk2NrJZXpfOPv5CypSqvRs3u3v\n116evoEMI4bLeZpxwgfqHWdNp2S1bvejCiAhF12tH3/9CO5AoQzqTZR+6zLy\nQPchYtoCJ3N3HZ9hUyIEIhf9Xrp1eDpXJtaEyLtbkBZBgLQGnG/PEHnZ6Yms\nhJjKCQ92WO7ZBGqouFifS+0+Wc4BEi3lPK+AdQOZhbvMpZ5sMGsLhzUXl2Qd\ncl08qGENkTyE9a7JpQxSR6H0cP2tpuwjMsZNe6q1eT54z1ihxOCWZiJlbrxk\nidyVVXbYj/GnHR+gnVo159R+5Qu+tPDjDERan8qbLasgkWW35AKZxaj5n7G6\nD8DbXwVt+LHsZYZ2DcG4MYng2+Qhe0jcoNB0S3SS+3SYqVED4Ij/qWrXNBmj\nhDgS\r\n=oAEu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"builder11@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"3.0.0-10"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.0-10_1529579450082_0.7371429591991498","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"nodehandler-utils","version":"3.0.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.0","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"c3b7ecc98e474be89e49dd9727968b6c9904dc42","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.0.tgz","fileCount":6,"integrity":"sha512-3KwHIxdvnIVxLnlp1cAlodEuS0pykVL9DVILQxSM475OwqsWXu9jsFT9YSstDajdQ1IKerlHAxHn3tqYXepZxA==","signatures":[{"sig":"MEYCIQCZi9QQTjlbWhME2MT/1XHAMehaTLy4QXURvccQRcJSYgIhAIgaMzYh7d/mf+OI/3UnHrBI9Eba6T88eOpwLmiMgFUt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70193,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbM2O8CRA9TVsSAnZWagAA+6kP/jG8dc/LzSyUUe89XmaJ\nTnFQRPmPm2BNyqwjueB+0dHJ8TTIyDSjxzdTFA+Mbh4vOG8jo16cHpDt/AU5\nuRtTHYK0fpAViL9fqGfoK5ukf02U9/sucUJrtQAOXQwZytxx1/mcks0aEDQ9\nzDOC7d1wKZUaX5GcRnf+8Pb+vED1MaNauPYSO2hK9ZiFE0hFjhLhhZKtk6Pj\n56aq5q10cj60fXg/4YA7+ru6rjDZCMXTHmEKFv4q/e1vH3FcW0Wu2C9Cvj6i\n150yH6JEPYWpcL10VMBjVD+Ht/P1NI4+Pyt8iLrHZtHUhLkkiagsKblRpPCD\naxC2Teq6mMvVKNBA+c7YTB/L96Hf8zGE671iZuz0iJFARXct4GHsRqcOH0kV\n10uoZhBCj2HAhRU5mchCC7IhDh/xMykr56cP1i7cqFgFDfYF47vGeU2ag6KI\nteWqZU61x7ogf0WNAdJytd0L96GQXuuaQnWMkVr92425U2nUU2n2mhZdoHdD\nukaN3k8LjBy0e5Aw1IJ+fTGIjQAhnnjIPVqmpI81n5jNxxmVYLXlcz/X24N/\n2fSP+VUdeO9BBeZAczuYMqtJ1edmB29oRVT3Uk/uxd7m6Zty5GfwEeCb9Di+\ny4ME4OXIHWpB5lHJg02sPgM9v9SyBm9QF4g0Zbrdqj1zIGtdRPeNZgNAtdUy\n4GvH\r\n=yuE+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"axway","email":"builder11@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.0_1530094524095_0.8839976619398779","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"nodehandler-utils","version":"3.0.1","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.1","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"dba2ca928f858b174b9f6c6aca88a3631332b223","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.1.tgz","fileCount":6,"integrity":"sha512-5msxKh/SobDZ25rXmjlQ2kswyjIPlk54cn6GnDlbhBnyganx2qH440eOo9iUZRvKtIMQUewV5SNcAYp4QDWPCA==","signatures":[{"sig":"MEUCIHhWz4V4dERZr2PffRyqxoO5TlqkDRSy3h8504tyzqC+AiEAtS05IRQsJf8AnwvI6duqv3T2/HAfshkmNo9fKQAYDzo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70193,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbROlqCRA9TVsSAnZWagAAhlEP/0pQt6d0v+Jc55bE2lwu\nVsgLv2ciX8+RIMWOarGndHb0YeJdxMK4Gd+tk9T/uTIWn4+mTE0uRCVsbAa5\nGnvKPyyPow+/pCBG3IdnuS8wingsnQkKIdvFN48dTRBsfQF21lYN+AvDlvto\nWpyFttPn1G1NU+3+JBTQOaLmW4O9Su4SE9nl31xxdNbf/A0wqCIuQKDqW7W5\ntJyuU4Mdmb9v7BOXJUFONzHfpVCNy3/ObTTbknaopG5vOD5fQ1bQN3S/OtId\nQr9A01l8vcYKbz9cgYNjUzCL+cNY3XCERKY3yXkERKRoKU1f20lyrN5+tTtK\nGn9rCnqvhHo1AVoA1C5N8qSji/w/itPWEghVM9r3mmp5zniHfc9YP8O4VXuI\nz0FvjMms8K6DobISl3FudolkmTR9ufqUy5X/QHpkbC/SM1I5xPlVrPEM2oza\nc6F7UiT5HxkJybrd+uHXIf1zRqZiGwHWLf4gpGlnUFehKx6rqGMR70ZEXzUA\nMjenyOXpk6HM0nNagEQbkfygoCH/bxcTflgstUXfbEh+Xp8eQa+bGxSmFbAj\nqZqVCwAB33Fq+K6zmegKAHQKjfzT44RH7nAHzoxD9p1Lw7iZ4K5cq4P53a3L\nnvIN97UeVnnJ3DBVQ+768ITsmQCLiGXa+isM6TyzyT0/9ynoWh3A84rRvs1L\nzrz7\r\n=FeAi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.1_1531242858201_0.6670528969990492","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"nodehandler-utils","version":"3.0.2","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.2","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"f0e2f40b0890e4a17de405b0a5903532efbfd385","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.2.tgz","fileCount":6,"integrity":"sha512-wqLJpwe/yiA28Vx/ArYYt0JKc1HlmQnGngBFNEgjxdP8urci2ZgZIki5egmeT2YXr714SEw3mMJKAHJp6Wp+Eg==","signatures":[{"sig":"MEUCIExBf7ZY8l5LNWKkXYcaQOsmUraAEQJZa+J2gfj4Q7yYAiEA1qjNZaM7GW02khheOSwOJyvIIr9SZWBKaXn4/lsXw/Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbUGK5CRA9TVsSAnZWagAA7TAP/3JA+AI3HpU4+o4HPZeZ\nedZp3GqKWyiueYPQ3VWZtWwD/h90MJ9Omez3XRRT1FyDqMjhGKBYDQs17Wjw\nq/lVDk7EYLYjkO5OiX9PBV9/gi6lLnB51SLG5w3XcuPgnsfOEDYztQnaoNB9\nvUSngYvUKMZ3SK/hyY/EayBfiKeBhiPCh+6jQpOcErtSNOGzfP7HYUEBTEHR\nANxCPGEpHhtr7o4SByrUlZnwbp/NXUnBwjX7mvilKxAxbE/yG00E3GoIGaUH\nVKIi0x37Ggod/+TlBQnB8laT5gd3+qTAfr/GynIjkxoLH8UB6XiXc2dIhuph\nj2HWtXr59B1MaGET8T6wLMw3XiuNOYFuRP9/XzAKPwa3mbk84tzd0UsCNc5/\nD9qxktioWZ2+49CfBqyyxm4HTlfoiBd1ZoxJWlijm8OddX0WM53FHPOrnnvI\nPOdVohDclSJvOoIdF0J1f+5zJEmN8ecwFUcb1NUxialyFL+bjeMOO9vORgH3\n+Hf7LE/29B5QjmfEt3qH1qrNO7UOppRjnbeQSM/2qBYDOPmUK5q1SOHRJ2tm\n9HIpg/HksLFKE9GKxxp4J9HlfGPZm6yd4Nf71IntwyHoEto8IuaxLDFPwrtf\n7+h37El9lo3+D84ZUVP8LH1D2hcFXiA5jEqVmMj/6RWXjZLBxou+gNXsewT5\ndEDC\r\n=u7/F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.2_1531994809709_0.035410664549077264","host":"s3://npm-registry-packages"}},"3.0.3":{"name":"nodehandler-utils","version":"3.0.3","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.3","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"fa6edae2513689e4edd4814d64685ef48e673a06","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.3.tgz","fileCount":6,"integrity":"sha512-s08fGMaBsCXNsMkws6wUKUM3BA0n0zw2vxQb0bxHkM/9ixQmAhnzQhlmsy6skVhpmzUinqPCbxtrFC4XmudNcw==","signatures":[{"sig":"MEUCIFKjhS5qKmWgEBHQAAqhn5yzIhc7RB7SXG/g80EpFupUAiEA8OrxBtMDjhJ1zIOPQPA/lZdrmtQxs00czQE7VVMyowQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70645,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbVcEOCRA9TVsSAnZWagAAvEkQAIehVVJ3VSU/Q4zrVBhB\nDNNRkWC0zLwqy/xLSnQSKxXdHEqNZzssEoQ/j7UYPV8ltaMsYNzuWm6Igo0c\n/K87bWSFLaHpgr9UgMwA1e5zxa2Vyk9fQobWEj7vBfKwAhWImCOYaTXdjpOA\nxHH+jhKdpFfX7y2IL2kHSCIQTDlkqESAkqJxbvVFOfyLqnkyngQ3Yrmts0rV\nykcAfKVlXzBcjuaKtqLb1Ul76/QnH+419s5mr/E9pPYAdvc12WRoRTR3EsbL\nJ199KOQvkm4YdqL/y472mslVWMauf8yRenH0e1KduFfFiC1eGWp4GJ/uFuqw\nyi5D9xol0xdhdfOrZxS5zD9aZfJWcpHU0joARLn8el98arYO5l10DUXKSs5l\nm29o+XTqcLaGpQmu9nU+95dBT61TUz//fp7LmpDTx6bluIEmDU37BOONM2eF\nOjeoVg9HR1tj9zGW6yBXAnfPNt/CdDawBI16rF7nn/b4/OBZSbgS5zDerd+E\nuWPQFveH55n+EJg38Xaxl+B+ejCZFq+QKte6ntz/TbN0pcYC0ryOr1UsxfOe\nn61c2WoHu/KWRX9dk2lashPd/nmYIhIml1nv58jyTZgf4MHQhuMnOyVcQ6Wb\nqU7na9NMYfTXjwpDUjVmbLh+sU/KchIgfX+NJfXQgadhRB3uocc0rGZIwHqd\nb1sL\r\n=rw3v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n \n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.3_1532346637949_0.9985473341601905","host":"s3://npm-registry-packages"}},"3.0.4":{"name":"nodehandler-utils","version":"3.0.4","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.4","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"fc565d4211d55eca050bcbec0b6c419daecd7daf","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.4.tgz","fileCount":6,"integrity":"sha512-LbIfuPjWiSv+O+Awts/e0OiAEIcUTe8LE1eAoNiKZQGH9O5BZcjqJ+ZSg9QpJTkFATsjf0ORlb81OaCxXhCKuA==","signatures":[{"sig":"MEQCIGuuz8D+lLgSZcEoZDXwqgJFY0RejMYDv+tF/H950m9FAiAtbiqwlyvsikWePlMEC3Y3lw4THOqRjdw7Vn+8+W+hIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70645,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbVcaNCRA9TVsSAnZWagAA+swP/RXJ1upaPFtAWdS3jp3A\nfKUSsabTprPLZcU52QvBYaI6+O7nNl5sjkcxQD1UGvzJ8kq2sIFKauaMY141\nKaGmy0131LSeLIhGHDtHfaMRBI8v68n7IA3NnFfNnGWRIjJAYgLLTp5LA+Es\n/6f4lm16I9wKRofI3O6z7CZwlvTh+TA6jzcMZFVQlW8s2/XtWqfVlmJI1ktQ\n7Js0Wj07LCbuC0EQTeus+QHfJH/LyWNAb/Zyop8R6Tj6B76rCxmXBTOn5GS4\n5XrvEAtYx9rJaRgE7u31jovGUPTGMHAU/SOhs4hk7pBH5ScPwxzI6QRW9N+a\nWXdpmqaxyYv30oQ+TzhN8g04ncbyvPDlOJFfZpIHtJQx5hScG4AvfIr4ddw1\nFKOUs6ZejL7Uiro/ruckrG1+6WaeS7vC9l0cm7P13GRHBEJlSdstlQKl5t6u\nA05jJT/Ic7qy2/vRyCtO4OVQ45BrDnBSgUtNOx/i1DmMNMIWI2CNxdzHl5E6\nQUOt8ziLjDyHy0KVIg+ouhy0SrbOzGQOr1VdNR4TjYORfo0BThvLTfNtLjS/\nn3IbviN4/6ZJtmzJOYoawbKe8gOV47W6+SIxSof9icuAFbL+wtq/3Btq5dps\n2jCH7ba/NQ6XwU+t14HgM4Kpwd0PXst5PvYAg8+9Kqw1SuFG+HaYj0SPdjYw\ne/iu\r\n=wrKc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.4_1532348045207_0.9615207983265868","host":"s3://npm-registry-packages"}},"3.0.5":{"name":"nodehandler-utils","version":"3.0.5","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.5","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"da915879d8893f9cf7e051b93d62d4e9870012a6","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.5.tgz","fileCount":6,"integrity":"sha512-ErMGKX9sKLlD4Hnk3REvVEnEzU+bHNsXJ1kYx7NUCMCd3Vrq4U79u59oMghVpad5d2fxY1oi3H5LewHKD0VvsA==","signatures":[{"sig":"MEQCICsj4/6GylhyQkDrfm68J441x1F6Xdp9oEPP6nObJ+85AiAnllVlL0hP6/OxSiNqUsRo5kt9JNDGE9nmuRdvg9umcg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70645,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYwEECRA9TVsSAnZWagAAZCgP/jFob9cjfd32EaLxTD5i\nMwEKOIFFUf56cTCyYYMWLdOOrbTXXrW5KftQrIQPsDu683pt2wH1FjzTBtOg\nEcbBcJUehzBDaJBXT+LWQspGmwRcRaY83hl9wgHCstSBDuk5QQsYj9ojKMI8\nzxdz/BTT3dK7kOpBNF3LfEWC7AgHmRlitBzTcrzeghvldLF0V6LmkR4UVhJw\nLJZpFVx/3UaDZhloPUgW+sLxdBeE+cN0o3JGMdq7G6jtVAONShkklXWGaWid\nHCBTSGC9XlemGPvtFju4HcYLWGIzQz2mloCKJZnjnAdSSvOIUTngCLww55Wt\n3BzH6Ie8qKaPYhQbXqAqhuYXbmB5Macfbs75obvhkxSrMXWAcelHXtDxePgU\ngKiVVwvxhIJb9WnpmNUDL9h4NSP9aZY1S9cpx09x9VN7H3D1w3mvGs6co3zK\nHQAj84QrNJ0NboLu03rc5CNjTLXyuJg+R+jdhbGp4F0cnECdc6bLP5wU1WOE\nmA3xKyYbppQ5pXpLR+TUjgHPj4K4lQm0cCpjEBCNjpaneJww3YbZSCfXuAel\nqHwpsLmyZQ9iLOmB/Ko4OzSdzFmsCznlKugPA/a3bKxclcD1yFGAYwNswT/z\nhgXTsxdR9AqX9mdvMDibkOQQ/7D0bkuzIVb5VT7UnwpplWZAmdTvMi7cWScm\nLnKl\r\n=NgSb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@3.0.5.tgz","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n \n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.2.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.9.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.5_1533214969538_0.3684637963981712","host":"s3://npm-registry-packages"}},"3.0.6":{"name":"nodehandler-utils","version":"3.0.6","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.6","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"25b1732e814c27275a214cc5b7a68d4b2824da95","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.6.tgz","fileCount":6,"integrity":"sha512-5DBSz+yCSwpaMGICkHMLrIPSYWJBVuOe8Z0dPuVncgkE80uaMtSjnCptYHLpIn503ROVCGETFH87uCEz6KYHRg==","signatures":[{"sig":"MEQCIHkah9ux6NuwroLQM9VE7yA/8lNrIQzOEc12yz3KrzKcAiBJz4yusejqpRhABAas/x9wLpiXVmziz2hK4ZYu5QsJGg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70645,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZCA+CRA9TVsSAnZWagAA+iEP/jTcjEHkAFV2HyibGTY4\n38PQ4OoNN2zBTOd1M5uAruaDzDHEV3DhfPnYLY5OVNViTcryhk0P2kgWzENQ\n5jnPY+FRzkBRt5RMUXtqIaEGvH6vqINgDh4E8pEgiWnLsAM3tTvwzha24hxi\n67ZnU0DWDC+AXEkK3IsLl3oTQg+nVD5H520QXXAE5v4pAsc7uMM4QnrC8JYW\nRpwPmJpXkFQzgMKWw9IfflxyfeUww7L5kbr8OZnnzi+YJuUAqZbtq451huA5\na3ittmzrF1TDvBpPqWHs7e72O7lKA0wMkWnttQuYcZoZUP09p7SZRwByaBqB\nluRH72y9TKfLSx9NMkI5R5yJJYFU0NspavHZGkdmXVMGzcelV5abwWvBLtiD\nRx340oYWU2xFV8+h0wDcILRrLGaEn0PpKRDFelBARNiaMf9lSSfw5jNgSJ0R\nLyehNwGUB8rJYi2IC2Qbk18f7EXlytj3n/5QtQl8hiRFi2Q+qipIAkXTwtXY\nvUoDbEAccrQukHHm3VHNaZpsrXLSnOrWbRcfZYKJtVXrT2i+ey1NKm+jjjto\niqAcNPnPdhnOZevw1i5wnAJSSOiXRSGUgeMyi8IIkhlUIZeCoe1OaYWbNJme\nSsUiZAol9A9qHE24hjC5/3tM1d/aZ0betIlF7QnGXy9cpzoP8vsIw+QYHrR2\niAXK\r\n=nRx6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n \n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.6_1533288510262_0.33102343867195927","host":"s3://npm-registry-packages"}},"3.0.7":{"name":"nodehandler-utils","version":"3.0.7","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.7","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"827694dab520e81466804af0ee7543ad197be355","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.7.tgz","fileCount":6,"integrity":"sha512-/CsAUnuy70V9/T3IR4L8asGPhzdBz7sZghHKSElLZs5cFs0p/Eq3icMyxp9PAq/lRgvAn8NdPAWDB8LNBD1pCw==","signatures":[{"sig":"MEQCIEPoY6KKPye9djHxyPHx383XI3/yuJgIBCFTpDQFM0i/AiAtF2ydq+MkY+xsv505rZ1kyGOU7Gmf5CppzuQ92fHgQA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70645,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZCw4CRA9TVsSAnZWagAALKAP/0RDqXE2vh6YgDdiGHxV\nRlN/vjfoV0X9eW2gOu6fBjwYr3eAKo0mlt1oJyTkoM3Mol2rt8nN0SxOvwn3\nLRqa4jBDL5zN0yZ/SCaxtgHKwv6LpHXbbm/OjoDuQlmBONNz4/QxjsZiJdSd\nGFT4Heq7/pnKxHhpyuItqjKPNXnx+qFzDsXQHNBT2j85JhqPKoMgcaDGgFmV\nPhvTMhGxm4qDWUdQ0a0ecqfYBDzAqNtxyGcvPgCZFYcQ90FGdIfnfbULCFeo\nic2PdOzulSOBAf8Z53DcxQwkYox4KhUpE6Iq+pu0y3mpBcfWVMruZOxjyF35\npvkENERbi2pe0cj962JCrBDNDzgmW3l3iDGukJl3G5TjPHavlLR9QfC17v0j\nkwwbaYvkbT0ozKAkqtDKZGSqZu3yQEzJB7YGDQq8YKhjKJ4ghs7I6Okw5Ksg\ntHnY8vTLjk/pmhYbmZVLWD1dU/U4wRRbP/Yn2D9jZXaD6fsqEWyoQYkQ8iQA\nft4t5DduaWuSvjKyH5GgKMQmp5PRRj3Jw3/fiE77wGsB38h5hrLVxdm0x3yJ\nD08Erx3vpAlpmGKtEXoY8pZgMyTgEbWXY3mmAQF85DeFIhiLN2NrX1PKD/ui\nyy67Klppn08/D1jNzeTV6wZUW5DZ3AriVmpHQ+JO6az3m0zRnDu/cpIB82Ak\n0rZl\r\n=vWmP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.7_1533291575505_0.6829797442832213","host":"s3://npm-registry-packages"}},"3.1.0-rdpp-feat-4940.3de41a.0":{"name":"nodehandler-utils","version":"3.1.0-rdpp-feat-4940.3de41a.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.1.0-rdpp-feat-4940.3de41a.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"d8128eb4592b82806f2df4c7533cd82aa8363d0e","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.1.0-rdpp-feat-4940.3de41a.0.tgz","fileCount":6,"integrity":"sha512-pBvNSQN3HreoTW2POVihw9+4OF3UP4Ehsc5VGCd7POdjokacKOhaYCOxoomoTFUg+JfNd6X6q8XtG+OXEY2SRA==","signatures":[{"sig":"MEUCIH3rmSDxsBQGoPNeuMSi11jmPvNAYZpBWQOHIaMk78LMAiEAlhWe80g8i1Yt9/rY5q2bRqWoh2rjc3lipJBUwYa4RAs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcrfKCRA9TVsSAnZWagAA8JMP/RE/xMebmn0g8Lms4oBA\nCdu/AVMrb/G2X2SeTUbNN5Ug3BsVmahukV68zVijcr+4wS0GlXpW62ibCG90\nyVkagJWN4yG/LYN66n+opH8cP+uH60aLrtXb7oHDXe1AJHvfO+GY9roDYL6L\nLwXiVsGYV6YzFRaZMHejlmClqwjr92016cbQX4HgJ4Xtd0yu8Lo9GarmfCEW\nkYgdh93/nGoFVCdO2rnFB1VjZEaX2y/HX9G5d4167mWwGtQcF87EQpEqMZXQ\nNJrXRtEDrMii6ydiLCnowJb9fuT1HrOY6UhF2D0D6k69ZcJYLrbpiztWQQqk\n0ntRjDfdU0fV/NCMN9kVZPJQv3ldffJxApg7anEab0yi8TBTu1ebLjcqRqtE\nl1/SCSWQ3s6mEmE7WW5BkpyKWUbNmj0hk4Myxaxxr3mnJhkY+THES65YbTLw\nA1Cqu6pEmoEyakAUMWEurveXAf6J3G78o4OrLC1Bu4dHyAnk7quyOgs9jkz/\nn0rWVQEo9iG33A9QMZVkiWwDd/ErDkdg/ObEgT9JzXhX8bmyOD7J0N4cxYAa\nYsEbSxGc0FkWiBO0xEaw/s+ZoFtEXpem6wgxrJZ1E2wBurl4aKQ4Q3iYlHqN\nnjoGw3QndO8u0hxBmpKIk9VMbd04d0VsiMnqD4a7mizRwRutPRpL8bTX9kwE\n4iY/\r\n=I6zl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon], withAuth)](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon], withAuth) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n| withAuth | <code>bool</code> | generates a spec with authZ parameters |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n \n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 88 --branches 86 --functions 95 --statemenets 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.1.0-rdpp-feat-4940.3de41a.0_1534244810342_0.15301310767268061","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.59fced.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.59fced.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.59fced.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"112db6e0904abf9ba03f0c668f840ddf521ccab7","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.59fced.0.tgz","fileCount":6,"integrity":"sha512-//kinAROPtiw9Iqlz7kwKI+UWRe07IM85exU/nKObFRyKiBEyxhuOC24Vkyrm8oIoBAaT/ZP7j/au9FCI/6P0A==","signatures":[{"sig":"MEUCIQDn00Wh2aPgQ25JBUUAlprbnbfVaXXjs2cKOEv272YdswIgdYXInC1p650TWfYZlrnBjV7JpQErK6gLKW6VltDHO5M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfqWmCRA9TVsSAnZWagAAKkYQAJC1h9Zo+eEFhx7NQCD8\nTmknqZ67cpVshtpOq5ntmmpgeCX2BOw8cK9qQ6OXF3e7lNSD3PpDsM7zO/gB\n79Vs1LlQSyxlTeC/+Zr3+MK/9bC9B0BFOxRlfXdJeUR9YTOQEIRaVzMlBGBh\nSQHrE56858/6ANqeUpt+fIuVpFecnZlW1gWWCgDNzNOl+/FyP162XO3DYije\nDgH/uw3emNY7hDGjpgUxCaz+E4FRZS+pq4Idv5ubPHZVoIOZOsWe7kIwNxyV\n1m7p7PO8S1xz8rIaDPqr2isPRH4Rbh2xm6wDQbscfxs7MOVWkdJvxh9gnu4Q\nyXJVZxkr2nBP9tMp8O31WrXBgsMG3p8Np61JwupuQSSoVTYgSVGED81WefX9\ns+mRtU3Kqgujse/FEgB7f0bSAltel9b6Az8+2S8Awp52aXNGSTGGatFxEKYX\nN4oL9pMFemODvugNRP4OKHbujTIoFhwaoJ4lZPHl3Ss4LNL6087e16TKhKK1\nmkXmmXlMjqbRWuP+FjYXiRbGj7OOHHfSMUc5xFrU6oPP1N9Ofo0L7FWOsfsU\n5as4BahSMv5C7MdLjLBD6/h/6DSCQMaxX+9SwMYtSCyNB9kt69sYSZmm/4vz\neFNzty7q1XO8X7i8/ohEyyTTCaWyheCK03czYcYB7Ib2p9xfsgbY9EE126ND\niLJ1\r\n=/Y7Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n \n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.59fced.0_1535026597938_0.3761729525117692","host":"s3://npm-registry-packages"}},"3.0.8":{"name":"nodehandler-utils","version":"3.0.8","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.8","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"f1165c9620544a88cff90adefb59de4579cd76d4","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.8.tgz","fileCount":6,"integrity":"sha512-UIsaBur8K37v/ObixhIaX39WmouVQXidh6XZbjAq8hbfwNJwh4B80noUk+NX1dX6hshhdnEhoWPhHNvqQ8UPvQ==","signatures":[{"sig":"MEYCIQDFRYktiZK750SaVISh6xpv9lXdqH1xep/ok/CJmLum6AIhAO4sHcohx8K351NowaMbx1ZA53JjsbKukYa863Nv1gFT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70720,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfx2zCRA9TVsSAnZWagAAj58P/i2qh/A8xYHRydo5P4N5\nnMlwQc0i+RCawqguEk5skv+lkOU3SGkDuD1yQsxjsq4uRPHOTMW++iWg/R7G\ndgG3kI7gigT4YqLETDX6GfVZVQhwfBa3FtGkmoXh+/olLC8EniWTuisDTsOS\nyCMonbGicpw2nyU0LDRuyCXhDseiGjFYkRITrm/KYLM/ywhF0IdA5drBowqS\nOlldNlGdHBnWmkhc8r9z/+KajiJh7yxf8LDcHB5+k8TTe3T3uJwQZg6DJkuC\ngGE6xhPrzjY+Ixdyp6A5m1Y7G/GmhdgCCIr974h+Alr/Dg7XTCGxTTTvqlr0\nNHjMTVVMqroWjNhwywB1TlhRVNmC/tDBEHukDX+4IOoW6UpqnOBX9FWm43to\ntzV4icGlbadjn52QCbMSioB92PXjgTQrpZ5C5pXecDPXOEeX6PquiS9EFQNJ\nno+WzDGBfIKwyrYFmV9rUAOY30VGgycKDLD2GtNJiIuI1EDz3/9CEjycr3ah\nwgYyPxDJNFEpKKufTBiWENPlL/CWpQ3OS1t9Io+RhZXA43UOVCXao4ZzLJj7\nEoxu21t5zM2mdMysjjv8WL523G2Tzmo2NVkcVOEmwK54bic1JgOAhQ0lms8P\nLN5/uKZgFSgSRlJBU28Spw5zh4uWM3NuBBHEO/RMaz1imtpL9PVnJnO5At0s\nGNyG\r\n=WMp9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.8_1535057330283_0.31176987198060213","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.5ff06a.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.5ff06a.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.5ff06a.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"6483453903f74217d86d94a19b8a83340fae4a55","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.5ff06a.0.tgz","fileCount":6,"integrity":"sha512-RLEuWl8vx243TLlA2ZyBYeB1QNekmFNv6FuWNd9QAEy41X71gg9pYHXcOB9NECaeNa0pxHxSzTDXTYB60IajNg==","signatures":[{"sig":"MEUCIHh9fhLMEC84qN+udi/lD6fu3X3h7w6MXv9MqilNrdHDAiEA+BZjyNfvbUGyCyH4+amIxIMdX2EVvX7EhDz2p2feGLw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgBG0CRA9TVsSAnZWagAAtiAP/1GthLarWBXI9ewrnTod\nb6HaUpcAyBiWEC2ljL3QZNt0Z+BKQKWKLz4toMfk6Af/Dn9mXDuqSvxZAHib\nSKa8re/kTUVtBZZgBirV9rn3J5tHW+mRHbB8/0Lq6RH+opAdOxdGDzGA2TSv\n6ZEfyxAqaLiAXEPPhckbGNCxhMBEvBdLT/8BKNv54CMbo66RCa10roY7/PDF\ndFZOFy7KvQvGrYbb//YgGUs9TkSN0gdSZAIXhENrYP1ovFodpQo0s2Iy5W+5\ndNmba9XRGInNB6fPUHu7RfjzkM+GxlIH9vT07ggpIzxtZMk6MthfJbRh/MJp\nYbS54SHNODpYl76MOrS1YvVtjj07oGVcq31N42VFSzjB8hdS30TsnIldH27L\nB6J8yMzUGWD4TnJah9j1SFeQsxa9L7ja52azS+d65V/Yp6q43Nz0wV1NU0LH\nv90CXWWE9MeXZyzvMHRCpLka/RZxdd8w4zX0tTxmKfRZRtNpmvkHICBtqaRg\nYOEE+NiNopDBsfGjcLk8Sj22Eq3xkjaf4V9aZIdh6z9vCujTCKja71WoNkyB\nDSujoHoxiziuDo68uQW+8xRbKDXJ+d8Anpi5UvfO9qVi4BA3ZMjbNd4lUQwA\ngSfCHjFcZhcimq8uaCFnfhAR8WfCVbhPotd+TbLcjIM2e03Cjswmhfv+GCbB\n96b+\r\n=9/eE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE"],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n \n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.5ff06a.0_1535119795688_0.946901537210806","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.bcf75e.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.bcf75e.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.bcf75e.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"27b29de8310c65d5b8876ab45a1e1c418bef4d16","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.bcf75e.0.tgz","fileCount":6,"integrity":"sha512-wk/3l++c47k7zjdEQnFhxve008StRhr1Hzj7vaMfcoRNvXXBSKLSn6ffBfvysy3kRi1axGlyaezK9V3T+pAABg==","signatures":[{"sig":"MEUCIQD+QxNTTX9J1JGnLTwsElaZ/303C/XhnQus12nguupDWQIgbxMrTsBXPufrr/ejaQA2EtgX4XDrZBV8FSoK1nOwFOk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhlZ/CRA9TVsSAnZWagAAyggP/Rwj3ZdMK0Rb0RUEdESB\nI+uOde72BhHpu+4dPVM/rfyJP6BaXmWckQ73I4Ld/K2bFyrV1s+Ho4x7iSZG\nIy7BnxRJTzoVgPft5iJouwVEVwcgTwfTacp9gTfBF3W+odWzYNWdReNLlSw+\n0G+x9esk70qaBVtcCfbcDoL1Qorc4anX2NMXyFYOQirkMnP1NzM2xPihlZiE\n5uHUROzFgwVNXpHh4sDb6aJAi25fFk3Ny1rLjEAzUFVkGDhhE5YubUgKSBse\noZsLg4zw/oaLMoCsGN3eTlUkReN4bFSaE0Fl9Nv2+lSvgXyFCs6Pj88rWcuP\nCuVqZq8rcdqcsQX/l/Uq3chLu0LBx7PM1vTzJruFyjy3C6o8Lac0mz6R6U9d\nb+xENAPQCcAZfQ060FwlSse9Z0uDVsyXNFZM1iF6ftzMMIa6VfofLmcXeTvX\nAcI5+o8dbWssbh9T55TFvBJ97QNruY6XgffcoZkgFG+kzfCQGuU0pw8tgJqb\nAcEsSWMuFkMzIBqDbW+KrSjhCkASBBMwHL/Kmyp5sG1j5erW/ZwNRkizJojq\nDVo+eJ8C2InqlH7Raf1Q4Txxxxnv/EWbpSK3T832jv8EG0mPs03+PXanSKBT\nlDTvjIZ2L/N7HaFiz63x6RjkdUqKbxyEaXpjGW9bujomecE1hbYrQsYWlX3L\noORh\r\n=JfX/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n \n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.bcf75e.0_1535530622707_0.5885830846443929","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.76d99a.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.76d99a.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.76d99a.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"ba48613f57eff511ac98756b0447935d2e272468","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.76d99a.0.tgz","fileCount":6,"integrity":"sha512-qW0rnQx8YyTX+BkGT4pjVzqDgWtYX1pUpCd8EuO5/SSAC9UXqRdY0QgLLHjLIlIfJvfZxQsCnk6sxwoX/DAM/A==","signatures":[{"sig":"MEUCIQD2SC3xxQs8cJ6AUf7QcDzvRthqv3sHWc5XoKZAaFwfkQIgDEK9yDXM/NIvKaEugX8HG4cNyNfgHWHyhzsI6ljoEUw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiAvTCRA9TVsSAnZWagAAQwcP/AwAh8Yxjhv3Z2N6KtTO\nwTnwZoSYGUTRaVRl7i6NAO8+QIOnH0B2ylsUHQ0Ce6EeZBJeiUWE8mm7rWF4\nJMjlu4NVo4nTtpSEKShaJ7jMZWSNZ5ABfwmYs+ppj/SU3Jk8CXsT+JJJJwUG\neE1gg/a3kvDqCuQpX/g63yl+BJItbSR6CpZtbglC6gt6IpFq3Vi2c6+940uN\nUajkTLEaySwez6NAOrKHp4osk2OaVPRI+Ww+sxusmc/nkjlc+B+iqEfP1yBn\nGYTUK1RJJcG/oFjMYK/+Y1n+rNpRPXt/j+7w7VZDByNiyrYKGTTrhqeXasJF\nmYDSqkRkXmX4UbW533EN5b9LtNMgrTY4H3twOGdsa5ID1LrzJdL4ZrFezjNA\nMQOeIts5ZUedj1AcJzgWF6+L2LkybQR/EYDItK6paOfC5W5KVMRMa3YzDG7f\nZ7v9muKwWWvYGJWXD1cBvG6VP0AJFkhq2RbLNJb8Le8lA277u+lr1cRgw2SF\nbeMCJeSxU6cPeav7Evy8hJTuVPdeKlLlunMFHt1P2G8Z75eCL6WP5YLDdtks\nEyxXIbh17lENA5sgPNSDPMxccRzUn7pqJ/t8CIG8fR++18Bp/7cFijOiHMRM\nm7bhmOTtXMwW7b6IunpZ/Ijr4Y+9XHy6He4szHDO4+N43Xpl6mRyGpO+C4QP\nSpw1\r\n=E5Rr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n \n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.76d99a.0_1535642579241_0.5235810496667261","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.0c3b98.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.0c3b98.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.0c3b98.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"96580877f2f00422e5de6843f7dd885613264c14","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.0c3b98.0.tgz","fileCount":6,"integrity":"sha512-av/Kh0XT2i3U7IaMw724E4sdt2MrJWCFs5xVQqJSTgksfgp59GdNLLl+nVb4qYIfqrg8FWaX08eK0xmQDsMiaw==","signatures":[{"sig":"MEQCIDeuWmwM5dOsNbe4offqeWVFafqIYJWmr4mfJVon3hw/AiBFhGcoyAwDOve1mL3K2ADId0Tq0Ef9oCezJRprMRphcg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiWUsCRA9TVsSAnZWagAAIesP/3XFr3OSN0hlTJwMT10g\nNwz9d52sl+yRVXRcWUk9eBwo61uxnVNw71bj7FLILhHLf3lypmu1mqG2koDv\nEKDEVLvBphrwePxohkP7QCX9Zoi+XOYYU+nnxh3X0oINDCsbMHRAn4uxhjvk\nJNJr5er5jf0++Rkc5QjCjixAJfG1lwjJ8/twWxKo7Af2TIIzq6f4D5v48QAY\nlj3l9CW15m+16nwkO+p+MWLHVVpm8E94xtVNYEG0dELS3kH6DO6myKOWmeIS\nyWiN0lkBqInZUgKP7JuIbt9gyc5kZiHQG5HB42e0EwncmBftMaXWtR1p7WaH\nwYJQyXZs3oEDcYMz87+L4M7oX7tExcWk6OUaxVwicHgZLj2cunFWhhOZDxWF\nbbSSCx1mgTBNsWVUq30IXtPJyejTopFpmc1ROjlStWxR7JpGyTbrft4oww3V\nKnM2t9YDriBU8hqL6IP3456BHoS28IgJoSnL3i2+VMCrfMZ2dq41SOrObCXq\niFMp50N17D5MJYySkG6KdJg0/i0mlZs10iEUXrO/CSCQwyxroqTr0fOYde+2\nmycr2b/81HfdbGGaMlJgktfdWxae8RHXrRNyvrOVQzh/3q3G7KfqCQ6oIYw7\noktWuLo7bO4Uv2QW/ye5q1Hs6auEhgIK0qwMm6yyGYKdYX7gte4HxEpvhcJu\nBM4x\r\n=woXe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n \n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.0c3b98.0_1535730987441_0.26817152993144244","host":"s3://npm-registry-packages"}},"3.0.9":{"name":"nodehandler-utils","version":"3.0.9","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.9","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"b921bb111af9ae33687d3b05b0d4159b94e070b3","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.9.tgz","fileCount":6,"integrity":"sha512-Kaf5QilAejR18ROKhYXI2WSpGhGJwC1++6xunkJkMCVNMGzyRuKYh5Di/FtiV3WJhpAanbXtTMvS89FrRgFJuA==","signatures":[{"sig":"MEYCIQCTp0OnJUzqtSnMSSGMROqIVIDaQaIvLzSinIbYsLHG0QIhAOVopTGImau88dydqzc05vLvKcWJ9kdSGheY4a9OQ+Aa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkSo8CRA9TVsSAnZWagAAcB0QAIGAjYtrnJw2gNyUpvfI\nMsPAcwTcuwVJlLkX4A9x89biJyzBM/FypNEk6Kxine0LMc4OGESobz1JUH9h\nu2yPoRcr80XxwqVZRAPE01EQSDRhWx4pXQ7XEeBo8HA3Ck8Dd3wH75QZol78\nkGaLJwyasgC8qLr8B99/5+OywxkDNvluHmDH1J+enzTCqcqIwgCvjhGUi2UC\nirsgEwCwzqhQAFpNEBUkdXyI0ZBa0L9rUWVpTyCyKcleCojepwcgvfzAmHa7\nyw86LFxAkdjZmAqAEjuLS9g1OJM8HosDWp5mcAA+iMH2nEryQT/w8QpVztVG\nF8EkgbrYqlRyGgtTthOocp6feO3Gq5H5gCX6XENWAggwCdAY98DSDNwAyK8S\nCmZbAk/defEQjU1pYMowwtHn3jV/+9V4SaX9fMWlSX8MPaoFWzVmyA+3SttO\nlcjeB6NBdLd522b3/Hzd4yalJml9yNdEdeAqEQo3bHLbq9mQR6NiLLsL9ujC\nJZ5SclehNYOssUWRwoCdPTfAaA492JLGeyoI/OVxzZroKIgCNSPebjQo1Jxr\nTdi2KHdOAO7ASXOPDcn5rysh+xNHGTxK8jRBHU8rPxgSg/Nqu1xof6hX51KU\ndh9SQtI5QYJTE2yGu2ePcB0z2Y3MSs1PcnBKEIMOInMsXRss9rmQqAZGkyTt\ne8Yq\r\n=Lq1u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.4","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.9_1536240187721_0.6478001265807956","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.adf516.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.adf516.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.adf516.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"b0ca45fe8bb1a4cbe943e314c604983f695a5e95","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.adf516.0.tgz","fileCount":6,"integrity":"sha512-nVNwBK33cnOX32EHiHf99Xrj+kKQygaV0qBIXUq69fwt4bZHZiTEJ4TALd79fmoCg3RQAkRJkx9usj1qww/+5g==","signatures":[{"sig":"MEUCIQDEdA+0iOukJ2AdgKwQf+GL/3a0GmxmxpN23VFNqFfakAIgOL0bs29sXLlGRrpAag8MNR5y+XTgcwHxvnKtxaR+IdU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmiA1CRA9TVsSAnZWagAAJqQP/1Xr/KNMNgThY8BZhJZ8\npPZiv3cOpR0Jx6BP1C0S3WWV269/lk5RjGuBgy5T0onbwUs6ypGIWJeNa1Iu\ndQCDitFCTpQIANgMY4vdaltRLKWgjBKKE5K71RDLqUfFW6YJ6S03tonq9KW6\nbhCU6ir5D22tnv1doLUUr2bJ6hlzil6VuRGmULZfF4Oi22kB6H3TnRMs34uj\naxWU+Sag2iMPrpXCNmoNyxkjXBYtR9fIIJV9Ewt0PSI/Yi4j4Tig1ozemboA\nOBEcHjZ/JyAiYjqmxJYw+68xXAvLWYgQMaXjjbtxlv69fqJ0+Y3dFu55Epwi\n7Oj5nmVILfqmEo565N/Jsv4n2g+4qU4uVcCd8meVtUdhhwQqtMjcHfoErG3/\njx5QMeoIRhb9sSHrO/JTUCT4LT9vNRAItd3IDbqbcTaSQprQxuWoEVlDGRT4\nDBVou+ujB/Qq9gYQRwzld8ACTYD7jpNMRS09AqDSTvyyy+fS7wgig0Vvcqs4\n9JUZFMx702BVU3MoRXnnMX+5dXs6HJ/0PwsuRca/KW0FVScISqMqIEfqxyWH\nFWqaMEag/F4JGFRIBI7Bb4rWHczbYHqkERBZ/c+I5uijNs4ge3kptwMOGWtj\nbn4Hh/+b6NmRD/Uotd27QtebUqVDQ55t2iTwjEDHm1EUPbZgf/AfFGK4+jZ/\nwA5L\r\n=XqpV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.adf516.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n \n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies.  Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions).  Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.adf516.0_1536827444840_0.12479569669535273","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.083e37.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.083e37.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.083e37.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"c255bd9ea33227abcc2134d30419cd38303fdb29","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.083e37.0.tgz","fileCount":6,"integrity":"sha512-If+6u3XnRsONahjZAo+R9CbH872LRLZsasaR59/raeptd4Nb2a+xpyye/8POKbqMDivpVcTUCmJ7HZQRtf2+2w==","signatures":[{"sig":"MEQCIBBAtEnK2wQX327hV8iv8xu4OW0RqubxLXV5LfKv3zW0AiBoaz7bdYDTH5yYdN9O7M7haCuCN4hQu9N/tz+Xwv7D3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmn2dCRA9TVsSAnZWagAAAlQP/RzqceM0NlK92V8WzEYe\n+RsxBO7I6HW8DaZ+iX2raifIgyoje6PIMu+Kd+2tbNACqfXioflNrhV1BEgT\nylKEiYhpSe+NVD55j4OM7b6HWzr42g4ryGgfOItSZ16mwV3dnbu8d/bjO/d6\nWYx29p549qViYVFw9bUbdHXGoPb/3God5e9nRUXTVvivLPE1GGDVoID/3dtD\n/4LthQ5G57ZS88P7W2yIMUfCOjceMdo4UC0e1oIeestXB4oqI2s5G+BIAkI2\nfaN+6j5ZsvuQrU9eUFKfrCx0657Qm/H3m5HJDWBGfCtuCgHZVs/bMwQXfRwj\n8klDNj7wCGR2FX/v6KTFK8AI3G4gRq7gC3sEsveYMz0CiFLrJIgDknepGvJc\nS2eGtixexhIP9ItlRWi5UbKSSn7xuCgWWsQQ9s1cVDoXPCgNde8zz9sm31+0\nFRzWvBzS3HK8XCresKzA2cIct+8LxEyO2HgVvRYBa6atcHg1aXs9SioJcS8i\nLs1E4iaAHozOywGft3F2lH3g1/W7ZzQSgndYZTkKmHCf5IazceYWRYCEA6nN\npO7t9akDpQ0dLz5XpC8Uoa5zTv6bmgp+v1r2aN+xUXGoCRwogMQ5fEbpnm2q\nU0KCw3y1Vv3gN4ZjWOKRw8RbrnHwmbRsX5YZwzZdpg/aZw8161t299/1FpP5\nii2T\r\n=+ILn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.083e37.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n \n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.083e37.0_1536851356698_0.05105515639387992","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.416e64.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.416e64.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.416e64.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"22d86623aec206fec4852b1258117438221034d4","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.416e64.0.tgz","fileCount":6,"integrity":"sha512-E2F6mYH8zyQbxLcbtta89zldBuh7v6+9eEL2ii8hunJfyd97eKCpwDnI/z4veP65+rKfiBO+TGwQpflAITI1ug==","signatures":[{"sig":"MEQCIGwQswF6GQ8mSTs8Ny+rDT/2FBj05LkR+Lz9cKqnM880AiB/jK3kzXTpmhUFCMFOmSq3H/Tx/XWLsdoCjJTqpSPZ6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbpOKnCRA9TVsSAnZWagAAc/IQAJYfo9/0i/ImRQ2c7OUg\nIHJHK4o36IxuSG2wzjjKZfP1jgyXdfP0CvArZ35ZVl4U5G1g++n8BL0EviFk\n1IzU5Tjc32e/uZAIkER7B2CCQDcMpggP1DvivuQK5p+EiriuZo186utNL9Gi\npNIVcAG0HdPuJ+XICIt4vYZGmNLnfYJtjUWUKHRfhZJxi313u4ulZHF+VoDG\nH5kIR7bq+6VYEohibPfozSMuqPcgxXhAZsvWDwAgb3Ys+hNbGEXDm7epkCtc\nNSl+ceuYqpJGH4ra34BWJn1l9QmgCaiRPVetvNQQjYVOlDa/yaspz0SPPuKB\nzLv+uKwLa/CCnfGRSslAtBpGRbP7tk4hK0nGw0R8ousGlYqnsP/ECsY7jAtr\n1H5JiFAC1EJIwbXDqzc9tzauBFK1x3SaeIW1cgh7YTvliyN9vEnEXzvWAA1q\nJ02D7oL1rInFHaphkc+4VZ7rUCjYqn4hqw/ElGOIKG9uvBRVO4ShZSE1yHHI\nQUhlUZd8xYCLoxiad6CoL4+MsNJ4QhwFNM7rJmB2lkauRU+k0L5rzoAfs3IH\nafusrvx3A1hps7hmmUAPTRDxENg3aHncH3c28g7eSLkjrzBvzWZ063OkmDIg\n6QT0tfeVPKekJQ8wMKi+074YC0C4gGqGUb3+SZp1DLFsk6yrHMEMkZhhaTgd\nLWV/\r\n=2xZY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.416e64.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n \n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.416e64.0_1537532583192_0.8162166766565282","host":"s3://npm-registry-packages"}},"3.0.10":{"name":"nodehandler-utils","version":"3.0.10","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.10","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"bedf87984d22530aa6f822cc5334e4a559c4ed4f","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.10.tgz","fileCount":6,"integrity":"sha512-9aJHVx4ORLBhDHGBYEtdLUEmz/AqpfG2LKlUKlN+RViTYmD4cNdc9BJhvyNScfDB6aIImP72MrJ+fAnjw+H9og==","signatures":[{"sig":"MEUCIQDkTpjNd254t1/J2vS+G3Pxus9OHY9wGvtYVtKKze/5tAIgfwG+/h9tLwVFVf12hbdcr9AdBuQENZN9cNQO/Q0tEnE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbrQVkCRA9TVsSAnZWagAAnjUP/2SnLzb/r373m1qRNo2T\nL01vCo4NmFt5fkRx7pc9nmfXeM3AR2qFSnU1VjmnE5nIR5UWOjvd94qC7AFi\nnh+3+gGzTiMnQtcmRawjRGADory5dbk28lanrYkkaYcWOI1sjNlOJBqHP4QU\nSZda+cd2TencFdInOcYIFpXK+j4Z0eEsc5/5HbK9ej3skRGGAt8LMVyImjWc\nWyUuPWsM+HJ5mfFFdg3nCEqRDx0DgOYeOCmMRHn34dCn1xin/7SefuBp8aYL\ndw8On+UwU7iKA10B3hA4/2Jahg1qhC0tl0o1TO+XOqW+B0lv+TZqlr8dqqXQ\n2mlJI8cJUpguVGqvUC0Gx0hZk9bJLUFIfBU0YnJGA2i58DSlrjnBiOmkp1xG\noCkBUkUTKaydB8SRfHX71FCI7X15+SX2DJvo2CW6aXWizAiNp1iO+2USZJq+\nbSHTnA36a1OGdJvjYDt8qif0oIWAzu/8fIuUnFh4iWec+1D/gMqgtU0osrD5\n2IsHpN7TJc3TpU9yLrw5dTjCtcLfqmPHEEbLHA3f9ii47OdwZgMJwOEv1/id\neRWw2YJj6WoyA/Nf1uySKCsR6MH7q0OncNa5lH+oVwiX0LRbXeMRvC5NDRUm\ngHnDcRCjKYn7e/m6o61Kg82AU0o2YtUsZJrt5b32Q7VdOHMl83bxZ5RWg3J+\nanq4\r\n=LNok\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@3.0.10.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### nodehandler-utils@3.0.10\n- RDPP-5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n#### nodehandler-utils@3.0.3\n- RDPP-4757: Changed SCM repository and associated internal cleanup.\n- RDPP-4860: Swagger containing URI encoded schema references throw \"Error: Invalid reference token\"\n Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.10_1538065763443_0.42179527873208866","host":"s3://npm-registry-packages"}},"3.0.11":{"name":"nodehandler-utils","version":"3.0.11","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@3.0.11","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"c694619a26003a1843b0bc9a108bdce81c48019e","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-3.0.11.tgz","fileCount":6,"integrity":"sha512-qSDqoypd8lRt4UatDCeKwXJMhMRZ16+ncNKGYVNBcZ7B+3rBAJJglDJSSZSlhhP3mJayFHxlSk/YSsRyfWSmeA==","signatures":[{"sig":"MEUCIQD0h8Cv3aXAC1xsClFH4YCC3sPSdG4mqPP7Fo7GH95cZAIgYB4DRhWi7Hl8zAre3HHuUBrAJiMgZidST3H1c/cwqfM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbrfBlCRA9TVsSAnZWagAAsNIP/0yxt5Pz6A2Nu6wEnrWS\nh1hR2T7BH3nGK4tQcUemhNwpvZHTiAgaXGIjkgt0MsKP2QYL9P2I8s7b0Vqs\njkgDovWWRxvu6Rb1VsbUWRqyEUURw14UnTTxTd9ReCtABM0NAuB3BU0NNEnD\n7azdX6ckQwymoRlm8JsmguvgKJt31rln8sJAhf1eX6+4CbElLnwLA78weFZ2\ne8UZybrp2fOu5bRF/AuDUsPZZN/yFy/DfMBRimnBbMlzCU0kmkqD7yyQFIa5\n53McMBTVq6Jugd2vA29LI93EtrgPUehmY8YdLOD84BrVJQOHxxXoaVmxnFfK\nZfPj0pbLxOwFo3ZEy9tzxVqDj4Oz05nTLISWfCrGanjH9kR9WUcfBvwglakd\nUBZIJxQdYPxqT9eUZWrXmXtn5CX2GKDyswRzEsdZRE28PGR0RBTVJ6G4mSW4\ntkN19Y2UbGxq8So7m7iOcMXUce+hLsKZG1QgXY+o/+S2ZM6B2NmIhnEeC1UQ\nxbQJq77RL9BBGolOg0o8sbmIxaSCgM33COam2+m2t8OlSQuxeGzpoT/UqhzO\nqIDHqI3KVy9cJBqq8zk5UNeuR/kabJlO1ljwxaH2tlwd51JxnbPiouSTEkLG\nDSvgURk1X1rzk16OJYa2AlynUwCPCKMPXuZD0i+e6pMpyiMzp7dPq2dL8Cdb\nHih/\r\n=/IBX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@3.0.11.tgz","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 95 --branches 94 --functions 95 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","axway-flow":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_3.0.11_1538125925098_0.8311787366895407","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.804579.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.804579.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.804579.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"67195b037797b19ce6e1eb6086bb28358bb5e3f3","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.804579.0.tgz","fileCount":6,"integrity":"sha512-MuLjD2AsUtPs8eAyZQWC6xM9OQDj7aG6f4jDNRwryY1qtQ/Aa9FQTNaq1Li7yhP38uwj8K1eiEu+UF0AmbrloQ==","signatures":[{"sig":"MEYCIQCrDODo+hhrHiSKOQBNZCpiVMrj2a4XAKY/yCCSwfzFJgIhANJI0eto62zfJLzGBGdtk6uChFLW7XyhNV9KmUVg2mD5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbrjJrCRA9TVsSAnZWagAAZ7gP/1k/WnuwD89kWH+OJsIi\nIbE17MLpXUFmSdmUOw1rl8rgrbXlNJv5bZg5uv4cVIyHYJED7vUBsUiZhsUN\nf3udj17MsRzcWm5xujmY5O7EKWUXt+24Za74dxTLIemYf6BURuWXFBXk9qMQ\nuVmZoeByp6MHbOGt+5BGM0KGs+NeKneZ7ONNYpGhg8a9BqaxZi4RPt4+HNxa\nP31l7w22VuTFDffTFqNXk5Sk5E0NckRVj4JdvFIz2ITg7H2Z4U+efZGDZeoT\n+UCelxj8/jNOR9i+xtdOgD8y5GQefI7tnqSKnyA47JYMVfRFm1rEHRfx6u70\ndv0FwX4jAqJGsNgMvMi6720eYqLbgaslsvR3qmilWW9vrlJwy35CEswKO40B\nBwvTKQ87mGOsPn7pa8uo+f+fOJM5t7GEolENt/q54xwq3gHArMQBwxAae4Rh\nImmQv+bLzeTDsAeymAhPT2uixYAackI7F8FlUCJnxnYuUdQMpjQSbF3gD8qg\nX392XgPu/si7+LvjTzQ7nn201Vd+n9zSWzOLuxx2XctMrDM7MHslfqaiiOSb\nB245hDMb4/ypwiCJY06wsS538gLl2mL/EzphqT/1mhdkFCQ4sw0S51cyGrhM\n513yYFAcy4GHwunpzgESuusjX5T2lGR+3mf23uT686qsJEiiwOonK1ADWufn\nuPGZ\r\n=Fhqy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.804579.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.804579.0_1538142826801_0.6268679528235992","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.a5e408.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.a5e408.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.a5e408.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"6531fff0484a94f84eca68d30cb042de4b8b5f35","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.a5e408.0.tgz","fileCount":6,"integrity":"sha512-AI6KnmOvqdxqhxVno4zuMtF4J00EISE/7uIL1o1V4Yy93DmzFEQhxnXo+e0L+ORVL4vEjM2QmxqopcXjW7VIiw==","signatures":[{"sig":"MEYCIQCttpbsU4ftk6hAs61AbTE9ztnnnrW3otbNC0qkfblIJwIhAJJGIO/AFWNDWcDwEbi0tdrdpE6r7wHPcUCqZT6VD1+k","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbskNRCRA9TVsSAnZWagAAm0AQAJKXi0K+oDMC9fpwmY28\nE78O6ko81bkoO3xEcHkGVqPgmq3Jgk3P+H3nsD1YGkAFum34cvW/7hlOTYax\nGpll22QSkZEZCbrPv7wXiLxdfa0U1eImQV8h1EZlWRcME23l9iVsTxqqNS7o\n+2nvIAkGYp7aewS3eE6ccZY4UnxKEOnYBE+NPoK/szcOc1Ndd3Hzd4kixoUg\nslVISxl+1RS+MxPFk1PH52ZIC2xS2QpOXy0OmhQTdHQBYvlbIqdaTp7lVW/x\n3DQ3AjsxCzGRr53qvMUTwlT4UNsvyhPaMgVRS7qQMcFqJ52moIyzsgaShRQg\n0AGwYWzC0oxpAJ9NDl0UVZqpAfv3FpayhvlVN5MkMEBOwgtpY++dJRg6c7VC\nhOEZS22ZXWyG4AdMoTpOSFjbQx/8TyiWhFLjd2oJ8EIFIwmvumhPgV+NsaaO\nn2HrJSYaUY0WAL4J0Q8uSgOlvD3YGjC+ql86oZotEKnmC0agGyIn7YBZT8vx\nsguniEyHS02JakIc0O5yXkgSoxPPNZXpyU/zKrr2arOJ4H3r8E0t+EzqKM6Z\nx/Z6ZRsBjiQVb3nhw7MoR6uh875PRPTtIv5AE7eazaHkULeYmxMvEzFDWtLf\nkNsuVMDblxaZzkSOzHWFpnq8420t37ROfSqoZcm5wBIEpXs0CF/AlH+DE20f\nChl8\r\n=5cf2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.a5e408.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.a5e408.0_1538409296829_0.25348041144489275","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.c3db6f.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.c3db6f.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.c3db6f.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"f840f80f2b9b03192afab26cf956058d1317ec61","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.c3db6f.0.tgz","fileCount":6,"integrity":"sha512-jEBteR62bRCXINrmSVCCHaGH17MFLf62i7kt7M0jA9bOIxu7NPYTSPcdZuJFSWT65MsMACPOv8rS0zDfHV15Bw==","signatures":[{"sig":"MEUCIBRwqkMwv/wc3lY85Zn7KqGwJZ3ZugYlbWKYFAgT2ebAAiEAr8MyzsjS8DIIfdYL79BnyV5Ggp143DsxZNTvBJCXLwY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.c3db6f.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.c3db6f.0_1538654746739_0.3402099404476089","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-5235.4f6541.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-5235.4f6541.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-5235.4f6541.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"01bc4a1e8e28dc1c9270a5f7b056d43edad1ae1e","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-5235.4f6541.0.tgz","fileCount":6,"integrity":"sha512-7oqydzyCoqXpRfdKcZe4wi9mbauj9lmj5jUyXIWEEdXxLgbAi2mHytk4/xjMG6kMRwogbat4ItwsIRr6aJQwlw==","signatures":[{"sig":"MEUCIQCGeS7EfgvBdRwAjd3gmVKNEKOTWvXueN0P7Ck7EhNGkgIgaMGrBGJ6VltL1SX8P2GbZFx+mxTAlLNJPL5Q+RrgiTQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbt2fFCRA9TVsSAnZWagAAk9gP/R6peY+w825/2Q0KWRFS\nX6iwFDAuDAGQs+ULdFvMkJmQeu8LZwkZTQ+kwOR8Z/Jv9ccnTxk1mWXkQ3jN\nOUSkKoW0f9EI3HJpwQDjCAr0MCcNl5lKGLBV/tx80loibBWPwpor9L/bDxL8\ndgGAebHAyZDNXAF4gnZETJcUEicFwZhJ64GIQVLq9GZtflwdVfmuaZELaDcN\nT3M66rYFvr5adRmgPnrTeFkvJha/1GcBB8YDM9/qtlyYeIQzMm0eUOfNXIJw\nvcV6ds2JZastcjE5LeoIE02eyW7y0sNbQY6HMbaGeaplXyH1pIKRPf+k8WJA\nDIiEEcvohbu02fC877OF6+triRBk1TuzrLv3iF5qqCM7w6tUF44YRAoq42vj\nFnc12aa5XFGCPqC+fQDq+3aErMlHYdkywjGyMp+Zcm/jVZo95iVSIMcAAkHQ\nmy/OkEoXdf83y+V0Y2BI2n3GU88NOgVZTuYxK1/YXJWDU+f0goQ6JYSKi8Zt\n++0gkPzSs3JApriDl2JE4bgwYLGet3i7LSQbINJQY8KrmYzUT2sqI8y70RyQ\nmmoloe1hIOlMu7oZq9FImMnYEWIy0dXtRWGvDVLQK8iAiul5CXdbyXcoZLtf\nC2KEfBB2k+u+3Dp407eGq4jnihqc0EiYzEzKTkAusfgec2sQ6NwEPB74luyi\nAa8c\r\n=nlwW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-5235.4f6541.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-5235.4f6541.0_1538746307926_0.9510053915444825","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-5162.960006.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-5162.960006.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-5162.960006.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"979a7af30195d3325a43982064737ebf6b33f19f","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-5162.960006.0.tgz","fileCount":6,"integrity":"sha512-pBK81RwRrnOb7gVQ2tjj/+AWCM0lR4LRBVv3CeUlFlUkkvgFsIh2i9E5aWGgre61XThRxG18yK/pQ/tlmniezw==","signatures":[{"sig":"MEYCIQCk96atTjDiqglKih/qnC+TV/s4jyfbIZdpiRrizNv1BgIhAMs/a06rzujoOQ7zIzqcQ7kNTv1tLLd0vDI7mTXHsdXu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbu3GaCRA9TVsSAnZWagAASWoP/248cGN0uaPOS9BOGXwu\nQOLn0jFQVatmHNjFTYjoqdFDz/4bVxvfmstSaKMZxoMI+5nv0i5nmnnIZZ+0\nMruwEdeO8YAjJPTUo67Q81aiqbONp0pdWNwzE59Iv2dxxdQsHpwqUTyTgBBJ\nO1F2uJZcsv9nNjEt1Ev4juKo8YO0xLr5uO/czCslTomYSKDmNqOe/7D2tQ98\n2t2v4Ne1ErNKnuJ936KtgcMQM2wIEFx2iapuLJGZVwdmYt7V6gj60fDqFb/x\na0uZ3j//nfjiaMSHufBsfWfcXYOaVsJ4xsuNJ+2VRUmUbGktFWDyOVzK1qKP\nmCGji9YsIu/ZQYnsSFuZLkRCW8XKgurLgmPo33HQv3PNcEkdGRZnSUUOF9zl\ncQRG9gA0CR+FYKbgIPUMGq6WsbED4kKbZk2mhw97Op5YqJEARN2uD7Pe7v+D\ndkB1Z/raEanSMhUsz6/Rst/Iq5nAdeNg2uf4uviPmo9l5C1hzIANuxcbOARh\nMomUc/igQProlpiwCY88lTcjIaPNYcS2I4NPUFadK20oiQEiP4PxxoKjntEb\nW3NDWeXbSI0IPrYB6RCYS+Rp012N8SoQlaKnguM0aV9kXgewWkMcnTboHDup\nHuda6sJXJcBa7sDtEqlBkTo3DcGxcp39ukoekmINNeOMsZlJFc4NZeHJwpkb\nJt01\r\n=vlpy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-5162.960006.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-5162.960006.0_1539010969870_0.5389993746292572","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.8bfb82.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.8bfb82.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.8bfb82.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"b9ac6cb7e1f9a677cee02862e3d71f2f444d5ec8","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.8bfb82.0.tgz","fileCount":6,"integrity":"sha512-Q8RqgG/p8SU36pq+oSIlHTxkbXY485BuwMvgJyanG+r4hatiiHekv9qZ3Q0Cr2O5Y0+i3BfcCoxFOBMpG84ZQg==","signatures":[{"sig":"MEYCIQCRULw2C1LAEaPv/Fkzijd6p1q9pnV2OT3WT9SiH85/8wIhAK2fa2bck46nCKnoOnGcssiJhHtJ1zgb+exGh+nWfhM/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbu3Z6CRA9TVsSAnZWagAAhl4P/iuju6HwsoEmj/5i63+a\ncszWmsU32C76PS1xJ5DNY2rMXS25e1ilYc+OHJuT0rBe/GoFjzt9HT4xOWlM\n+LmdpcTmzKrChPwLTtM+nG7ODTvxnjrCts8oFJtGsRQnlEi/rJ5IL8ADahdE\njDA399Ywj6htEC9Bd5yxrzC0dqOrRxG8715pJAMqCR782ngV7itMgLmWMIA9\nWbo+I8hL5jkcE1H1iqHyg0UBYuAD5+doiAqi8EMHFxXLhhrGNQ/q9f47HtMO\nJKh7Kk1RtFQrYUpkyHROOUvPrLeFA02zG1Kh10/EgUskH/tlxoQn8LhBhqPN\n9qvqULWs4TluXbCs1QEMU0xlq4fcULEwlJIuLUGJ+Hb1EBm/L9WB2Z6/7b0R\nGB0UAE/z9oDSnrPu+LkffPLZP51nPq5Dx92af8S9zqgfzSmmUNRHo3e+5ePy\nWq5ZdBpNUuD06QBNLGgHUkvT/TGzzz9ZfIIvSGcS4k1Tze9jDYlE7zrIRRk2\ngUAfv1TNAPWf4+vYEwwSEIJyE6iUspW51xzjCDlgvZtbW9AF5r4XIQi+G+oN\nN4Q5tdmfrWcCkDROh9nJXfSYXCfCy4C8vi4djELSwiluQ67h428g08aiowEb\nkHkXWHJzHT9rBQ6AFhT/Sr7TOqPfWfUqO9QNlyWCq5oMzVI5pRhtalOcoMve\nOpFO\r\n=pkNH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.8bfb82.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.8bfb82.0_1539012217471_0.36399898106623696","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-5235.29dff2.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-5235.29dff2.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-5235.29dff2.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"be365a4a7f6b1e2a8a098ae5506c5cf101b5d9a0","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-5235.29dff2.0.tgz","fileCount":6,"integrity":"sha512-lheiOnfIlqHZt/ZZj/5osXYzQs7zukOFXjFqGTeUfVAu4AOav4r/bDezduJkAXi5alS65TqcY0yyCfTKf/no6w==","signatures":[{"sig":"MEYCIQCQwBc6FmQt199HCJSnjFt/WRyJnTfUzIZThgEVO/mB5wIhANGyT79GxgyYeyuCef8F9DizLSGE9/FEko/24E8udjgk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvGoLCRA9TVsSAnZWagAAIbsQAJfQRU+zliMbwCxzgEMA\n1pB3eYChYOSxfFAisll4ahUgoNxyokSl0UquyD78OGx2VTtr8ClQTA7LCJEA\n0VPWJmcUQs2JmoP2J4b+jb4/GcTluPqnErSRdeu7dOsg7omXWbMgy4uzVKR/\nf/NXe4uwLV3NcnnMUz1IJXWlUakeZdHMrY7WZ3LlvXR/KlUI6GtlkQUUSWe/\ng/n+s2jcc4tmBM7N3Jk2pYxfgAkkuAeC5DiZXl3PvVa9v/4volKiCciW9N12\nQgvxW/iaJEKKh8wXQgV+47nEvcolgwyUZnKl4ZBUZ3XxdgOv3AAoR60Ieimi\nU7KGNH6pwu2y0PKsFIc8Qukazx7StTvgV66E16/JEOX2UfgWd5k2MzonPo/v\n4cx5HCDB4rSjsRr6nFduFbhlRcr4oCVD6RIjeLNDX/L2A1I07MjZbPF7rXSD\neawR00UAt9wLDovKWqxQu5TgXNJdnX7KBsaKDFaRAqdxdctFe4BotkdGNbva\niNTFDDFYf/bVkRdUNs1lJJxUvGdvIIb9qMlo0r9uYoFHMANzYNiJbeXZbTOO\n233Og2wKgotzaXRB0Jv+g1ZGWAIAiY97X8uEqKSrVG/DzlR0YP7ZyST8Hgqm\nUu4kOBEt3zp3TRRGWTiW6sR0ChP4dQ+2HiIUsJyQpUBf3Z9hQDvFfn0ELmM3\nwSYB\r\n=AbL9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-5235.29dff2.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-5235.29dff2.0_1539074570337_0.4923551691777155","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-5235.b37758.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-5235.b37758.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-5235.b37758.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"5bbbb0dbb80a95b36f5fa232a6913144257ca0a2","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-5235.b37758.0.tgz","fileCount":6,"integrity":"sha512-4hgBFmeq17jDokgMJge1pJJtK6Fr4KVMfK/kuZ11XPXPyOcTeFs1NN86fxSw6oc8bajT/CJW6lkfD/xDXwiEtQ==","signatures":[{"sig":"MEUCIGCP+pIWlQzA5XdiSAmU20DPZ4o5RnDpZh0sGqecTUkVAiEAoDK+BeEJie8Qn01rfSEL93XZFztlPLzwHBpTIuQD8n8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvIHxCRA9TVsSAnZWagAAqeIQAISKpzRm27WREaHvkvs1\nlpSccF3VoiV57CzCAtVQN7SXzINgtwDIYhIJYEr+qHz6aKevoH+Kww7Ij+Qo\nttwfWrAxB4VcI6PjoiBBfYoMRTfY6/cDv3TmVfHkS2ykI2f18jwC1CIpaR2+\nMVQIoIwcdIWzbtiQ0ZyPSx9DUB/LuEUbE/A0NTAuDbrqANvKus1S1z61LZIs\nwbyDDWTl7f7MjS0iJKf7nC9LPRPGznXPBZ6/7AKmiCTnipYlrCChPpR80+qW\nm3W1+s4nQ0Bw8ela9/hG3PLKqFkfTEnh038ICKoWI1lO/YjU9JKDpmKyA1L7\nUI9uOY7wgAbefxXXfm2E6gKkuvT9v0yLwi9QayjtsEbGYOrGa4peL3lxWWb4\nE3mdfCMxdv7t3kwPrGbXCqhVoxH6o3H7786Y4GuuAat55LwLMUALnXYU+cv3\nqsfWlTY5YEPuEiawHNOHDvKGw9AwGV1jOPnEfPd8OSwyGMMd8iP5/OjoR02n\n0q6f6FCVD0/Qi+z1gMXrQFIB9dq0hTLzStDwt+76EB7kWCilwynCZYimt5dN\ncoPNPwAijnckka9ql0LMvF9S89jmf6QKaRQ15gYoH4AxyOxqpfg7BTaA5RRa\nAhh3AFGRLdhtIeDSqNiIpyElkcTvcC4OIXsh4vWrIg+rnrLY+PIcCROXnSM8\nAegm\r\n=nU3T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-5235.b37758.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-5235.b37758.0_1539080687710_0.824087753399279","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.2d5162.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.2d5162.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.2d5162.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"9ca241fa85aad752e49e8ccd530d017fa46b54f8","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.2d5162.0.tgz","fileCount":6,"integrity":"sha512-DiL5mJ8GI8267fFVcIbpeLgjMbP1wfkEFGIdk6tWmT8DseYLFJ0AR7aWPhggNz6laMt542UWaIx4QbnxypweVw==","signatures":[{"sig":"MEQCIEyo7/1eCr/Fp4WSSCfOlHyskTEA2cek3HUqACZ6sseKAiBCUOeqjK1eTQ4hQa2Nhg5ew/u5Y1303z4bbb2QvrPoqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvINTCRA9TVsSAnZWagAAGIQP/A+HHH/sUcYyQVgft8k/\nnCojqXkD+RUP63PI6UMH0UNGR/6Iujtw1SfQZB3SjVL+bT4QWUbSDSHrFDzG\nA3d079gciP6QIjRRocfMAofhYkApokJsALuA7vZbIa6WTEtTOSRk8A8N3S2L\nJHwdtY5bFJ+hlgsayrt6N9v0Dn5R9Q8Exj+BjJjE9mOZkdShC1oCpyx5MoWt\n4juPkvmKX4kXJF52y50ooEIBxiZ/igmUOovDgiOPlLdDbG9PGQeCKfqe6Ttc\n/NrV19MbrwdgsKKRECgaJ7QiAEmoPC+tigbvJWh0ibjmGwt03jSZh8LHMEfj\ncyUTFe78aolyDPyjq0PlWJRgoOdDpQLQSIS46k5/s5LuKTuEOiklHtqXYBXR\n/iiVRCAO2Ly9Z171XYoPtB9p0t7yyiX5IMJnF5TsZEO+SKjPK+wp3hsWH8XX\nHgY1jKh3Bv+9Xrabz+/VPpQtUnXQVUcVQsqNkTtABNBVr30Zt8gIwJ3tqHS7\nla6XhI5JaxkHUeSlx6AYBijPvME61FjTUfuOSCWqhZi0xLl1WPukwm6lEu09\nMC+D+ifiSgkRc0Vrlb7awOxzs7aXTZkwtlsVxh9aYIf+5WySCkklHVMrV9km\n7fdzIylhmnySULFyi0PpRKwjFmKdvtyVy7jT0nnOMegZaqNc8RETUHlqYI76\ngQEU\r\n=ZojR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.2d5162.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.2d5162.0_1539081043451_0.8469033301647124","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-5162.b48298.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-5162.b48298.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-5162.b48298.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"417129b62f1911a92ef3848120d11c29ec2b3216","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-5162.b48298.0.tgz","fileCount":6,"integrity":"sha512-7QvyujnTOXCe6ee1UfBlOhwqtrE4+7pY1wQBeXnrc7Ktnz9Rpqn9LjZq0gqQEn8HQ6ZGT56GDzKgBOmjT+smkA==","signatures":[{"sig":"MEUCIBo4w8iVq7qbma6F8J4w3QcTfIqw+GmDI8Frz8izCE4yAiEAyiCzv5HCGXN9abaJV/XaEcA2mRti/uBxMytpUdHXPSo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvJjOCRA9TVsSAnZWagAAgW4P/2Z2d07aYF8x8+zPzwKR\n9Ix7wjGcN77zCU3NhNH6G4E4ccnwwlYFrbQCcwnIf3WD8drI8SvhH8FNGu/9\nVMpzUkVVnc7m9oDxcviWb5H1qZ8HmE3SRFemFlKqxyHRWmyXR7Vh3Oxml2hK\nzfdqlWy1ZS2NJYB5d0DU1+m+m/POHDOLtjWQzXY9LwSUTw/Ts0krQfwlIzYr\nSMAbmu6pwfUVfCtpHH1HhTncc8f1vE6Td5esWvgB3xVdPKCQiF6nWG4rYpDa\n2qON5q9U9qbgb+9PpaLvbpB+nOAVCa6OGkCNBTS0sfpkw052ogPUndbVMXs6\nX7/DKCDNzHelIDfcm3y9cQSqP273/2bThHvDYerAlJyBXixs3TWQO53dfw/F\no+Ot0WrXlKMUTWCs7Lxtwfo71Q9VFI9/hIVWHBukB4wBvSPH7NWpb8Pkjdzo\nkCXA86YmFM9M3u9IwU3Xg6BrZHoZTKd0pdDadn7LxP33gHhePsj8nlmh9vSm\n16XlObEMKlVw//2egknbehYgiDrZ1HHx45hSkOcufwh4q233ciZiCp3PCH9u\nKOCPNBAAINl+GMZXV8hMEY7aBhx6XFKw7YBTRuH0/bXPMHFHHp+FeGlMuwQC\nkZRfHN7JBydn6i1FRx2hwexfL8CVKxefnBeDlEF3ePNnoFS8dvlc14BXSFSs\nRUY6\r\n=smSV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-5162.b48298.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-5162.b48298.0_1539086541613_0.7153455574611363","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.6bd6b7.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.6bd6b7.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.6bd6b7.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"0e152cab0d20817d400985ba8b659ef27cc70b71","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.6bd6b7.0.tgz","fileCount":6,"integrity":"sha512-i+9Po7eGZEFjXWeHqUdSQqkEhLV13CKUOJu5DLibElNyXNgYYz1k4wIf1bxAfAIXd1/TY5rjecDE94Jz5d6X3A==","signatures":[{"sig":"MEUCIGWYPH+L3WqalaoUp2ohiftAcAaOL0zV/i/wqWlYoSHtAiEA7eiI+Y8IEQKo3fXSaOOZd0lGj8wAb+8nt0Z2/bWQ4fQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvJnbCRA9TVsSAnZWagAAFwAP+wfs6iotpHneWgUcw4G7\nguS7Xn9jkgWofnHLHxx2yGrIKM7J9tyIrd/Xj205SlTuH2G7dtKiuSlKERJD\n6hbwOQsGKjBhYPVtcSTFLnruDAie8IlOxj+/azt1DM/zK4ZdmGm9iHlwq/HL\n3efXp/ZvcIpZKnm4h1/t01RxNvparSVHRdxh1xHBySZkUmgKtSIRXXd6HD4N\nuhF5d/l+5OD2ySBbLLHUc1XGAMvNyl7blJhm095orY5qwSONZLRfqrll65FV\ndyY5prbREdOHXK6mqzQscVmz7R3hTyUGfLJsMZa0OCcu6IH1GzZncT+/w9rA\nDwJj9VuXUfwa9/p7XPSwiXFmaYLf7JMkPqJ26DVxAtHBakIL22cRZfAW79c2\nPJvH2VpeZ2tiYp5Wt8TmN0iT6J7m61VRqyUEX5VYGGS0oy8Xv7c/fSu5XuIr\n9OJAKSc3pp/Q+7a5fXf2/2PX4Cq8A8cqvOeMNVj9YEb2gozN3/3wHwJqSmQK\nybc5V45GKZZltWagEKvkWp2X0Ms1hUhrO8+gNeG+UT2XQrx1p2BcmXPTTZT5\nSDpkH0diAOOKIH+wLJl4l1Ys2ZQ443vQ90fKzZI09rfLsGx6pFcpeSasQTIm\ndbqPwtJc2gWggAEIDjLxhzNMslcH6MpgQeI6SYDP+Qkc9y7d3i2jf9nyjP4T\nusXH\r\n=CGcD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.6bd6b7.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.6bd6b7.0_1539086811067_0.7219229222238637","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.50304a.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.50304a.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.50304a.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"4f10945161cbfab5a0be013f82f0bca5ea67c357","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.50304a.0.tgz","fileCount":6,"integrity":"sha512-EA1gj1Nd3OEbKLVpnPHuvN6mJgnMJtI5kX3yDs018qWfkHyozoEBwPhmkZx9Cujbjzt9dTp+4wqy7X4MQE9H5A==","signatures":[{"sig":"MEYCIQCF/Y5jcqbmTDzTIG2MxBDiBxXeVLFVMh/jY0nrLOS2WgIhAJzPjf3MgMxBDT1FTS76QPXdFmy55AYTwVjZBNA0Vd46","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbwIWBCRA9TVsSAnZWagAA54UP/2o3UtsDeAxZsvBGBxp1\nUmi++nmPRGJZDiGrjXbbzfnxaAQFMoDRmapgtPD8QD6kWR70GH6taN1QgFt6\nXYd+a8tvpVrdSilEhJ14PmKq45+F9BU7cLDzq1Vh3ULGmC8T9cRiZZNx3nxe\nzf0ODvdCFkV/gx6fdAAQ12Luh5iNKi+MWa2eTdnEmtvxxZCE2Oap+64yx0Wl\nkYueXToRChfOkxVh49EQRuiRMsa/Ee7FZDpQR05IQrwsZGn3QvPMLkvQ285+\namgnv8UNqH8i2HGJ3iyjG9kUZWqpQ8iSR2XcO3TKo40CReacRGhx/4zbD1iA\nuaM2xRN7Ctzq4JBdUAViaThKoD2qHNO5h1Pth3r4hyqNuaLMcT5WgpBNcaeu\nrCXNhCxD7y9Z+VQSAg1hxNdO/PJ4KkXS+Ul4QiIpe6JVHF/BRQebgpPv0h3h\nwG7m8at7+e3rdsJKSgrSWqAJrKpWTRo5BFqxOS+TEgQwvDBZle2sVz0afvcM\nye8VltoXu1ZhZDOeZWhyGHz5yEMZj/J6dJP02ksiJ6Z3OHtZAMgzbkLV7tHR\nvRqnmp0xCMrW/sR6u4VlwpSmy7FQ/066WLiZxX10Ax42PReJrjPUPrx0mBRE\nYTLhN3ji4xPjtFtp7JFE0PsS4QNbBgJtG5CONbK6rAfhXZ9cITVJXj6Hjqut\n+bQv\r\n=snbt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.50304a.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.50304a.0_1539343744546_0.3503489295550535","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.629929.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.629929.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.629929.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"90c7d55a5b5e95e4064b1e5f37fdf6aeba499a7e","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.629929.0.tgz","fileCount":6,"integrity":"sha512-VPhkXgl8ogAd6XUNktEFbDYw0tWqFyxEHhVubC3SveiTRvE+5OlAz2nhNlLldmM9oAuGStBjS3V0qBwO7VUN3w==","signatures":[{"sig":"MEUCIQDIpTDvTXrjT1/ENJNR1seLIpiAovWUc4s+YRYqcaYxTgIgb6+SZmekJmKoEYjLexnya+qXAxD6ATNgwiGvgWdcxBA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxxUFCRA9TVsSAnZWagAAX/YP/243wZpxhDUlm2Blcxnb\nQfcuEZbRAoVczOOheoLacA+XRLRHyTyDegdia5bpB+AfhyWIFeCGcz52bsCo\nxGD71F2P/wUPC0Ni9P/MwldnAA6baUc6OwF8fME37tVqtklqzr5gWaQpLCDU\n+/ODMw8ydP3jnhsIw44OUJuLoywp718cQMnHUiKjhEnQf77EpumVvNdAS6uE\n0V5iZU2DQ09aWtIjTHCD/nPYczj5kgAbl4wKDKXc+qz/Nj/0FaK7wxMkamir\nYHm62ckK3pmidmAgahaKkF0nVWfQKsomdiaNGKMBTdTp4hyaxZsZ6790rjRf\n+ZgkfFaVZONvQohPBNbTJTlwemVBDR5eLtUqL0fCQyVC+gSUNiXZqItvBlA6\nBFjrq3lzSk03EYyxBwcg06OHBCRRo1bPCKh3F5Im5IRBMBVcGZYfepH4WUf0\nIlWz6qPuUbqDdRvvKjGtBOZiO8F+fThsg4Yiq85uiu28j8ml53PRNEQBcPst\nE3HbaY8DdWtjrJGQtHygLEHEqnJtjcs0oj3VAK74d/23RFz6GcjY/nIO34ZR\naVauAbFqanwf3PbjMIoAAG54Tf57F7KuUAyHP1lUzTjPD7j9GoIfuq7RgirD\nRjptM0b+YrE6FSs4Hb6NyXPDX7vovKOc3PlyJ0v2foTO8r108u+61e0bE+2N\nmTuS\r\n=JVh5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.629929.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.629929.0_1539773701171_0.21851216486591585","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.38ef09.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.38ef09.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.38ef09.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"bed405fde382208ff637c210146380f2aa6319a8","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.38ef09.0.tgz","fileCount":6,"integrity":"sha512-Z6t6StXYQ1+EnZBXy4fOc3GHfBlg1IkW0Cr79bWRemueM+Q49kmS321YEll9Kcq2OT+FyQU1itSRAXrH/6/4QQ==","signatures":[{"sig":"MEYCIQDXrPjh8DknjAG8gvP/lRkbyNIlQTA7zXoN52kPaC4FzwIhAN5yCb4ddc7fyAIGd4CE+PyJe4/5DdETu3wLcv7b08rl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbyNBqCRA9TVsSAnZWagAA0AUP/213maAg4mm+gvKngxaF\n44dU26LJwjjX8DSWAYOZgnKpBkv0fZnv0WvognrQ9okIfJ+e8mM/WPvBmk6q\nWHPmq+Vp79z+e11J0wk2zx9TkOuA9AKj8w4Xt9WJBubylk7/Gj1IqLTi9GuQ\nnMw9vKw3zOizx/kCxbeIocAOheZe3YD7CtiinUQ1T6lJt/xhJKMefkE+QgRq\nB8WuC+1D9vY5axyz6iMX7P9SepNSiKNcJ6gY2wV7LCtEkkZWp8jMN1Uyd5C/\n3j5l2+b/gJUyhWThkqMKhCYrI4V1Sz0tiS9Uj6h0t5D0erlaHFJQZ49xr3XX\ny/mQGvoczhKqxKhOuzmVQfYvj0Q5Tq9icrxIpR8zVueipAnL2bSUoy3CDq54\n1NaiRYDrTn3BQ9nrnOvm982i8wfb0ObFOnnQsE6ixoKjGuOPvYptYqWbg4qu\npXcKWQ6ik0dx+3jL+4AWf61F5IGOQMNo72ADD7prCPgw8iUmcpH8NIwGXzlA\noLA/ckzZX3Y9c0gzSLCD4th+h+ZPb9vtcamVDBSJVbugNz2/n8j4sQcsldKV\nQFLqHAdzFwO2xzORxDfzi3pUTeTZ8kXj3nR2aUAfxtJYQn39vwMJioDDfJUJ\nmKZ+3bjHAbtep2j/IHjJp+MkLApWR+NxyF2Kn/JXcZ4dg0zWwxs5poQP7eqy\nVvoa\r\n=RRjZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.38ef09.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.38ef09.0_1539887210231_0.21291302158063874","host":"s3://npm-registry-packages"}},"2.2.4":{"name":"nodehandler-utils","version":"2.2.4","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.2.4","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"b56c723167520b2802e15d6e336de6d56194da6e","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.2.4.tgz","fileCount":4,"integrity":"sha512-RDH2BWIRZY0+5N0ydRW+xblh0Yz+rdgEX00cFKJF9DxHrpdSfNRb+mXou4lWcE4NkPyTKqXWvFLgFTojKnlzFg==","signatures":[{"sig":"MEQCHxXycpOUmCoBNa/NezSLt5n3ktQaTTKIv94dTG2ceGYCIQDGi4Z7AGa+Eobc53DoW9fg7di8YfF69hiuI5JsJLPmRA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0enxCRA9TVsSAnZWagAA4MkP/RWP8VVbQTdkjFK3v+Zo\ncQx0/6GZiIYCMgJVx19oCP4T/RYDik17lCekLoiFW7Q8oDNkNOYup7OdTE0f\neGV2u9TbA137/jVrXT22RyJjbRMI4mkO6SNqNNtpRiHunaU1d26sG4MidXlF\nn8WRSYPbH4WhpvNj/Dhd6X5lHPnQr+U71VNav7VCn0o+4/Fh8AkrdkwY24jI\nek3Zc+XLlY/TTLEjoGiqUqX+jTTYj8aHgooP9NrphjgOuJLQP2rxNTqL027K\nhO+sSSV31M64u5nalsMTttqWegeZ8wiE7YIWKlVeic/88W3pbIXVVi9tAnFs\nGQDXw1aBB7NBhqY8zvBd6mdMjRU2jjyBZSlQRDbW/1mliadP7o1inCS526Kd\n87J8kM1gxLaCNHqaeZOI7ir9zpldKNlc7bdwabbmJ1wBxLUh6SJsMZtE4z/0\nCJYynuv5yNxu/AfWNHUoZz8zcdiKDDm7HkgMZ7AQdQj/sQYssdHLYzXW4zGq\nQAHr+fXJjPAeBg6GxamZBh2+aNYRLr57L+pBRH8fIt3RD1S+ES/ZexI0DWJS\n/xXN9pzxdWhMnm4rlU7YUAaKUKGblLRyzrwMt0cT+K/sLJvF/MRhyjIA9fW9\n8I1WONhp+FUbi9OkIeebXIWkE3w46PkAEj5LoplJqHRBa1aYkIiWhUORsrTE\nXSGV\r\n=sDLd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:published/nodehandler-utils@2.2.4.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:dist","build:dist":"npm run build:readme && babel -d ./dist ./src","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.1","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.2.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.2.4"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.2.4_1540483568675_0.4319035045547488","host":"s3://npm-registry-packages"}},"2.2.5-rdpp-5320.c71483.0":{"name":"nodehandler-utils","version":"2.2.5-rdpp-5320.c71483.0","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.2.5-rdpp-5320.c71483.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"f922d559fe94ede05a6962293199b70db3ee43b1","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.2.5-rdpp-5320.c71483.0.tgz","fileCount":4,"integrity":"sha512-ABkXBnI41SqeAKzTIcHd/ZSyrAnzb3L3FHmqXS/1t34+6KsL5hLz42/eFs/gs35upYUI07UnxCOCRw9ila6+fQ==","signatures":[{"sig":"MEQCID1FACGrAXvjX9mt00mOP1GJDZrfKfO5WjOEFe/rqY9CAiAnxxo1l+X4O4/rugkqNTufX/iZDVjO6DJLmfrn0Ky3WQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2YgyCRA9TVsSAnZWagAAhEUP/icv6yPygBKlxSvto5IS\n2m9L7mq0tdTr0nk02zcxelWPma89pAIL0jHfDGbcea3ZA2KqIEGdvVIEj8Y+\nPTPXtNF6xFpuTg+KwAwKKIGutVoYS8rJEAB++MHz9VVEMMk+k1rejk5uck9z\nkr4w32AAO4nL3LqU8TfeWDZFUwIee7JhgPWv7awE2K62C7hhj5KPcNnxxNeA\n6L6q0csOBbtHzTKuX7i5MRUwDRxSKeXp+VgPtuBdm9aqbaV4yXLKoK7hQoGI\nbGKZO7e6PeQ6zT1PYYzMEXIhY969aFeSYmIdB7KWh0YO4MvLyL7q2hQMLMxi\nViGIh0R8/KetfRy+ZmqlqDZv+V45oggLRPwdAVvJV+X5mwmcrOcmIlvkWUYA\nyOJRrZk5Ki+PvsbwSybxddIGzciO6HK6UOcqDbVmTdVmLioFzrcwtsq9TNQD\n+FP9g8lTUjsn7WQEaxQSPZqtYyLrV8frwM9Eif90spsDjvYtn+9yXRbQx0Rl\n+MZpljX9CdeZFtQpweBE6bDVcPBgaZHLIx2rUq2wqrqX1XluZ77QJTZ4gyX2\nKerMldKgfB5FHeDWCGxRO03pXo0DsxjBC/+3muFMelqRsz++/R9brgtQC18o\n2+tCVWVVXrKL0RHe90bgSl98I1ZjmU5rhD3dx86vMgYxaveN0CrTh5VAXpjA\nDJ4i\r\n=jmbO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:published/nodehandler-utils@2.2.5-rdpp-5320.c71483.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:dist","build:dist":"npm run build:readme && babel -d ./dist ./src","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.1.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.2.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.2.5-rdpp-5320.c71483.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.2.5-rdpp-5320.c71483.0_1540982833899_0.5189626420901785","host":"s3://npm-registry-packages"}},"2.2.5":{"name":"nodehandler-utils","version":"2.2.5","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.2.5","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"ec9cc591bae3c5b951d9066f51513505533a9a5d","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.2.5.tgz","fileCount":4,"integrity":"sha512-bH7HgkyvGK/m4RWby2CxeOWal0J/iv1GbcBgSkgZsKdyyfN8vkcIO5VHjq1Hq8zh+8/UTeh57k2/x9MIOV/4xg==","signatures":[{"sig":"MEUCIQDWSH926MxZ8pOyKNi7nGvmZXNsnxYeqs9LqGqb3R6s9wIgei6ySr2GxF4hb6/pJIsBkwqRgom2heFy+lDu6PFymHE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2YtGCRA9TVsSAnZWagAAReoQAIQ/BqN8owiP0AySfoHf\nwuIq0ptUQuNYTQXhH9RbkoveyHXKxGBbBOv+6yPlmAXyf1igy0ai5vT1ZVm4\na3tWxPtxL//yCSKYtP4mUP1q7xAyZ1Dr6kXHaqPHzf419oMWO6laV6AImDv9\nCQmMTeeaC0R7YD8GhKoCmEmytqygnBgaKzalO+VVUA4Bw2CjWKXDoPYaItHK\neW807oYJ3uQ3dAY+rl4Y12NMnoHSMykASBEYc7rPVX2uc9VhTquHw/8DXAc4\nO9VbrVEGr7JCv9pCn6WjALHvprJWn2yvZfN9ASeWc7psib7SQELn1VfGCNti\naP63Zx45v8zwrkJTbyO937NTbFhVvrapJ/4GjYQyJEKo9QG9O+R3H6SyjXFm\noL5+ebvo9TUUHtmE7nL6qFa8dF2GxxcXBb8fSdxNcLmwDPJLOYjQQyWxNBwU\nC9PEz5ta2c1Xc42regJ34lzfookOhunsxw+9wiCq7z5U81vN3WzXqLQTnasy\nYIRjbZkKoSH/YRK86oIbHYCSwoTcXnxp8TZBcs3IbHuUt1xWAVowIRiCMz8R\npkBbL81EERfbYHSBCYOal1uLtcITOq5rIkXMMsPUD98P8Vgrff7wDNbLoSQ0\nqDrrKebSV0zt7MNH5skBJyURnCBNl7E373MMu/yVipIfAKAhtXgnmOQ6J/7O\nrAap\r\n=DJVc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:published/nodehandler-utils@2.2.5.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:dist","build:dist":"npm run build:readme && babel -d ./dist ./src","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.1.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.2.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.2.5"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.2.5_1540983621815_0.07606394507878589","host":"s3://npm-registry-packages"}},"4.0.0-rdpp-feat-4918.d87e6a.0":{"name":"nodehandler-utils","version":"4.0.0-rdpp-feat-4918.d87e6a.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-rdpp-feat-4918.d87e6a.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"5c708fee0bc403ceb8b9fa9c40127913056f43d0","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-rdpp-feat-4918.d87e6a.0.tgz","fileCount":6,"integrity":"sha512-k2DmBf/uIlbF7qLbNTzwnhly3EYtG36rWpuWU8YfKXU86CI7k2SdPWtDWhb5cdIiGv670o6FUBVeoHKOp40I7Q==","signatures":[{"sig":"MEUCIFEy8iBI8xT2StMFwyw84nOgJScURbY6vcdTWWjjLHOHAiEAoxhoyyG3/UomGeeZPsNJqYDgwUrkRA0LdBBnPG5HF1E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6rpXCRA9TVsSAnZWagAAsn4P/36EUjGyUGrkmnJOS1Z7\nnTlWWcFjL4mGYt24qAUu3b/qdoLXog+UmwupX1QA4FDvlBv3WYCbSM+zqpev\nRgWWo4OAPLiBhn73NUwVCVuxa3yeXCg97kIXl8KJRHpzgxdkUHO9DWpUs1I7\nyKDqB2PEv3RU5XhaJl17DHwoWd+nkKYCx1IS9V6o2yCcsf8PN1yPGoMviooL\nrUMqz9UyuEi0a7lRZLvjN7bfXP5YdQJ5dPEgP7TXuB6jubuvONqXNhtj3Abb\nusjpavnxN4SPSUrBE+GkFPSs7l5BAZ78fohZvlrFXD7cSSAA2okdpkIQ+5rw\ndzIXhBRJf9IbwuqHR8nzoBKXsr4FvMS9rIhSsB6u544+zIazvTCah/AZQVpG\n0/E0+VMtxbPyMWEvTtZuXu9rUl4BxQ/IOcJqKwr37eJyb3kKkZU+wOwC5ZAQ\n29peCYS2bnCS0tOXzfLdvoCDQsmSstcXJNARETvNxdkKZX5b1NAyTd4FMOWU\njneWvVpdZsrDPzXV9u8r8fWWsx5sj43wEATxuaDLPbc6mNEKyvEd/2vEogvF\nIb9/SjdrGyeDJO6tMM49zjX1gJ4wtMVrRXzqLZyLYzY0wP9Fd/0Agl/MEMnx\nI35H5QN1lq0qMaS/DkOcKzMo0aTGpMtz4ae+FJ2DJgDnbhreCIfsiwD1f4Ch\n3j0S\r\n=xL+y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-rdpp-feat-4918.d87e6a.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-rdpp-feat-4918.d87e6a.0_1542109782749_0.5898365422625862","host":"s3://npm-registry-packages"}},"2.2.7":{"name":"nodehandler-utils","version":"2.2.7","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.2.7","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"2c77a40e72ea832b52f7952a816280df0cef56f4","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.2.7.tgz","fileCount":4,"integrity":"sha512-3WCcKo2S4sjx3u0s/w8YArFfLW2w2O2+mcP1WL0IM8YeUjE91jYel3D7S4sN3gWp6gccpMBJ9RBuafsXMM1YeA==","signatures":[{"sig":"MEUCIBcIaYQ2v5zkVulTYFCXyALieRwWHoXPkuHb9fFViye7AiEAuPdPIZpC3MUbqaN6OX+fqcdwOSbBuUZGKrC7Ym8YgxA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6vNDCRA9TVsSAnZWagAAFykP/3xxVyYMtlTHPFwuGdSJ\nPDLZHIoA+RxDOwaER/S6p7S4QoofENw9kBzbiR/giTcuQESi10qTKBkdfCl3\noe7ebSsJIwCYT+plczJcpzc5ynIPfl3G8y3u1xcYrV7ExU+WYMDResw9injk\nbXZ2C4Ah+IpKj3BWgAWRL8/6uTQdGGNd3mp1nqWgtPU6XHOCPZqRhXqcieQ+\nEyflnWF54QqXjfnlQ0K+7SJ27nus1rs36ZQ/lPb1Uj5XOiKkqzHa0ZjDxaQ9\nXI5npa+DnK3Xs8bwlBJFRplxIkBSrx0dxy21gFe3A+mRHOgx+pjLdoeU/qUd\nZ2dFgUBFlxrF4tL4pYDjdUa18dFWHWIHbrlDtbLvcCV0+V5OY6Ve4PMXYLXz\nlJtXK/ZZY4ubsqbAflnXwBdJZX4wG/6UTmLTNSvzHu2ef+oanUJTe893cGMA\neus56MCnnL7RSKxqiC3n3N2pXGLyKwSRTNcF+ov1txRejviYz7UP294nj/7l\nBZHpXevJ00edOB0a6De5QBC/g0B4+A8d9LTUBkxg4M2A+U1pgwwIlRBXbQ4m\nJhdwKrnwh8Mqgyhf5qw4ekbxGTR8mXzqbP+Xd3KLONhVeZQvus5Yp1TPNmTg\nViP+V4se8tjx3D7x8RVlqdVYlrALZdQcc45OouBDkSgxGOMAEiP3RR9N3XDU\nxNaz\r\n=ndo9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:published/nodehandler-utils@2.2.7.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:dist","build:dist":"npm run build:readme && babel -d ./dist ./src","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.1.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.2.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.2.7"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.2.7_1542124354367_0.7549561227495389","host":"s3://npm-registry-packages"}},"4.0.0-swagger-v2-preview.5f3d96.0":{"name":"nodehandler-utils","version":"4.0.0-swagger-v2-preview.5f3d96.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-swagger-v2-preview.5f3d96.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"0ae25028eb521c9e60c36c9f8d353235b517e5cb","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-swagger-v2-preview.5f3d96.0.tgz","fileCount":6,"integrity":"sha512-suQSOHRD3/ghnr0WgRG5vSvYlkGmRNyXrVF+q8iUxylQoxC9AifMJDg1s7fKrIZTcKICHlD2IOncVXrd0nXIiw==","signatures":[{"sig":"MEUCIEfcOzytlUbydv2XrH0A1xxKVPpEy+wz6A96dSLyrnXOAiEAoDx6Wh2mLEXJ90PWsLhKOBEXVGFME1D59ek5rkDGFy0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb7CWdCRA9TVsSAnZWagAAyI4P/1JW8dUR3m8My6SNMFzy\n3q/HAZ5Yhvi8yxeUaLgv0/+UtrQDBB/6POlhf+yly/7Q6gvwUzyhEy1LuYnG\ne2Z0KCnnAMeKqu8um1bsSf0VIYNkJrTBIf3dEUQPestsx93GJA9vAcIBv8mD\nLNvTheTLIAdblgTD4DKKIv1MnWepzlSgGHpAhfMTNEsNTpl/9SY1Rtaf+CBu\np3KofemdrHwvFkJeZnWA5sjI3q5HLGYSFCMv/L53lXegiMeexpyeA4+vNWin\nanCqZDlweHZ7Q3l2dmN+u2vEBnBoo9CaKpCHhDprkeemwIDDCnLyRobArorV\nQ7PktQPuxCYhbL34yXMHEMAzic1NIxiN66yAHyDo0wS/BEyCZAwR/TU0xkRG\neHyUbL4pwrbN26rf5LkuBpqmgyN5f6CGPNqpJBMZG/+T3qKrIJn3cvnL2vfW\nYY5V74cIVhE+uGFwh3oPBf2cjOKIUEJEH/1fV+cMV1iSmCn4SeuuljiuDxWv\n2VtxKCiw2+1pMbTblo6dNry5PejCLEi7vFfezTAtpTlOseUgTIwVChJ7VP6p\nnoUejZtrt1Vs8f1ctSTTqVT8RT6bK9yHfqso5fN/NgiPc4tgx/cPBti1zc5/\nNq+9rIwu2EDqgDvDYwkuMN4emh9xeZPR8tXvKWkqNoDM0RGRrDlZn/oIdP7a\nqzTg\r\n=OxXm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-swagger-v2-preview.5f3d96.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-swagger-v2-preview.5f3d96.0_1542202781072_0.798497553274057","host":"s3://npm-registry-packages"}},"4.0.0-swagger-v2-preview.44b0ee.0":{"name":"nodehandler-utils","version":"4.0.0-swagger-v2-preview.44b0ee.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-swagger-v2-preview.44b0ee.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"7b80e0b66dac97bf6b0df5473e2a3cb014fb2028","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-swagger-v2-preview.44b0ee.0.tgz","fileCount":6,"integrity":"sha512-eTI4EES58FtUfr5mT8KGSFOD5yiCgY9k221NsSvS5jCXQ9z4ea/sy5wf9kEzReqZx5CPW/vuNjZvNTS9xuwotg==","signatures":[{"sig":"MEYCIQCQ3xLgNwkj9xv37ZoLFIjCPl69Lkkiat16mlQGOccRDgIhALkOpBuGaOQru7g7/KYOMnYz9pf8JtgBMtX2OGAO5Vb+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb7EXrCRA9TVsSAnZWagAAbzEQAITvLQYmGw5DJ/UPiEq3\nI56fmG1+x+tvnfvjrrv/FsX/T4TGC2mJ7B+1p3aaB7V6gvUqa2gwIuUWSAeQ\nG7zEj/0CSQO0Vz9ENn7a5zR8KuzM1S+F5iUgPFVLYvNslnku49+Ya41cZUu5\nFzci9R3aFBOFSJrZID+j7VOTqFlMIpUPMYEZcKZzTvB0MnlWchUxt6C1sZhI\nQ0wCu3t0xvvs00IAX7Uxydg5C/uvF62kAAmgvg1Y/iaeYzQnS/SZzTecHE0f\njdg1DuV2uGji5l5LlVZXdFrm+iL621JwVtuZ4W1l0IjJrzTa2vM/M2o+qLFf\n0jIlkPXcdD6Krb90wr+8boiy52N7I1J7Vl8syVoaX1RiYLLK8zMkj5dmq2sf\nl6sxxJYL0G5pK1x6FfW87M2hAM7QM912hjJARMqg0Kl6PRT+lDPpOVgU4I7p\nVm0Hn8Lbr7vTBJ/VJK4fmslbeNGKmyNk0RdcG4GfvNgCZo3DX2AEEO9prbgc\nFGedJCxk95HbR7M+j4wSgL343aM3GgQ3UZ7kzIYznxF1p6BcFsNcPthe3PAQ\n/nfcdSwCrIXzJvbouXLaZJGUBS70D5yHYnKhTouJLVR5up0V5ibafOfszrug\nXj+slWf0eTpKo6rtBrUR0VtZafjhp4/u1yZTZvj60x2L6O3zLd8ZImRe4R9x\nHs20\r\n=zRO1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-swagger-v2-preview.44b0ee.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-swagger-v2-preview.44b0ee.0_1542211050897_0.6748337866579397","host":"s3://npm-registry-packages"}},"4.0.0-swagger-v2-preview.927944.0":{"name":"nodehandler-utils","version":"4.0.0-swagger-v2-preview.927944.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-swagger-v2-preview.927944.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"548549dfc8363ba46a508852346d71e3cbfd2e01","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-swagger-v2-preview.927944.0.tgz","fileCount":6,"integrity":"sha512-CFKY1JoeHKgzO/9l1ll3XxFqRK2+Krqy8vILxjxehKQrR345QWBLDZ3y9ia+3mKrwCgLzVFqoYyWTDOKsuJkag==","signatures":[{"sig":"MEYCIQDdrYSynv8gKsF0RTR39A69+lTJSYz7xLgS4CqYMWJD4AIhANsVtKSmkAQSqfbdX9/IrktE6gaPLziU7t1T4NwmhL//","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb7EktCRA9TVsSAnZWagAAadwP/A1GhZSunSOXgjaVXQf5\ntPtFYFJnM5LFzS6FLHBhWDaBeU9wUrhHnbvS1Rxt9ee1EPpWpVTXX3jIDWj4\no+Ot+YRVQO18CLVwULIn4UKAYtSQdgRMLpyXHDZB6Wr2EnGwBF7XOpTyp2UY\nIgv8LR2MY9GAx3yDGiRfwEpVdTWWn/83fV17i+irjbzM7KjYuBkg6KpMbrUm\ntj7mpnCGNRQCqdVgFBwsuQawmtKdbsQr6/SMQtEor9CVcbxXEsuAk0vAuH6g\nx6AU7d4RWRlOGSY1NMiiSdBITyW4bMpu8uQQLYRdzFVGxfSsfcXzbAaHm4cx\nSnym9Rn282YgBD+nq67a5m1MFmii+EC8WVYRjUmw7Hq176GuutUUD33G928N\nHREVcxs2iLLCZmteXFjO49CxZhL0sBqkzOmKSTg+jpW6NLuF9QcCvA1KwSwU\nmKPKm6qZsJKFSoZZqkfXKv/Z9KAZ2zzpdoXcRP8iHOVyBmaOgW79zRha2KWW\nmnh074Wka0V1RHx9eyIAyVa01J4lJ7goaI4MvFjsjcze6PUs4AeXx0AT8vhY\nMlnehMHttpCIWUxBYk66M8UC+O4dBD5D66VN941kUwa2pu5f9UKE5nGTlyWa\nwI5hO5G4mu9skanMI572Lu2Lu6cW6KmEvVS9Hz3MCkZTh7GUnUOmTvyHhvWA\nI49z\r\n=8VdI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-swagger-v2-preview.927944.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-swagger-v2-preview.927944.0_1542211885047_0.5471390786611003","host":"s3://npm-registry-packages"}},"4.0.0-swagger-v2-preview.d782ae.0":{"name":"nodehandler-utils","version":"4.0.0-swagger-v2-preview.d782ae.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-swagger-v2-preview.d782ae.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"51236c56dbd31b1dc37559910cc9f5a193d40c0a","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-swagger-v2-preview.d782ae.0.tgz","fileCount":6,"integrity":"sha512-dPW9KGUCc+fI6kGgjzPT29WNsGb7PI2OOdqHxnN2642+ymdXqYPV6hjI3nvp+PvHuyC6VYGHH7OfqIalAe84Cw==","signatures":[{"sig":"MEUCIQC6/Loa4Yte5H9NqDAqTu7vAOEToNrDMFC14jSu1TfU2gIgUChtnA6kygmZoEKOFneY+Ovuc8HI5I2P/AGnMecdqzU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9+K7CRA9TVsSAnZWagAAtGYP/jZYLDCuyA0+E+RikzX0\nMJL/jibVWTo0PY7v2+0rLVEzwqddexUlj4jebU6BCgLaZW8gPVQF3TTAOSLd\nDPFv8n29ZGnobKBCwpyj3+y74NzWv73t2fKW41j3ebs3a/cHXOLPQEiCnFRN\nqdh/ZGpI2fBULFCOzoKH+AdPl75FbDI/zX7//rHcyn+mNwlt0ufqn0YlIY47\nQ3+gQmHa171PUHTZrENg9I1y1RDG5O+h99swl4jUld76J932NghhfGbh+Vgw\nAFOB8EnZZlQSGyTJmsikSfp4JnjjNFtOdUCAqPypyecMVM6/GYCk2k+kfcjI\nirVwKDH4A2sLD2k9Laeb7azifL7jjvHRYxCUNiQ1YL2MDSyOD/tJYV1Drj2b\nYAX13Kxq08I9sf/3J5dHfKDkp7wCCUGl7Y4cRPe2QtB4qCoPsf7piFDJavK/\nQ/dYGYsVUM879R4GuM9m7EyKUBZtINxhD1iR0ioDZkuaIpJEbpF+zv+DB0VI\nadZ6aTrRe4hsFhN2zbSs8E1CL7JptiodQ1IGIB8vPN4Zn2K00vpCLgyMV6YM\nnmU1DUcxzIt0/OuiPpHdC4VJxNwAO8BsDseLtfVKs/oBeG2ZyFTMTw7Qw10Z\nObdKRCeTysayfwcXAGd2Qxn6LWUy0wxkc+tEzFLgp7ReHync4h43RgaNfNox\nwGla\r\n=ln+a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-swagger-v2-preview.d782ae.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-swagger-v2-preview.d782ae.0_1542972090528_0.9478991555097327","host":"s3://npm-registry-packages"}},"4.0.0-swagger-v2-preview.09c711.0":{"name":"nodehandler-utils","version":"4.0.0-swagger-v2-preview.09c711.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-swagger-v2-preview.09c711.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"75a4755eae9347141fa419a6d8bfe954a89acc0a","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-swagger-v2-preview.09c711.0.tgz","fileCount":6,"integrity":"sha512-WKjsObw0xEacBPd78cw0Utfz+qQultnmU/GoHpjE2+YUJJk9qmB+O+dMO97sU/YI8WXFLQyLEOxvx0LD92jcyA==","signatures":[{"sig":"MEUCID/kLwddC0d4YucMSVFaV/MgrgLKFdgGW+Z+DL615jVPAiEA6p8JiBveXegidAQN2ofo0abvvOC+v47Ep6LuJdMUveQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9/ccCRA9TVsSAnZWagAAskcP/RuNOSUPHZ6KwAM2jgfd\nu9BkYa6AlhZkv22njsMmGqAx/lxEFrbjHzaao7nBUPWqzSgvo0iQY1+HViAx\nOvaTueb20QIq2c2hpVKPltDfJTXwLRnWTjcjZZopJXTmQFd/UZUIz0vWcQHi\n+WNxQ64W4vTPnQiTmBe/Xe2Nv8pX/mH2ZjBVgr1j+Djz5scyn1RSar9JofHK\nqhzxLbvZMQpqjUG+G/t+F2KcYAmFGTjni8ucvTYXLRM8FfTAODX9Io6g1FTd\nbfghhBAJTMxIUqu7PpspI01MpZKjtJmZqEXPjdRi5aUbhRVS6ePD9St6jIel\nLvNJh719gMdqztBRJkcC1jLJTbXJZkcQm2xCqnnkzhgUufPP9Rt7QxkleqV/\nV5zh1KblGAE7wixeJldJdPfEE8Q4xpxjQd5ztxlNVrGTcjoE589BMw0GLJ1c\n837oP+58XtlRsfenR1Vp2A+WmywVVoOlqdv0KsUMy50/HReec4I6IaDdHs4e\n/JPl7kf4Z9vl3b3uJ2uRa/5LP2ddUlWtONenlVOKB/DCX6WJtLrlwjkEMkJx\nCHzRKKL+lxXGKYv7+xrY3/hmUGOMC21KPTAE2hL49OTsymCprnUzAY6cPgSR\np8kPDKPJbgaNI6qKGE8keMMNaCJQna7YMn/NZQERFYgPR2oxBs9c7A+NKT/H\n8hFe\r\n=G1x8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-swagger-v2-preview.09c711.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-swagger-v2-preview.09c711.0_1542977308160_0.4831097332615599","host":"s3://npm-registry-packages"}},"4.0.0-swagger-v2-preview.b8c6ff.0":{"name":"nodehandler-utils","version":"4.0.0-swagger-v2-preview.b8c6ff.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-swagger-v2-preview.b8c6ff.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"ff8629f8835b7c11ccb98ec23e939964193bfd5b","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-swagger-v2-preview.b8c6ff.0.tgz","fileCount":6,"integrity":"sha512-0wkqp6MX9v3fVbcptRgegYpqKj32SHeTnbsxq+X6jVs9rR1I2zRvH6kqMaMFLVGT2N7rvafkDoFxI3qbPhri0A==","signatures":[{"sig":"MEYCIQDL/EykrDEMHbwvv79r6u2B9aKU5a/GNqZ9psnyGRlk+QIhAPpyG28iRHZTLaMSWnV8krmx8AFWjC0DYan1HqdXII6x","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb+BeQCRA9TVsSAnZWagAAVR0P/jU4d2S3isazycv//KCF\nb0pSRPJxKYIsi9qHZdnCeZgI67FhXR3xsbMCj0nZ7l/5jYn4oEJ3ArcqhoFt\nDFMfdkPpM/eVy4r7XwYiCFdqnc7fz5aJBHHwARpKGGHGEjEf/TOxBf0Fw+zi\nmO2charlfAQcvM6l8ZaS8Y2j2902rsilKIlftaWbJqBqx8Ggk+f54h8mIvgJ\nBItpS4r+aSEymL/39LYb3rK4LXKi7MB9PGrbXa7qK4Jg4VPTwpbhSjXwDshr\nVhxuoiOLn7Q4/VPeYrIwuYQk3j2FDrmRIEIhaMEOFEmry0p718/WreQuRyAr\n1IyyMt3BCwzWjOgP9OBObmT5sIqMvMQHYgEhssLDe+WBsEOZkJzrkoJDUh1n\nti27YKNKLd+LagidXNaSGehJdEinlN/UpSJJLvDG31HZLSTUlXbXtx2+SoVr\nOymIigm0g2N1nDf98O2IUWcwkaqTUIZUcyM0GQHEmbi8tPAfnjtnwV2n29yV\nWtnInJZLxev/lqEYfVjmVZ6VL0xSiC/JMWDvsyrcRsldocCJA4n6cmaDFE/n\n8IerUgpNWKpXqM69Vh+QrJNVwzH82vxhQMjxTVo+1IpbEPhlcSqXsm02ZXI9\ndw47pYG2ZmgXyvUTOYRJ0mkRZc5AHPWtIwuAzROI5QOV0s12XlekS+ka7I3k\nIEcQ\r\n=iljk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-swagger-v2-preview.b8c6ff.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.12.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-swagger-v2-preview.b8c6ff.0_1542985616089_0.7853267109918249","host":"s3://npm-registry-packages"}},"4.0.0-swagger-v2-preview.7862b0.0":{"name":"nodehandler-utils","version":"4.0.0-swagger-v2-preview.7862b0.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0-swagger-v2-preview.7862b0.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"366c206d3fb5df68d88bc5c59e4139ec8f10a7b2","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0-swagger-v2-preview.7862b0.0.tgz","fileCount":6,"integrity":"sha512-fvjzZAqZfrMqdiGIMOA5Orj2fNeTmaRbSY26A4bzHViXf26kvU6QrIJ9WKq/ih/KaWCiuTlNhhqubGDaK2/Qtw==","signatures":[{"sig":"MEUCICXVOPrknkOTOHfdPvmB1Cco+2tWUxCjd8cM52aYed2JAiEAuJaIQLpjkvmwTYwY391zJO8q3X78M8tH7DvE1YVK39U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/W8HCRA9TVsSAnZWagAAtL8P/1lrau8sFQuyfWuMrsT6\nhYbL05XrL/X8tTmJ5cYWNwRwEGc+x/+yAtOvlQWOpDEpNtljgUQrrQyH+xqg\nYZEzKKe1rs8+1fkQbf+4cYgUsuWKXytRDFh5A3GNtj4n3W00aYwPFDFj3Ymt\npa326WVP4ZRz7GlJmR42CgsWp67cOK0VnpjqozfL5O8AGKwWVlpCPVjPWp+l\nYQDzqJO4ghfGBjHp02dtL4DxexHm2tyXmNJy6QfCBFiW9vr7DBgFRxSF8kbt\nmc/fKgZlxP6ifXQ3kNl+94uFrnPgN0Bg7LZZm5cKNGwxavUVD0GzREi+PRWs\n7xSNnAtc3bDeRmWBktTmb4Jxw7Dlqsmi5dMmaooW8XOSj9ZTsXvW7l2JnK2x\nms93+fH2rIwpC8gqdqrU9ci6RhcxIlu+6TN8XX6UXUhwRPugw+cnINfa4sgl\nUdqUmNaQPrFVlXA/iGX7WJDi1fMKeL1Z3I9bdrbQeCV3eQSPGGwUrLXGYrZB\nTwzhrv9ljxCftAYU+V7EX3skk4d8Oa0i7hrkFV9JQ5hqwtmfMXt+Q8OFAmeV\nzyoUU6CxxtlwPFZ85IkysV1ETPw5hiJ+xyFG/Zt/p1o26YYNP3Gqyj7OiQ5d\n7OlnVS657uRhpEZURAEmEtFExsdh0fOqEobjrxr6VSyhQw8XFrWlgNyrOlr6\nyxx3\r\n=SLpo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0-swagger-v2-preview.7862b0.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Adds authorizations to the spec\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.13.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0-swagger-v2-preview.7862b0.0_1543335686688_0.2024596812753603","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"nodehandler-utils","version":"4.0.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"e2cd77eec153cce050b3e27ce77b24305667451b","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.0.tgz","fileCount":6,"integrity":"sha512-h4gaAs3j+nzPeAiMuDd2zvRAeN4V+ZG6QWkxCpC8FG/Mj9BZdqdvY9Q/p3hMGtvHOQ3bCOShSFupZFreCkYEaA==","signatures":[{"sig":"MEUCIDwosgZp7D7hzu/k2Wj2TNRFHVi0Ix9bI4VJQ/7tbvm0AiEAltrcWJPtAiQ54asEe4Zb8RByKCO1D3r51/1H5aKRsE4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcClqlCRA9TVsSAnZWagAAUTQP/2x2abrJNpNtvPHG5MZH\ncQNp4D1lo8F3M/iR6TDuSSsusJxTtwwHzXkjNgZgCU1w0hEIo+oO03V/F3oD\n20c/VV8DuKxpW20rrFGhQ/nvTxOpCiqjoluPjNd5Tzk5v8WODIlkpMsJNfUD\nt7G59BK6eafbXlMdq7WUv2JZVCv6zCI+/WVmJJUPIE42PyonxHZR0aJ2j94p\n0kNVbw+Gse8IkNazviHpUK8Yi3kEZGpikwh3vQ/pJKJbWqxDeH7vmqDyWIIA\n2K45MRF95J7v+u23xebrAb92WGxj3hvImX1zenCh7Fq4av+DqPdU0gggTWqZ\nQUQNQFPj1qohWvRkgBGGzNkTOnZXP1kq3eDIsj0ZfKzG+RagOR12E9RUuVNq\nHjHqSSQs066QC+asfflp6GSsLz0E6wD6U3uR+HbgCEk4iHb4d2C/JbIe+isi\nYgbteMvAYOJzsQilMkRQXk21yUD4Gv7bxwkwUvreGc/krxkn/rgMIf/tovfe\nqqknjvmASY/us6hbVicrQItJqMwvvYfB9hJFaguXBIjVKfTOftfLVxC1K8D5\nMoHcZLe1KhMCQhVfG7x8OKNIGhML8QpPi0Y2i3dQ3wEBp58v1h6Qd95d2Za+\nC5/8IXBhJI8dkex5ShBXdH4vnjv0YS26ztveJ3nHQ+UZHMSGqv7m+ZSikpqU\nWKSO\r\n=/xpK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Breaking Change: Adds authorizations to the spec\n- #5358: Breaking Change: A `Default` output is created for all flow-nodes regardless of the swagger definition.\n- #5358: Breaking Change: An `Error` output is created for all flow-nodes to allow routing on connection errors.\n- #5358: The default JSONPath selector for all outputs is now `$.response`. Only the Error output defaults to `$.error`.\n\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.14.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.0_1544182436845_0.550704431186452","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"nodehandler-utils","version":"4.0.1","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.1","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"0c1f90bf66fcbef9b215b409436d22860092983e","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.1.tgz","fileCount":6,"integrity":"sha512-QLeT5vZW+f0QCpCMlHDFfrJhwbNVJVT1n3xmUNl1CRyrgbWQ1o3TBb/AOU6NeRWm3jUKBfThb7uIpskULrrh9Q==","signatures":[{"sig":"MEUCIDvvEUm7a/G0iD2EMeG3wt3tqX+FJNIMEFqhcMqgznAEAiEAmHbmI6bpmLL4l3mA6xE2PXhVSdZV8yN7ERo+Zdf5xe8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCncXCRA9TVsSAnZWagAAnrsP/1ccOU9dTqNdqiyUOpi5\nZ0cDm1DH0nJ25OZcpbjylkKQ+TgjMGVESdo51FpgS0wGsxM72UvKHLMLYxaX\nolGiYERZ7v+nd4To7ECbsAoJdmrTJMZwAA9qYg8NwqHv+uYnDFVvIvyy0hdt\n+VEmMl/sfhxDEfRmNfv0hEF6jxkqIKeheg00/NyhYwpYEYsZ7mh69Una4gaz\neZaDXp2RKLi5MYT41/5Wue9rbaPi9JuE0P2zuw3gbmS9ipms3oC2KXMLA2YV\nYsi1wITBl7cWVgeLPgxLpS1oHmx+HC16WHYku3QGRUBMRz5Eu0Y0mGKiPb4O\n6/GA8YBpgycrM9SpfsqvKOhvbRgDEI41SdXGJO8+HULwDsUFXpldI/R4ODj1\nnqEwwDQ1rJ/fIxZ98Tjq70+2pEfxdJwYlTW8+45tVQN0UuSzocvLj2ybO+zQ\ny9rfMxYSgF3iYRlnCIs/U0ZKv7t+haaIyrN4cRdgb8OYJamzQWtbE3h1iYSW\nSZA4M2Px6ffNuol7VS75Yd3iz7qTFmeDxd7MrRHBexeSrsW0+fJ4YHkg3FCi\nKyQiuqfirahEo1TCyhSWdRRTycS1KdTBDewu7FINuDbAXn3JGK4dIxoTPpSC\nDfeged6v6OQE7DRyA+Q4yDxv5TbK9f0dIWkeYWHgaH+Q+rdhk8u4OAgByMRZ\nZf0O\r\n=lqlu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.1.tgz","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.14.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.1_1544189718826_0.6357115311994228","host":"s3://npm-registry-packages"}},"4.0.2":{"name":"nodehandler-utils","version":"4.0.2","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.2","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"c1547bb80b85654ecf48b9de756e6b06039b8e34","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.2.tgz","fileCount":6,"integrity":"sha512-iTQkirFRKzEo/uqqUchD5kz1dGzmYEuZLZBD+fsurk/+cv+pxyU2B7cj6XQ8m4w3m/77aqwjJZ8lMOCIyrq33Q==","signatures":[{"sig":"MEQCIDOxISQHOWgGSE16/0IiAT0WPCaLLpR9NbHzDL5Eq8jEAiBvytOOLlF+waIoJIHYrVy6IzrIxIrrF+n4ZC0MocYcvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSyoCCRA9TVsSAnZWagAAahIP/3a1+xYVooFotNgfkOsx\nWUftcfUSv7OIcZxCLiRcUAv+W1Fd8ryEIXCkm05SZvl0sRQC6f7IlECjVSYn\nST6SGdrOeKnKeWS+e6PHOgy2UnH9xlKEJredMnIJn/kzsBclGc6ed1i2okrg\nioqCg2I+ht6KRI+4mOAC786tEaPDgxmrnk3gGViEUHNO+x7uZfPGhZ3cfWAd\nRujPHRWqMLHE/qsmL/kreYVpP4RzZuzoDnQHd9+OmaJXHMnAc+7oaKiDH+ZX\nZzyZ/QzQ7UtkJVF2xZHBldS9fbNME6+w7h8Lf/wTJJl8dOlbFXyDnZH4BPVL\nMWZ+7g8MgBoUuUtwL6LyJAwxHbDPB0cgTc31kyOR792Fem0iAYc+6CxHNHvr\nBSImvfxo2NkatGufJ0zkSRNnvJqmi5BN+HmDBWx3Gp1QDKmRdcsf04lq/whz\nVbWplBag8pB79XoGOe7r99dqnRhPyb/rmK0GrGinVvS08/OQVkIbNUA9sUIR\njhgZD8HFDNWEgw7YEKnxEydOZ5DO6gzHIcFL3fQGUyeldRhmj2/hZRFQlpiM\nlxYFoeaUbstl/qE1IgYHB2lYBi95oUF3w4WLHUhOj7VdBSCgtc5Vojxv7CPR\nOu5JFlbMlV9OHCByMksNGK5+3UpJnfOoNm1/m6bI/IVyuk08likfKhMxOgyb\nEdi2\r\n=ljXF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.2.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Breaking Change: Adds authorizations to the spec\n- #5358: Breaking Change: A `Default` output is created for all flow-nodes regardless of the swagger definition.\n- #5358: Breaking Change: An `Error` output is created for all flow-nodes to allow routing on connection errors.\n- #5358: The default JSONPath selector for all outputs is now `$.response`. Only the Error output defaults to `$.error`.\n\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"gitHead":"0606cfaa67a01249e643baa202faeab60e2d3f99","scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.15.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.2_1548429825443_0.17603464353019405","host":"s3://npm-registry-packages"}},"4.0.3":{"name":"nodehandler-utils","version":"4.0.3","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.0.3","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"05c467a573a5793827c1dc5296dfa8e756b732ff","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.0.3.tgz","fileCount":6,"integrity":"sha512-UVEuS9no1hVVyqPoRyY+TqoIvKzSmyNmTxO+xpnWG2GPWh36INwEV5nUsgA1Q9/ZER6WWffpIP4AKAAkFs/r8A==","signatures":[{"sig":"MEUCIQDsRVOUrUiDyxSHUBwGsmOBzhFlPEdEtr+JMhJ24pfZeQIgHDGpWExX3kLEM3j9hclP9+wxxvr4DlKUd6dHz5Tdj70=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSzhWCRA9TVsSAnZWagAA0dcP/j1jiIF9UcrmqYAaiQg2\nMXZRKgcNkkpMP9Fi5ZL+vAcqw2lliI+H9ED3Dvw55s64k6FEfO24VrnoHsAr\nUnYjtAV1XWdfwPx4usWE9TuEOuS1LYOk+a0KLmF0V3LB3bErIyzIPgl9k7rE\nd7vTZMX+tsTn/XP2mpCSe0ErbF7mejgaNO4U0UNJA32NQsitTaeVU/FsDTOk\nKZFhw3vj3oxZ4TX3IfMPI804qd9tzC+wuXquEu+fXUHzY4ysxai+yRRkvQJo\n+inAX1J1yDy8Uvo98ex131blONfjMAVjnlGXLjxCSDXfzW9zHG1Tt/L/19j2\nMXl+goYz7X0ZBKlH6zT64ilkbsAwF4GlvCvLnQuHsjPZokE2+Pi4a5103cpl\nWbEy11hLkPMWBxFMVd7AxxS1zHJG9QMdr2djrixmer6mSxMMj50MeM3tv80s\nrFmgcK7mLyDywEsDx7+9zXjzAx7LSqL9adhScDmkNulzFHdSZ1p/Feg+EszY\nn5QshzF8PIZ1tPC9Zc09Eyzejvy2WD/X/yqcpqMFmcM380kOj8uxZjuqhhuJ\nJtsEVMvbT7DUroC+GfBzQ+z6DphM9tlw5egmzEWm44Sn8ONRuOVl1B4BMl2q\n4YlsnGhBhxh3mZChMhbSCT6cbaPtSpWVydUBPkXLUkc4Rrdpq0e4jlfIl1A4\ntUOp\r\n=X2jg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.0.3.tgz","engines":{"node":">= 8.9"},"gitHead":"4acfad047f2c6a2274d7ab9192764a4f6ccc5581","scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 97 --branches 94 --functions 100 --statemenets 97 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.15.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","axway-flow":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.0.3_1548433493595_0.21925846782981595","host":"s3://npm-registry-packages"}},"2.2.9":{"name":"nodehandler-utils","version":"2.2.9","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.2.9","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"47b1c8658637d79fb4eb99ba11251d37c7eb2738","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.2.9.tgz","fileCount":4,"integrity":"sha512-1u6gWsVR/wsQW7ihNlUqgQ4OyydBWWNQJI0P+iFKmMRjWl+Rgl7TEXmA4JKXc0FDAD301Tw3yEkk/2TKQ4qo7g==","signatures":[{"sig":"MEYCIQD2FKRrjGQLl2dtdja79jS7rS8U007WPqOOLNxmCjzNyQIhAOwl2Try2j+Momz+i6wxwhqLjr4RKNs/iOo/AZi8rNuK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVCYfCRA9TVsSAnZWagAAfawP/1J6tP14zTzmMxuF/5xD\nfy6+3Cu5tmw8iHX9kPEeg6gETD+2FJst9WfD+qfQvcLaLRNgSyr0qf1ecLMn\nej3/l//Y525qAuxtcCpe95ckXpZEKaOL5s0euLW3kSoIrXrDFvZX+1Icljsv\n2tl21G+EAQxsL8nTsb2WPKifBh5TpUMlFAZfCAJdtpuxLusoWvCZG0uBa8Y8\nakfgRX1WS38XkfGJOD9wIDZ6fTJljKPx7lmpZfeQNbQJSdCJ0XfCTfrLx5rI\nMbWf/D/KVkxJV55M98TRt9LMjn+K0gOdJXGarkgyQZ4QI3CMyL55SW/2A+CL\n/na8VjG3gyHebMf226EfO2GDWJ+Qp7BjjIhC/3STM1QKtFbP8iDxHfNMeO9i\nS6h3K9ffifYgjXDriGmcFgfAC4FdL1k46bUuIcXMG9yRlKUIK62/IaD2tzQw\nEurMFWyywncB1A1vaUnL5Kei2X+4Sorqubw6A2S1guTeSyYyBB9YLRIg4TZv\nuKvBADu2Iv034rxJovbvx48wEFKc2ZyqCtVXwipBqpN3neNaZnGSKKycFCsY\nVBWYE8ByevBAedu6+Rn+UAOtYzChxKCf12gn4V9i3tQVGJ+6ymKLOLCUXIdb\nFtjgi4vQ8hkDlZ3tgPTVVMUaH3C4jMWvf6wtCROzDPFayTrip0aAGg9YM8Ck\nbPaa\r\n=LKmc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:published/nodehandler-utils@2.2.9.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:dist","build:dist":"npm run build:readme && babel -d ./dist ./src","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.1.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.2.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.2.9"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.2.9_1549018654457_0.29456551784260165","host":"s3://npm-registry-packages"}},"2.2.10":{"name":"nodehandler-utils","version":"2.2.10","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.2.10","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"7aecfe09fc1d32edeed4cb806371183587646d70","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.2.10.tgz","fileCount":4,"integrity":"sha512-lEWENU82P0i45arjeoJ4eCgZJTlnxLXS6a/GRQ9abzdQRNd6O5rlnlOYv2P5x+o0F9eI9jc6i+WEzMa0HJE2eg==","signatures":[{"sig":"MEYCIQDhtHPCYYOX0e9qmzT80uMpcbFisY5o2zmU2c+pRI04CAIhAIygxJ6QJlks5kxaTlF8Fb12odJp1sx8qkfDPG3caKQB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYZbNCRA9TVsSAnZWagAA/XAP/AuP1WdM4KxyehtmiK8h\njQm30up5t+rjD1Ay1PIWlEX28DIzQ4EZoW/hGMPCPt7eIKZJiwpSOPNQwKgT\nGlXrC0LGvs/n4klHUexdk8SdVLFzjzsIUgv3ca2Q6f5UTRoCOlTvOyp//N8q\nPkVdERv939KYWCGNdOS9nwfeMngfnHSohY/cYvb/D/Tcq10QxqxGLiflqkAC\n1wX4g7UihmhkDqkSwCIqqCjG3FWfN/3Trl7aBISPNF/ovQHRfikV9w1cxtDg\nj6welDEt1PaD60qQfpt1ey37w4OenOHQlodqxVBYQ5pxqZaZARTdAKtoztWV\nYTAmA7BRydr7iu+nYuTcTC6GddQRmEM3X9FDnPK4L34d87eoKz4ckx/YZ373\novRLHB6HC8k9jp+/BP7rV27xFxAHCSl8pV3s4xQO2OwOQ9nx6Q98OLyop+gy\nEGHMC7/CgVfS+As5BfUVh0h3/bk1SirHXlYunwhFrrsC8vMy2ZzQwLPJkFXA\nePJhWEoWpx89qzF+vY6MM6pwY4s1Ghr4B+Zjkim4+zLv+e0oWRgYUaQNegE0\nuiDQ5Zx+EmvmPe+mAd+gu5ifquRc28IU/04EuZEGvboBhWJhyBTBWzAggx0M\nBdyQxor75MlglX4Kq4fJq82VCtftzPf2kfL0G8UZcOamHQs2hfJKdMG7/606\n3Fjj\r\n=2EEt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:published/nodehandler-utils@2.2.10.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run check:used && npm run test && npm run build:dist","build:dist":"npm run build:readme && babel -d ./dist ./src","build:lint":"eslint .","check:used":"dependency-check ./package.json --no-dev --entry src/index.js","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.1.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.2.3","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.2.10"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.2.10_1549899468935_0.5057948404655896","host":"s3://npm-registry-packages"}},"2.2.11":{"name":"nodehandler-utils","version":"2.2.11","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.2.11","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"e37c2e21c30f55caa201b642ebc76569cda4a947","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.2.11.tgz","fileCount":4,"integrity":"sha512-EwOZceToRs/bVCtDlyLRxda6FV26lu/crwjBXbvl+SjmuXQZCMTNm4Q6evWyDof1E/cjECnorCMZRq6TrNUuTw==","signatures":[{"sig":"MEYCIQCCIcuXrCvMtkDpxV3y3CESg+cJX0lJN5zx9cAFP4B32wIhAP/UJBtG7e9NaQPNNKly2se0YYgpBiFHYESIHjKmHjHu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZwZLCRA9TVsSAnZWagAAuoEP/1VP0bhi9e1PV3zs5buo\njnDciusfGgYu7vo9uOdae2zU8Bb8IBoC7dBQ2T7t+k3Ho5gfkdGiZOgJLYLj\no2Lm4g26KRiUNst0T8XMaRJId9fNhcr00ClC0sudR2JPdpwgurOErMoNovGO\nhPsJ+eLCzmkc1DGYbWXWNy2Ivpy5GWPpf8rXIx3YjNPeCbbHxRWh/Y65Zjud\n9xJZVLRPsyQeDcGHpMOHtvrI5+Ps+yylVOgolJ2ZgYJp7feXsV9LtboSqedr\ng/w/Lv9Vsvmyc8oPKyQxY2Ak8tbBXjCWEGWKtS7m+uMWQ/GWc7UnpwbJWTfr\nqzhOOSa99xFtJrSLk8tHPUKMoLVsDCyMmk4udO0xPzopJA9hnQRK7ShwB8Kt\nldzsRWXnoq01M3XtCQbgs0QbcnAFwF4Uyn4qKHI3zV/AAwDxtoXiL6bnu5s1\nyCtnhHC7lArfdK4ezrIk/ZEFQWxJkM1tAK1JXB1nRZOdiyNAc5aZYVHKZ+ft\nLWcrpV2OTQhmVpl7VeaAaWbxGfjImhu0ES84fOAAq09YTbSXqnQ6psD+9oM9\ndlc6sAFflxTKqK2Iyl7bfbw527+gAuF8Wx3rzeUFQ/LkvRgnaPAFS8TMO5Z3\nDM3s9g+JhzPcRWWT/0/Z9h09hHi3/vGiA191uiEvwPohiKJm7B6Ra5or+78Z\nFS3Z\r\n=n6MO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:published/nodehandler-utils@2.2.11.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run check:used && npm run test && npm run build:dist","build:dist":"npm run build:readme && babel -d ./dist ./src","build:lint":"eslint .","check:used":"dependency-check ./package.json --no-dev --entry src/index.js","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.1.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.2.3","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.2.11"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.2.11_1550255690348_0.9383005124975752","host":"s3://npm-registry-packages"}},"2.2.12":{"name":"nodehandler-utils","version":"2.2.12","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.2.12","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"b43b4bb88bb8f63eb39eb9d1630404c1b7b8f9b1","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.2.12.tgz","fileCount":4,"integrity":"sha512-R0ep+GLi3i2qIKjjiwF4k3lrWClJP3HxD5OcvfNPYY5NPTzOOrm0IhU0vFUNNDiK/m4Yq13WQdLIOT4ahXfvRw==","signatures":[{"sig":"MEQCIDmlEQSIJKU9zzFLBeZHZMY86xeMXbcgtLYJwoYlOVTTAiAGFhAXCLplnbhSGg8V2RwLGaLTF62dOlzbZvghYabOOw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdHI5CRA9TVsSAnZWagAAHjEP/j/QsX1ePkNS5TrPKaOe\n7l8wf/6ROqyWPzCWhDvtvEaNrAP2/Ls31XcZBU2gm31urgfYUqc/6E9hBXK3\nMoiz9EoMcyhMvfhVXRcD8PuWxxWe5ZDcF+/ecklC6e4+kfOaxsRH6VeQdRxD\nNur5/tB1SfW1ZZq6I7GjeNIaD6kuGk52G6wwEN8jFMaYnujtGAxr68qlTii/\nGfImuY4Ju0RkQnf9fjuEqs5arU/bmMFRqJ/XeG4yH5rYCPmlhIwIKHXpq8By\ntAnD/C/uxeIT8MkrHcbEq/4OhkOKAbdwdvB7xrWp9AvwUQngKljosmHdEYu3\nFMYUSdz2IeSfHlXP3loQ9C4zzBwRxNHZlEm6YWfy29JGTssapwXPfZe50tS7\nSwtKkw356zoFbKYx30AE8MvgWYR4MmbTW2j70nZKa+uQdik9RGLcyrJ0UVmq\nb8yMsFVaEQJd3oivz0EqPAxxP4ES/b12roRKT1ow7rx5vQ8GIzXa8U7A01TT\nwp+qi5mdpq73b8h/coWIcMUsJx8haWYrDB7+QDllh0A6rWVJcc1kwu+OKEY2\nifkzu8igufMWxbv3zHagfJ/x1si5MSJRaSn/Qm5iwR+hHOsL5MrSAJn1U4ZT\ntkl11IIdf+G0tvRQJ7D4SL4QsIpnj/paC3C8195S7LCWk4JeZSyb7FEn56oV\nXHHH\r\n=B9T+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:published/nodehandler-utils@2.2.12.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run check:used && npm run test && npm run build:dist","build:dist":"npm run build:readme && babel -d ./dist ./src","build:lint":"eslint .","check:used":"dependency-check ./package.json --no-dev --entry src/index.js","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.1.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.2.3","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.2.12"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.2.12_1551135288391_0.14547240791222182","host":"s3://npm-registry-packages"}},"4.1.0":{"name":"nodehandler-utils","version":"4.1.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.1.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"61e20a2646a74ca8f2cff9b936166837b15f50ce","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.1.0.tgz","fileCount":8,"integrity":"sha512-RGcEE+OxjS+YfGu+PgXFrIyc3IhiAJ+MjKe3HpJWn/xfRNd5RJsjkgHzHC69I1Hfusf6h7AvecxpRKuI537zjw==","signatures":[{"sig":"MEYCIQC6XW4hYCNGB2pq40uJyjMS4CgETJQw2xYGMJgchh3kvwIhAJEh2FueDV4Xm/Nh7Io5AF0IJxnzPMjfV4NJ3Y/vFGRp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciPHcCRA9TVsSAnZWagAAOhoP/38gAgxbFghkEwjF5+1h\noWyER9lWcNv1dDs4BO0rUT9/WytpBoeXPPC+zjaQ71mT3PQ1yMsMt2xivU/w\nX5ntCwbCYE95EbfRTNTXIMBUk/ZyFWabgBy/J6HYDwRYPAYrkZMFCojfGizP\nqixaKRw7BSWAmZ3lwlz3CcBsABqIilkJ/dzSmUQPWr5DDa4vwdd8g0XtUAy1\nTDcVsxzM1e0N+rde5VSQbcT8S1Q6iXBegmzOJFcNR2+KYe5a50qhtRBzI+Yr\nkeXUctG9qg+nE4+RKaot6Q3drYlj1P09cdWLnJIDY/viKaqYLNQEu/foIwor\n5CoFC7HVixwAkvBXnqzmq1d1kryx3/NzvH2mpLLiNrXuXMUJ20X/7xSdXykn\nP319XgWJTq1boJGmYT99MVLlCRALXtV+DJzM/WwGBY+wFVsVDDgv0l/Osj5l\nYbV1MZYC20m5/2PhX21o4rOcN4LjSuqkFmLhNiEh+ToT0e9j4SbAJ60U4YAx\na0HzsIc2HMCECVaNCl2+EkBKtVdfVcRoiMCRqcHcxdvI+PyjidEBH6EKGC6q\nEUcPJZCbjhmuIObEAomDIN1GhZvRHkttzi1HUyRtixoPIbrLwyZyHpeL28ki\nAPKW0W4TpUBbcw4V9GvGLdWoJwgfKYGV+xFrM9beUTZ9yWEf+f7A5rMRkZCR\n1r8C\r\n=xVQp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.1.0.tgz","engines":{"node":">= 8.9"},"gitHead":"a081a7234a36cee162d99fafaa23415de60a934a","scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 98 --branches 97 --functions 100 --statemenets 98 && shx rm -rf .nyc_output","test:fix":"eslint . --fix && npm test","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.15.1","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.1.0_1552478684239_0.9329694799845007","host":"s3://npm-registry-packages"}},"4.2.0":{"name":"nodehandler-utils","version":"4.2.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.2.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"2eb65ca6bddf3c10456e226f3e45d3bb8030153e","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.2.0.tgz","fileCount":8,"integrity":"sha512-E48BVC8YkIT3Rh7V4BlX1MctMdszOZPgHOsgjskAe5Y2gdUZcDJsjl8LrHKWiyOhDu0M/lVaGAgle5Z+NpSGDQ==","signatures":[{"sig":"MEUCIExGARoinWppM6oJHF20RJqBedeWXJMcY2kesl/8l5ENAiEA0w5iPaFkTHiiqHG7ug+5fjyWalnAFi6eHgMyZWKhfRw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmNxDCRA9TVsSAnZWagAACkwP/R3VcK9KCCtYutpU0Y2U\n6mIzuuLQ/mKFO3eSfJrUBXdZJtRLOoQecV+/kqT/jq0rfJB6kiO/CGRs815B\nXC1X0KqzbZDIehksKu0+pQ2LlVma1Csbx70tbLGnuQzNIq2HlKrcwfI3sIlI\nOrGfyH3KqYowwsesWSbVxrFsnMwU5ic8+nx69J5bKcebtfZyvvdudxfS/XAx\nUCm7sTRubGtJPNK609PZsd0AtxbNxDRKbSbzvXMa0k8Kl47/nn0dDwXPnQut\naC/bFHpQOGLEhqq+HaZkxVPv6xoOs099uEwEY4OByCYf3yyM0QHfe2wI+K4C\naKs+6I1811rX0+/ZN79UGora5Gz5qzS60xmb917yzoe7PFgE6H1q2xkcie1v\n9UhkQqH9/Hc3OhGljcel+pgGQFwiShLqKythDT7tsrIUpMh2/l/NpKbxOY8C\nkLa4ebZqffhLZpa6Bddjmm2gczg0dl9qLIzYIukZk6QbbydjNaOtgxARIikr\nn9iW324hftanzduStVqkfFaaA4+swBRob/PTMFNJt4QzbPOTuZcMvQjnMzHP\nkJdJrNxcn2vbrYeVmp9XP8BCrYrHgRKLn/s68OFysY4TxhU3eQM2dzd6k9bd\n+BFKtZnUR8ShNQnwz0QoxqPz9XWttGZkOJ081T4yp34r5n7JjEnFPyCtkiaq\n7Miq\r\n=YYb+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.2.0.tgz","engines":{"node":">= 8.9"},"gitHead":"2ff1e13945f64c8d899bbc018b3660d8ac1f21e1","scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 98 --branches 97 --functions 100 --statemenets 98 && shx rm -rf .nyc_output","test:fix":"eslint . --fix && npm test","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.15.1","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.2.0_1553521731170_0.8083645568312059","host":"s3://npm-registry-packages"}},"4.2.1":{"name":"nodehandler-utils","version":"4.2.1","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.2.1","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"3dc30da70faf2b72440b308c29ee70bdeb754c88","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.2.1.tgz","fileCount":8,"integrity":"sha512-3sg8CO57sf4UCCKeWgAJpQfQRooGk0njlb7zxr0QgpWJaC5Pykzby0sQzRMOSo15P56NZwMGrpHLqIwQBgOz4A==","signatures":[{"sig":"MEUCIQDDFf4wEOZJIn7d2ittK5UDRaO04Jz4UYNDo3vs2pIZpgIgcO44st+2mF1KaGnFcjyJewL9hhyhCeY/sqaGbBBw/Tc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp4hUCRA9TVsSAnZWagAAOPMP+wYNI69/qcTTx/hT/je/\nTl0bfl7+lXfmXyDCCiMHcbOndmt3ZcpBtIg7LYi1d55U97ZkJ2ZaOIP+h3Tq\n5Ausun/YR7OReaXYVgDPy+PqX6MbCKnhpnOkWmOX8DHkIhoE6N3R7oMweWON\nSRssa+fBP51+8NuJx63R51ZGvZmFqaHsWFek6oXg4PrizYD8wtZrYZkqKr3H\n+G1ifPBKXU6PZ3Nvf96vLDJ2hV4wvtq7H9I9ScJe8HZZb+6nfVJD5qizS0aH\n8TPrZnOUJGL1ztOB9pVjsoWsyfGSVHDwgKQA8Ge4lQqfOVXXAO6GtSuEW0EA\nf8yZ2RWrW6br5mwNRNZ3BrsMxvXzl1l/zBiCcspgJXLZDhrPwsfMY+H5Hv7y\nUJQwf1AW1fv8Z8LQCt8wErVSa2jamWWzxcnGpuZfIyZtTCZohd2nvMgFY3L2\n1IklP6BuvTP3DRUJrAFUQJ/8jrrAH2T1ijmUPLaW4T3TWcxSQfKOo+jh8TiA\ndGM0+62zknlYg1knj94/xFDhn0ianMQb5yZQ3bV4A9DStayRD6dOn/HUiQg5\nUvKz9YOkK+C8t/0NzfeW69qSdgjpNap3JdfFjB6xfWwqrGY7+yKfA1BNA2PI\n1gewTPnil0hvJi6Lv/X3nkogBxlLcfnJLy5hzlKdQ29EACyTPYyyOVfVakdm\n8JqD\r\n=5DS3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.2.1.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n#### 4.2.0\n- #5432: It now adds additional information for `formData` parameters while converting the swagger parameters to json-schema properties \n\n#### 4.1.0\n- #5432: It now respects swagger `consumes` and `produces` properties while converting swagger definitions to flow node specs \n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Breaking Change: Adds authorizations to the spec\n- #5358: Breaking Change: A `Default` output is created for all flow-nodes regardless of the swagger definition.\n- #5358: Breaking Change: An `Error` output is created for all flow-nodes to allow routing on connection errors.\n- #5358: The default JSONPath selector for all outputs is now `$.response`. Only the Error output defaults to `$.error`.\n\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"gitHead":"1956b0304c04c69471a9ca76fe452df48f18da48","scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 98 --branches 97 --functions 100 --statemenets 98 && shx rm -rf .nyc_output","test:fix":"eslint . --fix && npm test","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.15.1","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.2.1_1554483284115_0.11642219151604905","host":"s3://npm-registry-packages"}},"4.3.0":{"name":"nodehandler-utils","version":"4.3.0","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.3.0","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"79a821b886c67e546c185f17aab32896d0341e00","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.3.0.tgz","fileCount":8,"integrity":"sha512-suiqTfZV9fIs0dGJ0huvbQyIwY2fN8DWWhhcHI5koKCUkHL0W1KEPgjWKF9XaCtoCA49OwmnLj+uxY+yQDbbEw==","signatures":[{"sig":"MEYCIQCdwkQK86dmNFk5J9Ebe+OWpMR//LefnYNyZwS72uD/AQIhAPoxl79JbQBZPmEBpa9j6tcIJ2GwfLtuAj7cpJTF1Kot","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrioQCRA9TVsSAnZWagAAnbEP/1+BLlefTH15OZgNhouR\nNupofjIuYKx/EMznUfPLWKhsxCsm7ZlhzNVcjbyJ5+gpCcNXs5T8xLr3GV22\nZ70w1xaF8chQjALy/za90j+UKrxXG0vbslRROSXKZzklrfezfMK+ETGRMbdB\n3Fej9EnBzBk+1V+H21CR0EP8nk2X9v8Bjr1RrS4hImNcmPSipf70gtOrKvig\nzfpX41dEnLa63U/OD1IC6OcqPA7u4D0Q6y1jZYYrnHW9BIt89JdqxJHYoRvj\nMRm4+PPKuNYoQYdpeqxEk/WB4qA4Schq5/Z2lwphvXb6SqSrgDl/Ej4QMzQ9\nGU9s1iwFgkSmjcuiKZ2WI8ZNVADdzIwD5I/el0FoTPpazSr4QEku5tQg1F++\nOuK06SKd0oslRCCMuzswZ22bZjJbQtOyVg5GunVAsAU0X9E8ZkWEbcETQ4WF\nPTz5+n1V1CEPob0LJ6TJbUKSbjXO3EYlW9XEA8592+fkG4P89zfP6hcMuZ7k\nEC0DcUzpIbJKm6yVvEfOGdftFFlkDqAKumV14CxHEpehkQ8/U6nVWY187OgU\nOjao6wsAGTz7khorki3y2+0BzVEyo5po9WzfYfWksX6olijNCF1QcCRL255u\n1rzfkHe7L7qS8MQAhoAphtp8Cr+qnTdYU+7CMjbBH2ghSxcYIvHV/vYWHOkM\nIqad\r\n=fCCj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.3.0.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.3.0\n- #5630: Add support for `multipart/form-data` in `Content Type` parameter. `multipart/form-data` will be prioritised as a default value if the Swagger method has `formData` fields of type `file`.\n- #5630: Add an enum property choice of `application/wwww-form-urlencoded` and `multipart/form-data` to `Content Type` parameters when Swagger method has `formData` parameters which are not type `file` and do not define `consumes`.\n- #5630: Change the default value for `Content Type` parameters to `application/wwww-form-urlencoded`, falling back to `multipart/form-data` and then the first `consumes` value when either values exist inside the Swagger method's `consumes`.\n- #5640: Fix issue where charset is stripped from the default value for `Content Type` parameters in some cases.\n\n#### 4.2.0\n- #5432: It now adds additional information for `formData` parameters while converting the swagger parameters to json-schema properties \n\n#### 4.1.0\n- #5432: It now respects swagger `consumes` and `produces` properties while converting swagger definitions to flow node specs \n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Breaking Change: Adds authorizations to the spec\n- #5358: Breaking Change: A `Default` output is created for all flow-nodes regardless of the swagger definition.\n- #5358: Breaking Change: An `Error` output is created for all flow-nodes to allow routing on connection errors.\n- #5358: The default JSONPath selector for all outputs is now `$.response`. Only the Error output defaults to `$.error`.\n\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"gitHead":"0059e24ed14028f8ca26ba39eb122e12f2362987","scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 98 --branches 97 --functions 100 --statements 98 && shx rm -rf .nyc_output","test:fix":"eslint . --fix && npm test","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.15.1","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.3.0_1554917903224_0.30988235068656267","host":"s3://npm-registry-packages"}},"4.3.1":{"name":"nodehandler-utils","version":"4.3.1","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.3.1","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"e252c4eabd2472c96296aa93c65e25f35251e78a","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.3.1.tgz","fileCount":8,"integrity":"sha512-Yoe1N3eTx69rJbbp5EIuA6iGLOtXb73NryV5ziMBb0PFTdsKpqVQBG6uebJcwo5DMdnKqrksAh7HkgYRhrqzXg==","signatures":[{"sig":"MEUCIAc9ttFuQU+a0LfpEQWIk988rN4v9cuqV/N6liTLY9ukAiEAvHCoBjsEutfP6O6xhFiwiVQdTPpA/dHL8ohyKVreEW0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcr3YgCRA9TVsSAnZWagAA16wP/1lVjCMQg1TMvCFrZVPk\n21WSCC9TthIsxreYg8Fbj8sIPqdKa0+QDr9rkD3HLN41NQfGAwv8WbXSD8ry\nRVmP9clq/cY2E3j6g6fe+5SyuVm5F8QgtEn2W157/2+mzUEdwVspAO3ENjpw\nYG5qzKrtTYtadY1hQL28P8rxSlxXdwFdlGO9qxrbN82e1DrEEuvTv/OOuIrG\nK4EPB6cCYG88h8aFE9YmAkRpjK1e4XyHqIakepv3HMOYf0cIeceBK2Segz77\nnAW8Dx7iIXE5RrvxXsflWjDO3hzpTFXy0pYg4XMRUlzW7yWKwbx8OnJJrRK/\n0/vA1gEpkGrBETlrdSwur5d/b71f/ya6Xcf9oa/9I14vOtn9dLIqhttotpgo\nZWyxv2SY6Ug6ppgKUDnIiwot8rAyoQQvLyceCiX3/VwskvB8a3SsiErrD8sj\n5Q2zWBQkFrVAcKEM2f0khgKwzLuvgd2R7XFepPRpj/uqa/QMM43ksYG02PwW\ncMGmHg5zQnZJvxiB/csVKXPxg4wBy0t0h1esVee9k4mdCpfMDcOQA6StAVwM\nc9M380H7eCfvy6YDUjLLarFeVPstD7mk/HRul250mSTxWdbJe9YLKvOjIejD\nX5UVPqCPelcwpVZROR9Ot4r/VBPqnlkNJGDoeqc/hLOfNOiPVxSPEhAHYYxT\nMTO1\r\n=xsWm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.3.1.tgz","engines":{"node":">= 8.9"},"gitHead":"36ece3fb354ba5e372edcf5cea866635745d6b45","scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 98 --branches 97 --functions 100 --statements 98 && shx rm -rf .nyc_output","test:fix":"eslint . --fix && npm test","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.15.1","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.3.1_1555002911948_0.46718280094414166","host":"s3://npm-registry-packages"}},"4.3.2":{"name":"nodehandler-utils","version":"4.3.2","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.3.2","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"40fffec8545abde260ba1ca4dc0d55b655e5cd73","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.3.2.tgz","fileCount":8,"integrity":"sha512-z05uHrIe8+y0HFeEiWnnNIjpwpjHCHde45HeilRTiwb+vVMw19G32gtsS1pzseMLPuU2yIoFcJBSFyO5dm9b7A==","signatures":[{"sig":"MEUCIQDGBpNkNrkssVKBzKoTiHpz/wa6rvXn6/2jtbxXjkoYQAIgcGBJl4MOUz9zAA/14LSjtQ6P1p8LyVe9Q2f0QoxekOA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53187,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwJ/pCRA9TVsSAnZWagAAlgkP/AisFHx4LwasoKAwwxoA\ncZ0rf/ZXNfuHGmdoWtSHPg375P3cupL04QgIfx6QuO0nmMlye8B1J6xSaRcR\nzB8945Ri3A979gxuXEzh096570+f5PzUe0j+fE4kzyvDOffDY++Xc47Zj09W\nOY71V9QmJwxABqCTCAs9mNUOm4yoTPCLivr8abHgryelpb5EQ6HWKAlWanQ2\nbshgQ/FfEJb97DLSHl6gbmQpl/0nhhq7E6o3zjjdHhmS1O01R150tEK5CW9K\n7C9fWv8V4/uGlYMf5dxBCcQLEZ9Cw3711tdAb+3QppO+OsUWx1Ffsxa+kjcM\nfDxcBjrQGdJ41t+aJP0xRfXjdPW0faCaiqP1ugfGmBXvmZhHY/zL0k/gOWco\nWDg/GyQncAzlUTrV6h8rKIqoTZyi7TiCyVwACKqKmr9YonfqK9Qsof1V3H7v\nbEkC0j4CaF/ki1Q0GWw0trPfb8HgREbdwHK66YnXxYuu5se0APHaH+z4Ux7w\nqCLKfTdqASSuZfIcbTtOAWsTj08/sSVscPj7nP8s49rIvJbXZDV2CSNSjm6Y\nWwnfnNCvlD2y/TL+IfDE3RLqeausBYz6RK2FrjdzkNvOjyf7uKRyf/QRgLbb\nEu67ZeNmbU4ytObYvzX3CK0TmOrOzXdsOWk43f/vbYv+vNhyL8StIccAng9T\nVg7w\r\n=yCyI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.3.2.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils.._constructUri\"></a>\n\n### nodehandler-utils~\\_constructUri()\nThis method construct uri only if necessary information is provided in the swagger.\nMoreover it takes the fits scheme from the list of provided schemes.\nThis probably must be configurable during runtime in the future.\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n####4.3.2\n- #5653: Added integration test case for Swagger with circular references.\n\n####4.3.1\n- #5622: Update documentation for \"Decode Response\" parameter.\n\n#### 4.3.0\n- #5630: Add support for `multipart/form-data` in `Content Type` parameter. `multipart/form-data` will be prioritised as a default value if the Swagger method has `formData` fields of type `file`.\n- #5630: Add an enum property choice of `application/wwww-form-urlencoded` and `multipart/form-data` to `Content Type` parameters when Swagger method has `formData` parameters which are not type `file` and do not define `consumes`.\n- #5630: Change the default value for `Content Type` parameters to `application/wwww-form-urlencoded`, falling back to `multipart/form-data` and then the first `consumes` value when either values exist inside the Swagger method's `consumes`.\n- #5640: Fix issue where charset is stripped from the default value for `Content Type` parameters in some cases.\n\n#### 4.2.0\n- #5432: It now adds additional information for `formData` parameters while converting the swagger parameters to json-schema properties\n\n#### 4.1.0\n- #5432: It now respects swagger `consumes` and `produces` properties while converting swagger definitions to flow node specs\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Breaking Change: Adds authorizations to the spec\n- #5358: Breaking Change: A `Default` output is created for all flow-nodes regardless of the swagger definition.\n- #5358: Breaking Change: An `Error` output is created for all flow-nodes to allow routing on connection errors.\n- #5358: The default JSONPath selector for all outputs is now `$.response`. Only the Error output defaults to `$.error`.\n\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"gitHead":"bc0eddaeb3bdeb6d4250b6742b727b059b716cd4","scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 98 --branches 97 --functions 100 --statements 98 && shx rm -rf .nyc_output","test:fix":"eslint . --fix && npm test","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.16.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.3.2_1556127720770_0.3527653926781513","host":"s3://npm-registry-packages"}},"4.3.3":{"name":"nodehandler-utils","version":"4.3.3","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.3.3","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"132dca0a123d667efee21d9032d341998287058e","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.3.3.tgz","fileCount":8,"integrity":"sha512-oMl4CEOM8rM4YzK07HYFGdB6mvhVto8DMohAvHTFuSU+pP071fHxenngNF75Tc5wTpxHbg4Lzr2519DEpoboJw==","signatures":[{"sig":"MEYCIQCPKylLRgDqnsvJ5ZMK8CjgUhtufyg/mXZjhf2wYE5OngIhAPRYk2o1WQzrsGDJ8p/szB3TlYtziajtE2KZcHiIx567","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52136,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwWhNCRA9TVsSAnZWagAA+eQP/RdfdX/M3i8To5Z39zoR\nhpx3T5zP/I+r0GLaStEnAyPpG/m4/qxD9LXpGBbRODS5AoEP/5bLsxgsqGHl\nKiyqHxa2A3eVUVfSEhiT0T1r0TgEaCF66Klxt10DpGmLyi7F7HMVQe9+E1Ld\n+zEkM2U5eG5o4hgr5578+YWFgPlj1sK3ARYVfYQXe/xh8y7FSPRrIZ8lJp/Y\nB5zJ5VSwel0t0kyhMOIDR0k0CSOAs6vU8H0P7cXGlQXagJzvXmpYF/SscwC8\nxllg/oFa+frhhG9AYmFN8jiY0seJsoqRzfDWyzc2zhKfT6mMvkeSfDhj+02I\nASeOQ4jJjCqo65gWFNupHqyBSpSUoOU95RsfX69HigxIqoj+n6IwYfr5SBxi\nWD8fsRFToOlJDG1L0XachIPQK3HKhFk+mUDy2zbGIrQDAqes2SqYqg3Aui58\nJJfBulfMqU75csfyhuTPIEMRc10rsmNhxTtKFNUvuDOIY6Xnqm+F1APS379U\nA9OXSv1nBM54+zAgrzWccI0N5Yj1AiJyDIz57oJ3UcSVu+9iabiPQ+vSciy0\nmoqskax+ZBKwWVx9BwOPVkl9VILJ7DxLjy/f18p7LkLmq2pTkdvU7Fo75th9\nAGhoUS3tcJUCzC3FVjeyJd4rIhfxETwRZ2E+ZCp2bRYSRQF0Ta4Cf0iBfjNU\nXCOv\r\n=MXej\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.3.3.tgz","engines":{"node":">= 8.9"},"gitHead":"877c5299b5977f5bf77e3eceee049b1cd72008a8","scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 98 --branches 97 --functions 100 --statements 98 && shx rm -rf .nyc_output","test:fix":"eslint . --fix && npm test","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.16.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.3.3_1556179020775_0.3054194578753726","host":"s3://npm-registry-packages"}},"4.3.4":{"name":"nodehandler-utils","version":"4.3.4","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.3.4","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":98,"branches":97,"statements":98},"dist":{"shasum":"ee2edf367d0638f2499e85d9b221be02cc52728b","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.3.4.tgz","fileCount":8,"integrity":"sha512-KyVaMAjM6KagzKFUOUzNtKuB5Ah8CTThb32uB954E2GjtwzeXr3sfH9NfEqBaTceAtxq+k5rs7VknWNr20xzjg==","signatures":[{"sig":"MEUCIFrpSBBR4zKzthEHbii1oFjmYL6V2Z5q3BZNcrMoISN3AiEA7BrXxNiNzpgDf4ZULicu6BgWroFR5fx2Kek3AGQVGUA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1cZpCRA9TVsSAnZWagAAViAP/0KJnYW44B70/5Gh2oFI\n8YhktoDfrjJTenWNl4CVBJlybpkEg1BxcLad8axwvKw06xCPNxRA+yYC43hu\n3xXcr3qxQXm/vUDtTxaSmS4bsTq5TA/bSBV8980vOXeXo/SEnl0Wv/G5i84X\nUToiCB2GSY73UTtbIiIyX3hVJJeOt99O8VUJaQcrTvVGU+Zy1s2z2Lo4OsE8\nDG0a+M60INM6sOZx8oCH1m0lQeRr0qdFOC7Bu7FsQuewVBHrLteJWqoRjsSq\nd6K2McAlG9vEOscNb4IIblCUdxWQceN7XQaHAlXSTjMdPC/LR9Q+m6JFjwjC\noZTKBVMMrnWIhaNFui/nKuBwycCK5oO8dnWP8cuYRZas6OOKShiswr/WhTTp\nqf/06w7tr8U2hLGDtM9wvXzLpD8uSsmGf0PmI4MkONH4yfs3wEAj4vX1Is7R\nGOk4SLEGFJfKsruamZjM/Qi1zJ5wngj02gRDqi1NGC2vEfvMmKZODb7smoxQ\nhDsrXm3TFF1MZZxTczrlIfIM2ojVQK2Li12W5yISJu2FXmhLSSGlAb01PJeg\nWl/tol+q+HvtmbCwdXM+qm9px/JfVAtBpqbyExJtU6KuPXOqy7CuJExBdR3d\nBM8kIWtdqpuVZwOn1vvGZQoUUSlRjLvQaS6sU0545RKLiueraaDHgOKBzOua\nX3mF\r\n=ySK0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.3.4.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.3.4\n- #5707: Internal cleanup to code coverage during build process.\n\n#### 4.3.3\n- #5552: Exported metadata contains only methods metadata and no longer contains URI metadata.\n\n####4.3.2\n- #5653: Added integration test case for Swagger with circular references.\n\n####4.3.1\n- #5622: Update documentation for \"Decode Response\" parameter.\n\n#### 4.3.0\n- #5630: Add support for `multipart/form-data` in `Content Type` parameter. `multipart/form-data` will be prioritised as a default value if the Swagger method has `formData` fields of type `file`.\n- #5630: Add an enum property choice of `application/wwww-form-urlencoded` and `multipart/form-data` to `Content Type` parameters when Swagger method has `formData` parameters which are not type `file` and do not define `consumes`.\n- #5630: Change the default value for `Content Type` parameters to `application/wwww-form-urlencoded`, falling back to `multipart/form-data` and then the first `consumes` value when either values exist inside the Swagger method's `consumes`.\n- #5640: Fix issue where charset is stripped from the default value for `Content Type` parameters in some cases.\n\n#### 4.2.0\n- #5432: It now adds additional information for `formData` parameters while converting the swagger parameters to json-schema properties\n\n#### 4.1.0\n- #5432: It now respects swagger `consumes` and `produces` properties while converting swagger definitions to flow node specs\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Breaking Change: Adds authorizations to the spec\n- #5358: Breaking Change: A `Default` output is created for all flow-nodes regardless of the swagger definition.\n- #5358: Breaking Change: An `Error` output is created for all flow-nodes to allow routing on connection errors.\n- #5358: The default JSONPath selector for all outputs is now `$.response`. Only the Error output defaults to `$.error`.\n\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"gitHead":"1ab8dbf479681b58af7d05ab55f9550686cf7ab2","scripts":{"test":"nyc mocha --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder-plugins","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.16.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.3.4_1557513833044_0.4601677483761244","host":"s3://npm-registry-packages"}},"4.3.5":{"name":"nodehandler-utils","version":"4.3.5","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.3.5","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":98,"branches":97,"statements":98},"dist":{"shasum":"5210eafd7c44dba78e7080774d35f6f3aa01926b","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.3.5.tgz","fileCount":8,"integrity":"sha512-//+KE/yxUXh5VvQIUh5HlxSKAYYfPuzCgvV9e0FfnrF77tK265hgBlLPjkZLgl8k6CJbqlPobdM1DuFmmeOCTA==","signatures":[{"sig":"MEUCIBw+vBaBk0iKvrhnLjQ42E+9IAa0iamqp6DvN+xY5GPAAiEA/wJWkaYTGB0Zc9a0hLNjH9DrXxXDCCaJ5GotoGv9fkQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3BIuCRA9TVsSAnZWagAAb4wP/1A+Ct3TBuHRRVMbJqg8\n4Pw0LE1TFKI+YNRAYyJBL/khGSWOv5zKSozDaBeveSzCAbs7nwGlnhpw2oYM\n4v4Md+qomnzSyc36v9QbJG314D0EsC6UkTVmGgbr4Vt/YMggdPlFu6Bbky4P\n1xsLDngxb2KKcBqxqKfKIu9zsZppr/LmFIrgSPnlvs5IoFi4l1TQysMT5QjU\nMZDvwXTRqjUygx/NPYW+LU+6lUO9IqR+VzpRonrr9Ejif6pwpRU/EDNUWhsK\nga8yxvCkhSZG1d2UWyTiedJ4ZS9G7+56mtEbxzc/vkLh9mJELDYR46EAxyI7\n2jiKGAKu2ltrhNwdJ+Jwn1kF+FzjuETcKGXk1iBCYzi/EOlvFc1/zDtdVXry\nL9kFmO+UkoGATF/Y7D1eVX4QwlbPoaqrdBdxBoUOcK4Ij5ZVGKR3pz2XjSHh\nv5EuKshmYnhn6kaQEkee6o6endrtGY/kMlkgbY7dIHKS6pn5Zlzo00qFN9k+\nExdOXrlFquclua7aajG7N8F2eaNX9zhJkxTaS+6Z4nVegyieqTXJ7r+zuazz\n2qLeRPGrh5N59Tk01FtwSL2eACWEi+VbgEQsGafd1nTRH95BzkJ74W0SHp+J\nWWZvotwLiHJCMy5N2rQiO9e1zC3nZTEdrSl36L1hsti2CwYVhTNfLHCzKtz7\nPAvu\r\n=2A/N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.3.5.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.3.5\n- #5708: Internal changes to update mocha configuration\n\n#### 4.3.4\n- #5707: Internal cleanup to code coverage during build process.\n\n#### 4.3.3\n- #5552: Exported metadata contains only methods metadata and no longer contains URI metadata.\n\n####4.3.2\n- #5653: Added integration test case for Swagger with circular references.\n\n####4.3.1\n- #5622: Update documentation for \"Decode Response\" parameter.\n\n#### 4.3.0\n- #5630: Add support for `multipart/form-data` in `Content Type` parameter. `multipart/form-data` will be prioritised as a default value if the Swagger method has `formData` fields of type `file`.\n- #5630: Add an enum property choice of `application/wwww-form-urlencoded` and `multipart/form-data` to `Content Type` parameters when Swagger method has `formData` parameters which are not type `file` and do not define `consumes`.\n- #5630: Change the default value for `Content Type` parameters to `application/wwww-form-urlencoded`, falling back to `multipart/form-data` and then the first `consumes` value when either values exist inside the Swagger method's `consumes`.\n- #5640: Fix issue where charset is stripped from the default value for `Content Type` parameters in some cases.\n\n#### 4.2.0\n- #5432: It now adds additional information for `formData` parameters while converting the swagger parameters to json-schema properties\n\n#### 4.1.0\n- #5432: It now respects swagger `consumes` and `produces` properties while converting swagger definitions to flow node specs\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Breaking Change: Adds authorizations to the spec\n- #5358: Breaking Change: A `Default` output is created for all flow-nodes regardless of the swagger definition.\n- #5358: Breaking Change: An `Error` output is created for all flow-nodes to allow routing on connection errors.\n- #5358: The default JSONPath selector for all outputs is now `$.response`. Only the Error output defaults to `$.error`.\n\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"gitHead":"04ab4f59b25e7b734fef0c63ee6e9b5508ba7ce9","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","build:dev":"npm run build:lint && npm run test && npm run build:readme","build:lint":"eslint .","check:used":"dependency-check ./package.json","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder-plugins","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.16.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.3.5_1557926446098_0.0322469717170466","host":"s3://npm-registry-packages"}},"4.3.6":{"name":"nodehandler-utils","version":"4.3.6","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.3.6","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":98,"branches":97,"statements":98},"dist":{"shasum":"88800604f5138605e547d8e5c4e0bee2d172e7d0","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.3.6.tgz","fileCount":8,"integrity":"sha512-l56UjcQmGtTJ8toOXEVSOD0e7qts3GRJYW7jADrrnaug9lWQbSVfyJsO9+5bTeLu8fXilYtXXjtglvBa6ZwBhg==","signatures":[{"sig":"MEYCIQDZYY1XNVGxL/fivg/HaMYhdb8np9dV3Xb/G5vmIqymUgIhAIZA40pADO0evIxNhYXq+4a++6cBRIh9DLf3xiyA2oL4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3CBHCRA9TVsSAnZWagAAvCMP/0h4I5dfSmNz9ajS9iWm\nZUnTHVYFojzoXTVJYwMGvE9J/ESMlFp5qy39G9DLH97E/s7o5rc2GfW15oVE\nHyNKc0bgsMnam+jju54btgOiFcnDerp9Sv+yEWeoOPYurYn1XWAp1HnPu4Gz\npjqu8N2RTAuYHf+lP1UzDvavOXdIjc6OxyvmkRmWRrNA7TP4WwX5JZds/AIM\n3zkgS0TCd9KdRQX7Ln5OFPxDz/GjMPtyNwhJ2w/nhEhywIZ73mcbzfZVC2A7\nVRgTDUdZUBhYd4kaAm87YGLeYNESZdJla9TUS71ThYcCwQKW7+tVhLWnabKp\nH43xm9HN0PdXnTRNl42Xtm6OKPxcUKdWXoEeBIO1BzTz/8FxPlx3fzuS1VKO\nLohvJBXGqTK4RGik43SIkjFJCLsL+rXi6fEOzhvBSy1KFOvvcg4NsJyODnhj\nk8Vvq5c6lxeqUpDDEXWsHIn6Sjll1K4zwGxjUlt1GO6DegJ2elMiXuAYUvPu\nJ2TyVqBmCmJqYFQckVe18fF2mAgtx2Smv7z95dqhBk2jXCDHkXrHZxxf1zib\n6nVtwcSO56J+9JsGKkdTNHRQ1SD2CoQNH/eJS40dQxLmcLUMoj1VrSADcyx7\nnHWyMc2CLVk7ywoiroGMpb/k+gHBXTl9Arpp64LjwQaC5zYUDMJ6DENKEqMu\nbQYa\r\n=X9lW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.3.6.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.3.6\n- #5708: Internal changes to get rid of generating readme if unnecesarry.\n\n#### 4.3.5\n- #5708: Internal changes to update mocha configuration.\n\n#### 4.3.4\n- #5707: Internal cleanup to code coverage during build process.\n\n#### 4.3.3\n- #5552: Exported metadata contains only methods metadata and no longer contains URI metadata.\n\n####4.3.2\n- #5653: Added integration test case for Swagger with circular references.\n\n####4.3.1\n- #5622: Update documentation for \"Decode Response\" parameter.\n\n#### 4.3.0\n- #5630: Add support for `multipart/form-data` in `Content Type` parameter. `multipart/form-data` will be prioritised as a default value if the Swagger method has `formData` fields of type `file`.\n- #5630: Add an enum property choice of `application/wwww-form-urlencoded` and `multipart/form-data` to `Content Type` parameters when Swagger method has `formData` parameters which are not type `file` and do not define `consumes`.\n- #5630: Change the default value for `Content Type` parameters to `application/wwww-form-urlencoded`, falling back to `multipart/form-data` and then the first `consumes` value when either values exist inside the Swagger method's `consumes`.\n- #5640: Fix issue where charset is stripped from the default value for `Content Type` parameters in some cases.\n\n#### 4.2.0\n- #5432: It now adds additional information for `formData` parameters while converting the swagger parameters to json-schema properties\n\n#### 4.1.0\n- #5432: It now respects swagger `consumes` and `produces` properties while converting swagger definitions to flow node specs\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Breaking Change: Adds authorizations to the spec\n- #5358: Breaking Change: A `Default` output is created for all flow-nodes regardless of the swagger definition.\n- #5358: Breaking Change: An `Error` output is created for all flow-nodes to allow routing on connection errors.\n- #5358: The default JSONPath selector for all outputs is now `$.response`. Only the Error output defaults to `$.error`.\n\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"gitHead":"6e926ec9eeedefb580722a7f7d862d8e95d8903d","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","build:dev":"npm run build:lint && npm run test","build:lint":"eslint .","check:used":"dependency-check ./package.json","check:unused":"dependency-check ./package.json --unused --no-dev","build:lint:fix":"eslint . --fix","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder-plugins","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.16.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.3.6_1557930055131_0.7367842570686105","host":"s3://npm-registry-packages"}},"4.3.7":{"name":"nodehandler-utils","version":"4.3.7","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.3.7","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":98,"branches":97,"statements":98},"dist":{"shasum":"0be6c2076323b7ee649cdd45cc488f658b046a63","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.3.7.tgz","fileCount":8,"integrity":"sha512-cQUGkPv8MtQPOJVnAFjA6CygHQ8l+BsPg5nZ5qADoQ6Ay6aqxNyMYbQqxr5euQnN7h09IZOcyQ82x5LU6SCiEA==","signatures":[{"sig":"MEYCIQCFazsyLl2AILFXNBC3Wk8NLuOnaUKpSTMTDKfIv+OFrwIhAKwZKZUkMU2BWQEJh3cCGjdIpuMBar89YPaUHalnznZV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5VtrCRA9TVsSAnZWagAA0jIP/jMEY22DwFwvdEppHVeI\nSUnDoZkjeZGjFH2R4hVLIB58S/Jm14IbvaIYYoXCIobAY9MG/4lEViRD9Hvq\nYdO9bnwB8eanWwg0Rn9ibCJHrBTQ7Ox9Rs9pnM2uGj1LpGvLbF7xQqG5hGkb\njrDy9BWFvheN/4lJjLEPsIU7ejNhruplVrC5HXkflFzoZw8Qw/AwX49n/X5o\nmCJgLMji8Xl4k1fv0+1DCOInnYc7IpA/n60BvWVvOCyvRV3TA8WUo22a9COY\nuibP7qReHcdKNEgiWnxa7qQV7n29F020ZACzW4xzXP3xWO178vb01w3RIg9k\n1JI71OAuLk/850kbr/PWadCjK7AxT0Kwhot5SHQrYvJgELdHW/KtxMylc+Ap\n5VSBTK9J5TY4Liisn8cIoikN1Bj5HVrs8b6BtvS5jfnHqsMHRun191rVwG3v\noQMwD0+3QEGkRj3Wx7NhsTY7OrMm696+1qhvXI09uZgEv5uJ9AeZSGqtCpqb\nL03kUO49PQaYhTikYNB36g3f6PrhDvuZo4N5w/km1lDHBAkYuJQQgmgF/l34\n1XgoOGZR6O44Lyl91MOYL0uQRY9+oXJVF0u5vFe42y+fes8lATOsYgWl7uH5\nGKryngt1z9s3WakOl2g5WL+7KjFttQXwTw1JQCFH+18isRUI/4xhxCYLORKj\nrd/s\r\n=2x/L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.3.7.tgz","engines":{"node":">= 8.9"},"gitHead":"efa6ee2c3beae11da58794c25cf0a8e7b32c87ee","scripts":{"test":"nyc mocha ./test","build":"npm run build:lint && npm run test","build:lint":"eslint .","build:lint:fix":"eslint . --fix","check:dependencies":"npm-check -i chai -i simple-mock"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder-plugins","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.16.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.3.7_1558535018404_0.137321143544475","host":"s3://npm-registry-packages"}},"2.2.13":{"name":"nodehandler-utils","version":"2.2.13","keywords":["amplify","api-builder","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@2.2.13","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"c3f87d658c08ebbf67251c490aa798b4ed9eacfc","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-2.2.13.tgz","fileCount":4,"integrity":"sha512-gW94Pno7d6mvUYTxBdtXjryCM4QF/8XQxZ+gVDaOI+HQfSux9ItZ21c6A20QdoWv0KSr+bMopkak9SH/E38HDA==","signatures":[{"sig":"MEUCIQCzNFugMRepHviFKxDujDAGsvnTs5h28K6HDDo8nivlSAIgNfnD22BrNxJbl1iBW2aAvOAzudSN8A2PKsQzjVm0oUU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc56SMCRA9TVsSAnZWagAAcIAQAIzoY/clkQlmdx2DZ//w\n1tSE9JwPVybi4LLFNfrj+pwtVk54cGmVAfJLvcgA4dGWA/nr4uqCOLaCO84G\n1v8xCsgCn9aK0ZW79xSnDpuWw47bqYwYksltHCwEwLuhxeV+MW500OhcTqw6\nAWGuuy/c8RtYKoheH3GtZ6PrMPybEuf+P0B5AgYUYTO2t6rQWCgv65W2OCc6\nn9YfHY90hhEZFyc+bV1s7m53aqn9XFH1aJFucQ/HUs8x0gUISf6G+eSuOMxu\nEavCnCrIZTVom26OOiLjKp24npoB6pPoQ0AEeMLUuuM2/1LgoHTNmq8tsFhd\nSey+ZZUvmr27M2VFQ2e7HH0KVaFgMlqOMEkltdTyLstEfgpJ9arZyxY/PRRT\nSryiuM+MSDGq9QvMOanvQ4rkg5w/lbnF7/iuHBrQOtnKPHwGTjAIwAgZ8Yhq\nhzRsiAegKHELM76fs2ehIGQ2vE8F7Xh35d7Pnwe1EKuJdYs19QBV9/zG2ams\ns47v9ApDD4rOEsQqnTzSQJABTfhJQgzgVap/2bu3iXohe1p+Np58KDckm8Yv\n/ZgnyGy+AHmWUN0OPMt8lmycGEWMs827Rh+ud83BvvPf4uAur252VnfeMkbg\nlEQZV5OFdVzQEa5yNkY1skFTsOHOB7cSHQo4DvJnIt00OCuMY/LFQRZLs3em\nmcM8\r\n=/RyM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:published/nodehandler-utils@2.2.13.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const spec =  NodeHandlerUtils.registerSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, name, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.registerSchemas(swagger, name)](#module_nodehandler-utils..NodeHandlerUtils.registerSchemas)\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, name, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a node handler spec.  The `uri` uniquely identifies\nthe node handler, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - node handler spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| name | <code>string</code> | The name of the node handler |\n| uri | <code>string</code> | The unique uri of the node handler |\n| [icon] | <code>string</code> | The node handler's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.registerSchemas\"></a>\n\n#### NodeHandlerUtils.registerSchemas(swagger, name)\nRegisters schema using the`#/definitions` of a swagger document.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| name | <code>string</code> | The name of the node handler |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## License\n\nThis code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.\n","engines":{"node":">= 8.9"},"scripts":{"test":"shx rm -rf coverage .nyc_output && cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test --recursive -R spec","build":"npm run clean && npm run build:dev","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 && shx rm -rf .nyc_output","build:dev":"npm run build:lint && npm run check:used && npm run test && npm run build:dist","build:dist":"npm run build:readme && babel -d ./dist ./src","build:lint":"eslint .","check:used":"dependency-check ./package.json --no-dev --entry src/index.js","test:watch":"npm test -- --watch","build:readme":"node-readme && shx mv README.md README.hbs && jsdoc2md --template README.hbs src/index.js > README.md && shx rm -rf README.hbs","check:unused":"dependency-check ./package.json --unused --no-dev -i deep-equal","check:dependencies":"npm run check:used && npm run check:unused"},"_npmUser":{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.1.0","description":"nodehandler utils","directories":{},"_nodeVersion":"8.11.3","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","axway-schema":"2.2.3","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"axway-flow":"2.2.13"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_2.2.13_1558684812165_0.7903194583976227","host":"s3://npm-registry-packages"}},"4.3.8":{"name":"nodehandler-utils","version":"4.3.8","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.3.8","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"ivivanov-axway","email":"ivivanov@axway.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":98,"branches":97,"statements":98},"dist":{"shasum":"4713f1a4317cb4559e7100e2b774cef052753d65","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.3.8.tgz","fileCount":8,"integrity":"sha512-EoICExeZx0jYjuf77WlLiUdpNerUucSxjbLOP8jDYSoKEINC4aEwYfEK+gFJTCenYlUUN0jN3zBCeBpHtrfMAA==","signatures":[{"sig":"MEQCICIZhq33byGGQAppEgZa/qL6Bqgz23picZCJjsi0wol3AiAE7PtSL96GQtHo0mJDFSXeoR0M0a5O8Wdsnfk98ZModw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjfi9CRA9TVsSAnZWagAAXjcP/R5AQKl8OTNl5nE0DYWJ\n/vWDpyVrKQlwRHnGB0TDSQpchNgYu5FBVZd+VFquMZdUIHzaNYJ+gZsYuchb\nABDMtl5E13MvcxD9oKxVKDSFLajYyBBfM1a/82n1mwhipCuFoAbm7R36Lg12\nEq+K+RBFt8ln6oKxuo+fOrYTj0FtDOodjdsdNZt7FrFKl2JdY3X/JLRsOhU3\nUaedHN9pb6PhddVkQAd2v+pTUgTe5hA4AoYbS1lS/ggHubEdCi7ju5Mw1hiu\n5DvCfWAIaHiVtryEl9CvuQgst3pPYnCBBARHomLU/oIV38ki4MqR+2rB/n93\nXhq8uGfNYyJ+YR61JuFCLDjAOCmIWdMq2U1tHCgdJQq2+Savb2VGC4jur7Lf\nClA6BJei5hRIGL0bBUZaPvsBui169Qgv3KqCBw0Zl/E9OIDuHmz2q9iuTlPh\nkdWP348Wp2ST8J5LYFsHjLkv3UeZK89ZC2DdRZElfgKVmilfcxb18BOY33vL\nYFdL1eKOB6BKMdF/0EQ4EI6CrLlKelsOYFZxEHq82n0pz8kfYssn2u0Lgn2R\n7Atc6K5SUcCUaqa4u6uicb9cA92jd6m+0aUyuJW+1w4TEvVlR8o6vWplx/SH\nAwfim1a0giw+n3ppNM/i1Q4H1+aWslhiZeuPRmL76hEmjH89RKEQ9RBONlWb\nel9i\r\n=uZPF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.3.8.tgz","engines":{"node":">= 8.9"},"gitHead":"743a4baacaf10fe8ba868ff98cf6a2d99dab4854","scripts":{"test":"nyc mocha ./test","build":"npm run build:lint && npm run test","build:lint":"eslint .","build:lint:fix":"eslint . --fix","check:dependencies":"npm-check -i chai -i simple-mock"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder-plugins","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.16.1","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.3.8_1569585340544_0.6662789840498551","host":"s3://npm-registry-packages"}},"4.3.9":{"name":"nodehandler-utils","version":"4.3.9","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.3.9","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway_alasdair","email":"ahurst@axway.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"pltod2","email":"pl.todorov@gmail.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":98,"branches":97,"statements":98},"dist":{"shasum":"84617f217670138ca36c99136f50f0116d40e73b","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.3.9.tgz","fileCount":8,"integrity":"sha512-cXP1RihiBxzXwlAQwSEnK3Pjxz/got2Pj5Tlxej+Pdky2RZnvJngU7HdmMUP4LQKJ4/3fGJ38f1tquijorm10Q==","signatures":[{"sig":"MEYCIQDZbWhRroOFurjBRkWy4G2qUhZ0I4nrAw68l8vycFcQywIhAL0H+KyqOUt6Dz0kqTpTEaTySNOafVDdmqV1fFwvrZno","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4PjuCRA9TVsSAnZWagAA7uQP/3cVULms+kn5ic97G/6i\n7xipX1/8LbNt2TF9ylLokBFyjyu76aH6QjVBgso4m2Uh4s7rEimGTL2H1LNM\nDHN2tDVRgSXHwZUh6GSmAKghEWLFvdn5j23vBl4FaE03q4j9uq0YCTPEINb7\nB8Wrs/wTGphj6JiVca80VNiCR+HEQsreFvI+go8dTODqi8HXQEBLpuBKmTp8\n8jM/BUo82ps90sUuGAiIOyVKXWRfKy+CjP8Huv8VmLly6KYzDLnfauUsczSY\nAyigClnpph3IMY/+f6cuhjgVrnpaNArzWzg4hT+dMpZUThUiCufGTUHcB2lB\nudnCfZYf70Ip0GOFFRx1Cjt4CHIjrBTBOWyuK53IBSB5BaFY3h798TZF0/54\njsMOVikT3Ek9N6VmmJt+k75hPYPF6ahC5WF2l7WHOVDcuhH7G/2bKbClDheH\nCVPSd8YMBcK+XQw2Gwj6HDOImOECRAos0U4XBEtZ57X9DHN2LbJHtkJylSfU\nTchE/WrlwGtNm7MpUF/4XKZN+3Xco9DFVreWtMxcUywZXKvd/+TeFBTuFpxG\n+aaX55y1RnMFqZO83efamm2J/w9V3aRh75TcQMS94KdSxKpFAYJE9NhDhqKd\nE+mNQVhNHg7NkiXTm7KU5okYD/t5LYvo9LY1GT/tw4BTGsI7bCNGPz+Yn3cO\nM5iZ\r\n=Hk76\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.3.9.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Access**: public  \n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - schema property  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>object</code> - flow-node spec  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>array</code> - An array of schemas.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)  \n**Returns**: <code>string</code> - The formatted URI.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)  \n**Returns**: <code>string</code> - The custom operationID  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.3.9\n- #6114: Refactor code for style, security and performance improvements.\n\n#### 4.3.8\n- #6074: Internal CI chore\n\n#### 4.3.7\n- #5711: Internal cleanup of npm scripts.\n\n#### 4.3.6\n- #5708: Internal changes to get rid of generating readme if unnecesarry.\n\n#### 4.3.5\n- #5708: Internal changes to update mocha configuration.\n\n#### 4.3.4\n- #5707: Internal cleanup to code coverage during build process.\n\n#### 4.3.3\n- #5552: Exported metadata contains only methods metadata and no longer contains URI metadata.\n\n####4.3.2\n- #5653: Added integration test case for Swagger with circular references.\n\n####4.3.1\n- #5622: Update documentation for \"Decode Response\" parameter.\n\n#### 4.3.0\n- #5630: Add support for `multipart/form-data` in `Content Type` parameter. `multipart/form-data` will be prioritised as a default value if the Swagger method has `formData` fields of type `file`.\n- #5630: Add an enum property choice of `application/wwww-form-urlencoded` and `multipart/form-data` to `Content Type` parameters when Swagger method has `formData` parameters which are not type `file` and do not define `consumes`.\n- #5630: Change the default value for `Content Type` parameters to `application/wwww-form-urlencoded`, falling back to `multipart/form-data` and then the first `consumes` value when either values exist inside the Swagger method's `consumes`.\n- #5640: Fix issue where charset is stripped from the default value for `Content Type` parameters in some cases.\n\n#### 4.2.0\n- #5432: It now adds additional information for `formData` parameters while converting the swagger parameters to json-schema properties\n\n#### 4.1.0\n- #5432: It now respects swagger `consumes` and `produces` properties while converting swagger definitions to flow node specs\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Breaking Change: Adds authorizations to the spec\n- #5358: Breaking Change: A `Default` output is created for all flow-nodes regardless of the swagger definition.\n- #5358: Breaking Change: An `Error` output is created for all flow-nodes to allow routing on connection errors.\n- #5358: The default JSONPath selector for all outputs is now `$.response`. Only the Error output defaults to `$.error`.\n\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"gitHead":"98687f704ce46524c8ac2130a300e74148f33b5c","scripts":{"test":"nyc mocha ./test","build":"npm run build:lint && npm run test","build:lint":"eslint .","build:lint:fix":"eslint . --fix","check:dependencies":"npm-check -i chai -i simple-mock"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder-plugins","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.16.2","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.3.9_1575024877760_0.36931070514761966","host":"s3://npm-registry-packages"}},"4.3.10":{"name":"nodehandler-utils","version":"4.3.10","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.3.10","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway_alasdair","email":"ahurst@axway.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"pltod2","email":"pl.todorov@gmail.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":98.05,"branches":97.01,"statements":98.05},"dist":{"shasum":"f66eab9bd366dc30c78fd667e03830a634fc9a40","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.3.10.tgz","fileCount":8,"integrity":"sha512-7dVkTg1Kao6JblH1yXoAWTwBHIiZG5YXSZaooi7dtjEGTvUG1Nwj52KzQtc6kZsWiIId5B1o7gG4xJI6TJjZ+Q==","signatures":[{"sig":"MEYCIQCI4btnncQC8zb8XNP1bxtqtfAVCDD8hlEdK20aCWKtsQIhAMGzAjpRoiGL35hxD9dMXjOGjKHV0hj8anRI0B8o6um4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51983,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4RczCRA9TVsSAnZWagAA/24P/RMZK/4LTv4fdtcv428F\nc3LCsoYeMg3tGJZLB7Fxna1ix8/MqiX1HUWXsf1JibkeWhZAP9oyN7GmmQFF\niFzUZrWvCaHTlO9pOtpEcVSwgUA94Q09sKJAKLHdOKx49eV7CUg+e9bhP2np\nOXZVhAfLcJqq2aF0yxX5OosMa1nvm0mtQdTX2OIepqxNXA/8KCXAzFzH+0KJ\nw9J3rX3UXPi7/wpcZWfb+x19J/JJgwtsqGjtIvwMo1t3Okl4eazrS7B6rhCj\nLcY898IEc4OcmF01zS4kYxbnbCv0FOt4aeAT8YDeT0+ZHPMOKXLHbxUQrgmB\nSfnCGPdu4UTsGmCw1XZKbwX6AUVokpgVX6BsLWK/MW0L94Pl++LOMrIVHhMq\nNjDQnp4taKa+VtND2m//DWyWU94F9lqqJJ78hUAdUc4dRppp0KSf5xqnMGEq\nNBLTbkFINnT2khWbx4LWvWTIaCnCRdrdzTTlYp2OZquK4nI7lAVceHcY7rZy\ngQH4VElSJlaOmECdlclsc7MUZjc8GAYrvnI28XrKm3tmNTiddh8JoN9lHzsu\nZNU/VjUjt631pk+8t+qaqkpTUXv17gBIIJxXefbxAeFty+7VKW+dYTtzwxcB\nrANPTH2QPyjxl1CsbRKNaPePpWKk02qvA8Y1FCSaxJjp4C8JZLxSA55fbWc6\nGUz0\r\n=+7vY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.3.10.tgz","engines":{"node":">= 8.9"},"gitHead":"84d1d4a46f11909e17dfc654438ea869024b921c","scripts":{"test":"nyc mocha ./test","build":"npm run build:lint && npm run test","build:lint":"eslint .","build:lint:fix":"eslint . --fix","check:dependencies":"npm-check -i chai -i simple-mock"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder-plugins","type":"git"},"_npmVersion":"6.4.1","description":"nodehandler utils","directories":{},"_nodeVersion":"8.16.2","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.3.10_1575032627183_0.11421099395878342","host":"s3://npm-registry-packages"}},"4.3.11":{"name":"nodehandler-utils","version":"4.3.11","keywords":["amplify","api-builder","axway","axway-flow"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"nodehandler-utils@4.3.11","maintainers":[{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"axway_alasdair","email":"ahurst@axway.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"pltod2","email":"pl.todorov@gmail.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":98.05,"branches":97.01,"statements":98.05},"dist":{"shasum":"35338c9db9058694d64e9767035610286301168d","tarball":"https://registry.npmjs.org/nodehandler-utils/-/nodehandler-utils-4.3.11.tgz","fileCount":8,"integrity":"sha512-+h7b8jjF/eRoCQyC3JDexamFpQqBd7r9K4FDB30V0F2BeKCNSYBk40V/dmIMLjrC2o2AzbxCI6vqLnCpieNsiA==","signatures":[{"sig":"MEUCIB93mMxTf+wPesDMJpoA45B6N7z3jZc/azh6LcAT13pVAiEAsm1ZSz42CD3YhnxYQehCPiN6gHl3gGC9DN8C/dEwM9Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52021,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejYKXCRA9TVsSAnZWagAA6QoP/2h5WsyXNQQ5C3rgd8S7\ntHaC119QSMqB/GyCYFflB5O/7TQFXDwvc4ZKO/h24ylz5nUgaAl2IQM/F1Au\nGeWpZj/CIyQufoG/2S2eE3muJsavThoLU4TD7bKfbqYjWv2oPypqvb0qwZWW\nnwc96KE8DP+a6eGjXwOIQ0WG9T4KGAlFHuowQ4b253nH+PVs8UBMN5e9zA6A\nuQpGN1fIUVGGm5qUAg0EfFhpcebJIGBWH6ZIgeUPwijPNHh317hH93D/5Oef\n0OsHvjoWB2sAe4qz0ssxbL4v18klKf0XAmOYPNO48mo67BWjf4tDW3Lp8/uA\neoPkFcp08XBQgn1VyQDDmQNO8RptausA/HU11W98KDHL3wISWOhYFQIPS3Ai\nDB3fwrP6UxswdfecB2gwVVfJcwdaUORmPhwlRMI8Nl/TPqxrIQViz6gkFdOy\npWsQ5IshkZSMglzBvSfRRCC9elVTARbOXmCyWkKBUOyLs5sOpDP/FxjGRPZw\nElQdCKE42HCkcWwj2txwu5JAJbt55VuBJTZaQlwrv2LGwKNiu/OtwW/CVM7i\nWsCHH1ocj1gamRVLpdgfB0ZogwRm5gQG/rLNBhpssWfokg4MMzp9yLNelEKY\n1de6LwmgCDmGZ7iKeflVpef35sq6YcXaPe+ynpWJCUE4zqydlG4nA0guQVk7\nOgga\r\n=Smsy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/nodehandler-utils@4.3.11.tgz","readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*\n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)\n**Access**: public\n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)\n**Returns**: <code>object</code> - schema property\n**Access**: public\n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)\n**Returns**: <code>object</code> - flow-node spec\n**Access**: public\n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)\n**Returns**: <code>array</code> - An array of schemas.\n**Access**: public\n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)\n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)\n**Returns**: <code>string</code> - The formatted URI.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)\n**Returns**: <code>string</code> - The custom operationID\n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.3.11\n- #6315: Internal chore.\n\n#### 4.3.10\n- #6116: Internal cleanup chore.\n\n#### 4.3.9\n- #6114: Refactor code for style, security and performance improvements.\n\n#### 4.3.8\n- #6074: Internal CI chore\n\n#### 4.3.7\n- #5711: Internal cleanup of npm scripts.\n\n#### 4.3.6\n- #5708: Internal changes to get rid of generating readme if unnecesarry.\n\n#### 4.3.5\n- #5708: Internal changes to update mocha configuration.\n\n#### 4.3.4\n- #5707: Internal cleanup to code coverage during build process.\n\n#### 4.3.3\n- #5552: Exported metadata contains only methods metadata and no longer contains URI metadata.\n\n####4.3.2\n- #5653: Added integration test case for Swagger with circular references.\n\n####4.3.1\n- #5622: Update documentation for \"Decode Response\" parameter.\n\n#### 4.3.0\n- #5630: Add support for `multipart/form-data` in `Content Type` parameter. `multipart/form-data` will be prioritised as a default value if the Swagger method has `formData` fields of type `file`.\n- #5630: Add an enum property choice of `application/wwww-form-urlencoded` and `multipart/form-data` to `Content Type` parameters when Swagger method has `formData` parameters which are not type `file` and do not define `consumes`.\n- #5630: Change the default value for `Content Type` parameters to `application/wwww-form-urlencoded`, falling back to `multipart/form-data` and then the first `consumes` value when either values exist inside the Swagger method's `consumes`.\n- #5640: Fix issue where charset is stripped from the default value for `Content Type` parameters in some cases.\n\n#### 4.2.0\n- #5432: It now adds additional information for `formData` parameters while converting the swagger parameters to json-schema properties\n\n#### 4.1.0\n- #5432: It now respects swagger `consumes` and `produces` properties while converting swagger definitions to flow node specs\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Breaking Change: Adds authorizations to the spec\n- #5358: Breaking Change: A `Default` output is created for all flow-nodes regardless of the swagger definition.\n- #5358: Breaking Change: An `Error` output is created for all flow-nodes to allow routing on connection errors.\n- #5358: The default JSONPath selector for all outputs is now `$.response`. Only the Error output defaults to `$.error`.\n\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","engines":{"node":">= 8.9"},"gitHead":"e2a495c05f8daf8ceb6a13a6b51e8392c726b88b","scripts":{"test":"nyc mocha ./test","build":"npm run build:lint && npm run test","build:lint":"eslint .","build:lint:fix":"eslint . --fix","check:dependencies":"npm-check -i chai -i simple-mock"},"_npmUser":{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder-plugins","type":"git"},"_npmVersion":"6.13.4","description":"nodehandler utils","directories":{},"_nodeVersion":"8.17.0","dependencies":{"json-refs":"^3.0.2","capitalize":"^1.0.0","content-type":"^1.0.4","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ajv":"^6.5.0","@axway/flow":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nodehandler-utils_4.3.11_1586332310992_0.3332644772944806","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-11-15T16:26:23.315Z","modified":"2025-07-25T08:31:02.010Z","2.0.1":"2017-11-15T16:26:23.315Z","2.0.2":"2017-11-21T18:12:03.752Z","2.0.3-101":"2018-02-05T16:47:36.755Z","2.0.3-102":"2018-02-13T14:13:17.514Z","2.0.3-103":"2018-02-19T18:01:39.557Z","2.0.3-104":"2018-02-21T15:13:24.343Z","2.0.3-105":"2018-02-21T21:30:32.063Z","2.0.3-106":"2018-02-22T04:38:36.307Z","2.1.0":"2018-02-22T18:26:18.891Z","2.1.1-0":"2018-03-08T11:14:37.061Z","2.1.1-1":"2018-03-20T13:52:16.072Z","2.1.1-2":"2018-03-21T12:37:48.841Z","2.1.1-3":"2018-03-23T21:47:14.931Z","2.1.1-4":"2018-03-27T13:34:12.649Z","2.1.1-5":"2018-04-11T14:50:49.964Z","3.0.0-1":"2018-04-12T11:19:20.704Z","3.0.0-2":"2018-04-25T16:52:33.741Z","3.0.0-3":"2018-05-10T08:55:08.755Z","3.0.0-4":"2018-05-24T18:02:08.372Z","3.0.0-5":"2018-05-25T16:08:56.811Z","3.0.0-6":"2018-06-10T12:12:38.502Z","3.0.0-7":"2018-06-15T11:01:11.680Z","3.0.0-8":"2018-06-18T12:34:48.482Z","2.1.1":"2018-06-18T14:49:09.974Z","3.0.0-9":"2018-06-20T10:17:59.405Z","3.0.0-10":"2018-06-21T11:10:50.167Z","3.0.0":"2018-06-27T10:15:24.189Z","3.0.1":"2018-07-10T17:14:18.301Z","3.0.2":"2018-07-19T10:06:49.866Z","3.0.3":"2018-07-23T11:50:38.043Z","3.0.4":"2018-07-23T12:14:05.501Z","3.0.5":"2018-08-02T13:02:50.034Z","3.0.6":"2018-08-03T09:28:30.415Z","3.0.7":"2018-08-03T10:19:35.629Z","3.1.0-rdpp-feat-4940.3de41a.0":"2018-08-14T11:06:50.430Z","4.0.0-rdpp-feat-4918.59fced.0":"2018-08-23T12:16:38.001Z","3.0.8":"2018-08-23T20:48:50.389Z","4.0.0-rdpp-feat-4918.5ff06a.0":"2018-08-24T14:09:55.784Z","4.0.0-rdpp-feat-4918.bcf75e.0":"2018-08-29T08:17:02.904Z","4.0.0-rdpp-feat-4918.76d99a.0":"2018-08-30T15:22:59.474Z","4.0.0-rdpp-feat-4918.0c3b98.0":"2018-08-31T15:56:27.555Z","3.0.9":"2018-09-06T13:23:07.839Z","4.0.0-rdpp-feat-4918.adf516.0":"2018-09-13T08:30:44.932Z","4.0.0-rdpp-feat-4918.083e37.0":"2018-09-13T15:09:16.875Z","4.0.0-rdpp-feat-4918.416e64.0":"2018-09-21T12:23:03.337Z","3.0.10":"2018-09-27T16:29:23.628Z","3.0.11":"2018-09-28T09:12:05.221Z","4.0.0-rdpp-feat-4918.804579.0":"2018-09-28T13:53:46.963Z","4.0.0-rdpp-feat-4918.a5e408.0":"2018-10-01T15:54:56.941Z","4.0.0-rdpp-feat-4918.c3db6f.0":"2018-10-04T12:05:46.848Z","4.0.0-rdpp-feat-5235.4f6541.0":"2018-10-05T13:31:48.907Z","4.0.0-rdpp-feat-5162.960006.0":"2018-10-08T15:02:49.977Z","4.0.0-rdpp-feat-4918.8bfb82.0":"2018-10-08T15:23:37.600Z","4.0.0-rdpp-feat-5235.29dff2.0":"2018-10-09T08:42:50.488Z","4.0.0-rdpp-feat-5235.b37758.0":"2018-10-09T10:24:47.882Z","4.0.0-rdpp-feat-4918.2d5162.0":"2018-10-09T10:30:43.556Z","4.0.0-rdpp-feat-5162.b48298.0":"2018-10-09T12:02:21.731Z","4.0.0-rdpp-feat-4918.6bd6b7.0":"2018-10-09T12:06:51.212Z","4.0.0-rdpp-feat-4918.50304a.0":"2018-10-12T11:29:04.677Z","4.0.0-rdpp-feat-4918.629929.0":"2018-10-17T10:55:01.362Z","4.0.0-rdpp-feat-4918.38ef09.0":"2018-10-18T18:26:50.346Z","2.2.4":"2018-10-25T16:06:08.870Z","2.2.5-rdpp-5320.c71483.0":"2018-10-31T10:47:14.084Z","2.2.5":"2018-10-31T11:00:22.323Z","4.0.0-rdpp-feat-4918.d87e6a.0":"2018-11-13T11:49:43.274Z","2.2.7":"2018-11-13T15:52:34.523Z","4.0.0-swagger-v2-preview.5f3d96.0":"2018-11-14T13:39:41.218Z","4.0.0-swagger-v2-preview.44b0ee.0":"2018-11-14T15:57:31.043Z","4.0.0-swagger-v2-preview.927944.0":"2018-11-14T16:11:25.198Z","4.0.0-swagger-v2-preview.d782ae.0":"2018-11-23T11:21:30.650Z","4.0.0-swagger-v2-preview.09c711.0":"2018-11-23T12:48:28.301Z","4.0.0-swagger-v2-preview.b8c6ff.0":"2018-11-23T15:06:56.241Z","4.0.0-swagger-v2-preview.7862b0.0":"2018-11-27T16:21:26.804Z","4.0.0":"2018-12-07T11:33:56.985Z","4.0.1":"2018-12-07T13:35:19.002Z","4.0.2":"2019-01-25T15:23:45.586Z","4.0.3":"2019-01-25T16:24:53.719Z","2.2.9":"2019-02-01T10:57:34.635Z","2.2.10":"2019-02-11T15:37:49.154Z","2.2.11":"2019-02-15T18:34:50.518Z","2.2.12":"2019-02-25T22:54:48.580Z","4.1.0":"2019-03-13T12:04:44.474Z","4.2.0":"2019-03-25T13:48:51.309Z","4.2.1":"2019-04-05T16:54:44.318Z","4.3.0":"2019-04-10T17:38:23.423Z","4.3.1":"2019-04-11T17:15:12.141Z","4.3.2":"2019-04-24T17:42:00.880Z","4.3.3":"2019-04-25T07:57:01.028Z","4.3.4":"2019-05-10T18:43:53.154Z","4.3.5":"2019-05-15T13:20:46.211Z","4.3.6":"2019-05-15T14:20:55.276Z","4.3.7":"2019-05-22T14:23:38.601Z","2.2.13":"2019-05-24T08:00:12.357Z","4.3.8":"2019-09-27T11:55:40.792Z","4.3.9":"2019-11-29T10:54:37.914Z","4.3.10":"2019-11-29T13:03:47.640Z","4.3.11":"2020-04-08T07:51:51.106Z"},"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","homepage":"https://platform.axway.com","keywords":["amplify","api-builder","axway","axway-flow"],"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder-plugins","type":"git"},"description":"nodehandler utils","maintainers":[{"email":"nkeranova@axway.com","name":"nkeranova"},{"email":"builder11@axway.com","name":"axway-npm"},{"email":"bladedancer.gavin@gmail.com","name":"bladedancer"},{"email":"ddimonov@axway.com","name":"ddimonov-axway"},{"email":"ashtripathi@axway.com","name":"neon-axway"},{"email":"vchauhan@axway.com","name":"vchauhan"},{"email":"mdimitrova@axway.com","name":"mdimitrova"},{"email":"pdzhorev@axway.com","name":"pdzhorev"},{"email":"ahurst@axway.com","name":"axway_alasdair"},{"email":"pl.todorov@gmail.com","name":"pltod2"},{"email":"mbonchev@axway.com","name":"mbonchev-axway"},{"email":"bchristiansen@axway.com","name":"axway-vertex"},{"email":"npm.modules@axway.com","name":"buildernpmuser"}],"readme":"# nodehandler-utils\n\nnodehandler utils\n\n# API Reference\n\n**Example** *(Quick start)*\n```javascript\n const { NodeHandlerUtils } = require('nodehandler-utils');\n const { FlowManager } = require('axway-flow');\n const uri = FlowManager.formatNodeHandlerUri('service-connector', 'thing');\n const swagger = require('./thing.json');\n const schemas =  NodeHandlerUtils.exportSchemas(swagger, 'thing');\n const spec =  NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, 'thing', uri, 'thing-icon');\n const icon = NodeHandlerUtils.loadIcon('icon.png');\n```\n<a name=\"module_nodehandler-utils..NodeHandlerUtils\"></a>\n\n### nodehandler-utils~NodeHandlerUtils\nNode handler utils\n\n**Kind**: inner class of [<code>nodehandler-utils</code>](#module_nodehandler-utils)\n**Access**: public\n\n* [~NodeHandlerUtils](#module_nodehandler-utils..NodeHandlerUtils)\n    * [.getSwaggerMethodAsProperties(swagger, name, verb, path)](#module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties) ⇒ <code>object</code>\n    * [.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon])](#module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec) ⇒ <code>object</code>\n    * [.exportSchemas(swagger, scope)](#module_nodehandler-utils..NodeHandlerUtils.exportSchemas) ⇒ <code>array</code>\n    * [.loadIcon(file)](#module_nodehandler-utils..NodeHandlerUtils.loadIcon) ⇒ <code>Promise.&lt;string&gt;</code>\n    * [.formatNodeHandlerUri(module, type)](#module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri) ⇒ <code>string</code>\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.getSwaggerMethodAsProperties\"></a>\n\n#### NodeHandlerUtils.getSwaggerMethodAsProperties(swagger, name, verb, path) ⇒ <code>object</code>\nConverts the swagger parameters to json-schema properties.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)\n**Returns**: <code>object</code> - schema property\n**Access**: public\n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | swagger doc |\n| name | <code>string</code> | The name of the node handler |\n| verb | <code>object</code> | the method verb |\n| path | <code>object</code> | the method path under swagger.paths |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.swaggerToNodeHandlerSpec\"></a>\n\n#### NodeHandlerUtils.swaggerToNodeHandlerSpec(swagger, scope, uri, [icon]) ⇒ <code>object</code>\nConverts a swagger definition to a flow-node spec.  The `uri` uniquely identifies\nthe flow-node, e.g. nodehandler://service-connector/foo (see `FlowManager.formatNodeHandlerUri`).\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)\n**Returns**: <code>object</code> - flow-node spec\n**Access**: public\n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to convert |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n| uri | <code>string</code> | The unique uri of the flow-node |\n| [icon] | <code>string</code> | The flow-node's icon (defaults to `glyphicon-link`). |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.exportSchemas\"></a>\n\n#### NodeHandlerUtils.exportSchemas(swagger, scope) ⇒ <code>array</code>\nExports schema from a swagger document.  Before returning, all of the references are\nrewritten to an axway-schema type reference, and identifiers are applied to each\nschema.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)\n**Returns**: <code>array</code> - An array of schemas.\n**Access**: public\n\n| Param | Type | Description |\n| --- | --- | --- |\n| swagger | <code>object</code> | The swagger document to use to register schemas |\n| scope | <code>string</code> | The flow-node scope used in schema references |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.loadIcon\"></a>\n\n#### NodeHandlerUtils.loadIcon(file) ⇒ <code>Promise.&lt;string&gt;</code>\nLoads an icon file and returns it as a data URI.  Supports bmp, jpeg, jpg, png, gif,\ntiff, and svg.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)\n**Returns**: <code>Promise.&lt;string&gt;</code> - The icon data URI.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | <code>string</code> | The icon file to load. |\n\n<a name=\"module_nodehandler-utils..NodeHandlerUtils.formatNodeHandlerUri\"></a>\n\n#### NodeHandlerUtils.formatNodeHandlerUri(module, type) ⇒ <code>string</code>\nFormats a nodehandler URI.\n\n**Kind**: static method of [<code>NodeHandlerUtils</code>](#module_nodehandler-utils..NodeHandlerUtils)\n**Returns**: <code>string</code> - The formatted URI.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| module | <code>string</code> | A module name for scope, e.g. \"twilio\". |\n| type | <code>string</code> | A simple URL safe type name, e.g. \"echo\". |\n\n<a name=\"module_nodehandler-utils..generateFunctionName\"></a>\n\n### nodehandler-utils~generateFunctionName(swpath, method) ⇒ <code>string</code>\nMethod to create custom operationID-like operation id. Taken from connectors team\nNOTE: duplicated from code from arrow-admin-api/src/util.js,\n\n**Kind**: inner method of [<code>nodehandler-utils</code>](#module_nodehandler-utils)\n**Returns**: <code>string</code> - The custom operationID\n\n| Param | Type | Description |\n| --- | --- | --- |\n| swpath | <code>string</code> | The swagger path (eg. /thing) |\n| method | <code>string</code> | The swagger method/verb (eg. \"GET\") |\n\n\n## Building\n\n```bash\nnpm run build\n```\n\n## Author\n\nAxway <support@axway.com> https://axway.com\n\n## Changes\n\n#### 4.3.10\n- #6116: Internal cleanup chore.\n\n#### 4.3.9\n- #6114: Refactor code for style, security and performance improvements.\n\n#### 4.3.8\n- #6074: Internal CI chore\n\n#### 4.3.7\n- #5711: Internal cleanup of npm scripts.\n\n#### 4.3.6\n- #5708: Internal changes to get rid of generating readme if unnecesarry.\n\n#### 4.3.5\n- #5708: Internal changes to update mocha configuration.\n\n#### 4.3.4\n- #5707: Internal cleanup to code coverage during build process.\n\n#### 4.3.3\n- #5552: Exported metadata contains only methods metadata and no longer contains URI metadata.\n\n####4.3.2\n- #5653: Added integration test case for Swagger with circular references.\n\n####4.3.1\n- #5622: Update documentation for \"Decode Response\" parameter.\n\n#### 4.3.0\n- #5630: Add support for `multipart/form-data` in `Content Type` parameter. `multipart/form-data` will be prioritised as a default value if the Swagger method has `formData` fields of type `file`.\n- #5630: Add an enum property choice of `application/wwww-form-urlencoded` and `multipart/form-data` to `Content Type` parameters when Swagger method has `formData` parameters which are not type `file` and do not define `consumes`.\n- #5630: Change the default value for `Content Type` parameters to `application/wwww-form-urlencoded`, falling back to `multipart/form-data` and then the first `consumes` value when either values exist inside the Swagger method's `consumes`.\n- #5640: Fix issue where charset is stripped from the default value for `Content Type` parameters in some cases.\n\n#### 4.2.0\n- #5432: It now adds additional information for `formData` parameters while converting the swagger parameters to json-schema properties\n\n#### 4.1.0\n- #5432: It now respects swagger `consumes` and `produces` properties while converting swagger definitions to flow node specs\n\n#### 4.0.0\n- #4919: Now exports spec and metadata\n- #4918: Breaking Change: Adds authorizations to the spec\n- #5358: Breaking Change: A `Default` output is created for all flow-nodes regardless of the swagger definition.\n- #5358: Breaking Change: An `Error` output is created for all flow-nodes to allow routing on connection errors.\n- #5358: The default JSONPath selector for all outputs is now `$.response`. Only the Error output defaults to `$.error`.\n\n\n#### 3.0.11\n- #5111: Fixed bug where swagger documents with extensions in the same location as path methods failed to load correctly.\n\n#### 3.0.10\n- #5112: Previously, schemas generated from a swagger document with no \"definitions\" section was returned as `undefined`. Now, an empty array will be returned instead.\n\n#### 3.0.3\n- #4757: Changed SCM repository and associated internal cleanup.\n- #4860: Previously, api-builder-plugin-fn-swagger would throw \"Error: Invalid reference token\" when attempting to handle URI encoded JSON schema references in Swagger files. Now, invalid reference errors are not thrown.\n\n## License\n\nThis code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: [https://support.axway.com/en/auth/general-conditions](https://support.axway.com/en/auth/general-conditions); EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.\n","readmeFilename":"README.md"}