{"_id":"axway-schema","_rev":"210-806814a92499d71dca82290a08cf7fad","name":"axway-schema","dist-tags":{"v4-next":"2.1.1-0","v4-preview1":"3.0.0-1","v4-preview2":"3.0.0-1","v4-preview3":"3.0.0-5","athens":"3.0.0","canberra":"3.0.1","dublin":"4.0.0","eden":"4.0.1","fuji":"4.0.1","geneva":"4.0.1","halifax":"4.0.1","istanbul":"4.0.1","jakarta":"4.0.1","kobe":"4.0.1","lisbon":"4.0.1","melbourne":"4.0.3","naples":"4.0.3","osaka":"4.0.3","v3-latest":"2.2.3","phoenix":"4.0.4","quebec":"4.0.4","raga":"4.0.4","sofia":"4.0.5","turin":"4.0.7","utopia":"4.0.7","valencia":"4.0.7","wellington":"4.0.7","xapuri":"4.0.8","yako":"4.1.0","zams":"4.1.0","akita":"4.1.0","barcelona":"4.1.1","cairo":"4.1.3","darwin":"4.1.3","ennis":"4.2.0","florence":"4.2.1","ghent":"4.2.1","huddersfield":"4.2.1","independence":"4.2.1","jackson":"4.2.1","kharkiv":"4.2.1","leeds":"4.2.1","marrakech":"4.2.1","nancy":"4.2.1","oslo":"4.2.1","prague":"4.2.2","qena":"4.2.2","rason":"4.2.2","shanghai":"4.2.2","tokyo":"4.2.2","ufa":"4.2.2","vancouver":"4.2.2","warsaw":"4.2.2","xenia":"4.2.2","yokohama":"4.2.2","zagreb":"4.2.3","agra":"4.2.3","bruges":"4.2.4","calgary":"4.2.4","dubai":"4.2.4","edirne":"4.2.4","faro":"4.2.4","giza":"4.2.5","hanoi":"4.2.6","ibiza":"4.2.6","jaunpur":"4.2.6","kalamitsi":"4.2.6","lyon":"4.2.6","madrid":"4.2.6","nashville":"4.2.6","ottawa":"4.2.6","perm":"4.2.6","quezon":"4.2.6","roberttown":"4.2.6","sydney":"4.2.6","timbuktu":"4.2.6","utrecht":"4.2.6","venice":"4.2.6","wrecsam":"4.2.6","xalapa":"4.2.6","york":"4.2.6","zigong":"4.2.6","amsterdam":"4.2.6","bangkok":"4.2.7","caracas":"4.2.7","djibouti":"4.2.7","exeter":"4.2.8","latest":"4.3.1","next":"4.3.1","flint":"4.3.1","gondar":"4.3.1","haarlem":"4.3.1","ikeja":"4.3.1","johannesburg":"4.3.1","kabul":"4.3.1","london":"4.3.1","madurai":"4.3.1","nantes":"4.3.1","oyo":"4.3.1","paris":"4.3.1","qom":"4.3.1","riga":"4.3.1","sunnyvale":"4.3.1","tauranga":"4.3.1","unna":"4.3.1","villasimius":"4.3.1","latest-4":"4.3.1","wicklow":"4.3.1","xiangxiang":"4.3.1","yangon":"4.3.1","zaanstad":"4.3.1"},"versions":{"2.0.2":{"name":"axway-schema","version":"2.0.2","keywords":["amplify"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENCE","_id":"axway-schema@2.0.2","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"dist":{"shasum":"796916ef750a00fd5b826549c33e067e0c6ca16b","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-2.0.2.tgz","integrity":"sha512-Yszci8rEFeyobuC43mUQ2AXRlTCWTBBr1xdNvZ5kFVaHO/k4rsUg5nsvgS0r3ZCCrY272efK/EENRzFyghosWw==","signatures":[{"sig":"MEYCIQCJKKpxy5yoRnq2r+cwpHUIZVoynsulffas7P3K9u8VWAIhAKOEtm2xZMBpSzpyNp0YP1+hNDwlch44dikn2PCjWUhk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":"axway-schema-2.0.2.tgz","files":["dist","README.md","LICENCE","index.js"],"_shasum":"796916ef750a00fd5b826549c33e067e0c6ca16b","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 --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:axway-schema-2.0.2.tgz","repository":{"url":"https://git.ecd.axway.int/amplify/axway-schema","type":"git"},"_npmVersion":"4.5.0","description":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"7.9.0","dependencies":{"ajv":"^5.0.1","uri-js":"^3.0.2","json-refs":"^3.0.1","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","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/axway-schema-2.0.2.tgz_1510761893198_0.41038667201064527","host":"s3://npm-registry-packages"}},"2.0.4":{"name":"axway-schema","version":"2.0.4","keywords":["amplify"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENCE","_id":"axway-schema@2.0.4","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"dist":{"shasum":"9434bf3fc96106561d736db34a3e07e3bc394e95","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-2.0.4.tgz","integrity":"sha512-0MzJNxYrOLqQ3fs4TVJ3G8ircPz0eM11+SKTooqua2JEWSWg+1Z9qzHg1vxNvY+RfMOC+TqQ9cwmxYdq001DEw==","signatures":[{"sig":"MEYCIQDOCzG5ecmKSLH/2hvI023eHChDfLknxDoMRlqp3mSorwIhAPgNR8GQnPXir3io4YqU+juuQYNCLNUbWm9WDcbauPuQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":"axway-schema-2.0.4.tgz","files":["dist","README.md","LICENCE","index.js"],"_shasum":"9434bf3fc96106561d736db34a3e07e3bc394e95","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 --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:axway-schema-2.0.4.tgz","repository":{"url":"https://git.ecd.axway.int/amplify/axway-schema","type":"git"},"_npmVersion":"4.5.0","description":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"7.9.0","dependencies":{"ajv":"^5.0.1","uri-js":"^3.0.2","json-refs":"^3.0.1","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","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/axway-schema-2.0.4.tgz_1511287795574_0.5936760203912854","host":"s3://npm-registry-packages"}},"2.0.5-101":{"name":"axway-schema","version":"2.0.5-101","keywords":["amplify","api-builder"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@2.0.5-101","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"6d93be4e19ef1f53dc8326ceefbc4e4f7ad718db","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-2.0.5-101.tgz","integrity":"sha512-/P6gk/TKBNPcOhzZf0zkT/pEeAq5KhPaPUWp6BWLtQg6n9q2WS2oTy3gUzvlpHdPFSJ1m//XRtc7NrH+aZoVWQ==","signatures":[{"sig":"MEUCICYqMoG6Wr25FoEzxFusXyszAqsr7iWT7XxuPg7kNO6KAiEA/IhcJZ2VGBl3JIuJNjHXBwRu8RPNcQlJFVRHnhAPxdc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","files":["src","README.md","LICENSE","index.js"],"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 && npm run check:dependencies","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.9.4","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_npmOperationalInternal":{"tmp":"tmp/axway-schema-2.0.5-101.tgz_1517849248684_0.01965897507034242","host":"s3://npm-registry-packages"}},"2.0.5-102":{"name":"axway-schema","version":"2.0.5-102","keywords":["amplify","api-builder"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@2.0.5-102","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"29848672cf55f40eed585c7b78941d7b27b4f93f","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-2.0.5-102.tgz","fileCount":5,"integrity":"sha512-Haofr25F0TZZ8Y+2PgDQHLi6e7VtLL9XB68PIANtzMCX1WE7SaK+4H4/czDuh6Mk0tZ1UOJUw8hXP/6ngPRWFQ==","signatures":[{"sig":"MEYCIQDtJOPVhXFMC3jkF2aUPq1LON61jV/d/PTBdIrHbseBfQIhAMSwb0e+W+3ScIIWuCYvEusk4tCkmo5Tw8j29kYnQFer","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28881},"main":"src/index.js","files":["src","README.md","LICENSE","index.js"],"readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myproject/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myproject/bar');\n schemas.validate('schema:///foo/myproject/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://project/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'project');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier. |\n| obj | <code>object</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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 && npm run check:dependencies","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.9.4","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_2.0.5-102_1518531186532_0.7591199965860351","host":"s3://npm-registry-packages"}},"2.0.5-103":{"name":"axway-schema","version":"2.0.5-103","keywords":["amplify","api-builder"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@2.0.5-103","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"7958c71f745bcc32570a33196bbbf5252ad4e465","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-2.0.5-103.tgz","fileCount":5,"integrity":"sha512-TRnbdg5kYajk3kcvyFVReQE1eS03xm+YEsikpKVzHfo7glI1pNpLANbZFPMDrSR/+TeoDX74sZGY91Pqz9DveA==","signatures":[{"sig":"MEUCIQDTyho9z5urEEA8+yczp2Ey6D7+F7tBN/B4lBeBeSw2QQIgcKJm8k88h64NejOhn+Kd6d+HbPkZSZ/13/frrPJ1YdE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28928},"main":"src/index.js","files":["src","README.md","LICENSE","index.js"],"readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myproject/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myproject/bar');\n schemas.validate('schema:///foo/myproject/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://project/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'project');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier. |\n| obj | <code>object</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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 && npm run check:dependencies","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.9.4","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_2.0.5-103_1519274305401_0.7339092981606874","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"axway-schema","version":"2.1.0","keywords":["amplify","api-builder"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@2.1.0","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"58a1f8ccf1f385f4b49d2dbe3fddd12df457f798","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-2.1.0.tgz","fileCount":5,"integrity":"sha512-nQ7GNePJoSAoIXNemXAoknMibR8pxOGvpCOi7XA4K6k9VN+K0Hgn8/cMBKNMQ23vRYg3AE72vAeeew0AjEkdJg==","signatures":[{"sig":"MEYCIQCxRTLRkuiwNuSzc5zmERQb/uB4GeWcq+kTXSmGPzvHbAIhAPek3+DSindR9dlJvyjFEE5J7/oBbR+DBtez9nSAeSVK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28924},"main":"src/index.js","files":["src","README.md","LICENSE","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 ./test --recursive -R spec","build":"npm run clean && npm run build:dev && npm run check:dependencies","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.9.4","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_2.1.0_1519323962579_0.4019510369244428","host":"s3://npm-registry-packages"}},"2.1.1-0":{"name":"axway-schema","version":"2.1.1-0","keywords":["amplify","api-builder"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@2.1.1-0","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"7f1679ce962cc9b5ed38859b78417c81eb514ee6","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-2.1.1-0.tgz","fileCount":5,"integrity":"sha512-tjAGqyPjg9UdDlbe/H5y9L6Ly8WbbwwSkoiGKE3wNpMyQHgf/2gGKcdlepIv7kAiX+kdOmPKDT0e/1OOIw/vaQ==","signatures":[{"sig":"MEYCIQCoHooav/yMJuZvi8kdhq9GIqKffSQqBUdrXWP8LCwUQAIhAMRGsPx0N9sOmV7y/um7KMq1Qtf0W2yq6mCA+6VA1fyA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28936},"main":"src/index.js","files":["src","README.md","LICENSE","index.js"],"readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myproject/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myproject/bar');\n schemas.validate('schema:///foo/myproject/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://project/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'project');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier. |\n| obj | <code>object</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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 && npm run check:dependencies","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.9.4","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_2.1.1-0_1521553997524_0.8373244994166218","host":"s3://npm-registry-packages"}},"2.1.1-1":{"name":"axway-schema","version":"2.1.1-1","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@2.1.1-1","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"d341c38333b54d6007bcd015413fb2b166c84851","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-2.1.1-1.tgz","fileCount":5,"integrity":"sha512-8YLvJ9/eNK08/Sq2kYsQmjCtHVB6ARRc0M+7xSjtYNP5qidp5fXvim7dU/Ae42q8up2Gr0Zx5AELoq1RWNgfpA==","signatures":[{"sig":"MEYCIQC5Zof45eafe4fyHrjadlNkcfFdOAQDZF+sSGmjfPSsHAIhAI6sPly5XjBqMUU/RP56RO7RgAkfYRAhClyXOv5FqE0k","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28947},"main":"src/index.js","files":["src","README.md","LICENSE","index.js"],"readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myproject/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myproject/bar');\n schemas.validate('schema:///foo/myproject/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://project/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'project');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier. |\n| obj | <code>object</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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 && npm run check:dependencies","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.9.4","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_2.1.1-1_1523458219126_0.34523797110793697","host":"s3://npm-registry-packages"}},"3.0.0-1":{"name":"axway-schema","version":"3.0.0-1","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@3.0.0-1","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"6b6eb8096625f175e62beb32612b3fc3b8f5922d","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-3.0.0-1.tgz","fileCount":5,"integrity":"sha512-nwlXNqMX5y/toHbocN/iyltssvXitN6FUaDRjIOVLPoB/ZUe680XapaJhuyXMpJFB74U7ul9iyioUa/6SI2pXQ==","signatures":[{"sig":"MEQCIFoT7PmSYwhrSWfK1otRqd8fzyv+72mfSTFp2gzJKTwlAiAxELbuoN+xhQ+xyZ8/gqgUU1uxalssuuzcpT0qP7D4ag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28947},"main":"src/index.js","files":["src","README.md","LICENSE","index.js"],"readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myproject/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myproject/bar');\n schemas.validate('schema:///foo/myproject/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://project/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'project');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier. |\n| obj | <code>object</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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 && npm run check:dependencies","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.9.4","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_3.0.0-1_1523531971221_0.5546402607656307","host":"s3://npm-registry-packages"}},"3.0.0-2":{"name":"axway-schema","version":"3.0.0-2","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@3.0.0-2","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"73656bb95bf74dd18b2fdb5f2002d2b819a74304","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-3.0.0-2.tgz","fileCount":5,"integrity":"sha512-ERUNh2bZOrWWxRn1YQ8JXI3AoVyvz4aZkavLCGOhuiesj6iZbMTkiNxx9qR+kiKieV8qorzLnGMrWcW+53a3EA==","signatures":[{"sig":"MEQCIGeiuVudJg6hhqgkj+KLbVXl9c9XJ77jyJbajgcLhTJWAiA2MMvqmjkdvExUZRiXu6kqiLRBeLCgZW/xc++8d6ZN4g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa9AkjCRA9TVsSAnZWagAA8d4P/AwAfRjLNdoAJQly7nru\n9jrpNddYr+QEIKWJWhGO3LKvTQHWqyAuYDRQ0aE2/+fiEh/3KSEh4dCdw7C/\nyuQAGyTKC5JYMCjKOMavgqD0cz2YejmVL1Fwm7Y5NZFOBCSeIGz64JE42knn\no+LeuNCFXyMnLYpxh/+1S4uzHgr7SpcQ65MHMaIQ9FymYphdvO+I8ggxbFjc\n5my7lY524DWpKY335k5PEzlUAB8Kcvj5jUEkU6QisJ8/O1wmJvz96yxQAuzw\nxE+g+IzFe1ETUcTtre3ukqgnFrpZpSLL7E4nkSDGjTQD/r7mWLAR+W5BZ+tj\nG8B5JeRnq3eO/2OlHy3NaS1Hxa75zj0aAKT6LdXTr6XJP12TNPbG2K/h1WLO\n5QJUAevxpQx+JyhgWVV+mrqpa3qaDhdrF89OI9bpZXSp0MBaIHg8JOK2dL/t\n3FEEOBCMhrfgkwhR7GpDBVPbum85eP/YHDuPs5OOa7hfQx+VOF4/TGq2js/c\nhNHcioow2gsH30Ix4YB4nT5wLjo90nimGOyR+ggBbmc9EdEgHvulgAgdmwFC\nDU18V1YjYY8e3gmbBXYV+bsCfAj/a+jiU/OzZArWQHiTx6a8LkHgyZe8Qfz2\n85nTiq8icXoF6Ckae2UIHsNBz11pd694RJGZeq1I6ByW/bGXgxqPEVGTHhss\n9oBn\r\n=8M3d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE","index.js"],"readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myproject/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myproject/bar');\n schemas.validate('schema:///foo/myproject/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://project/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'project');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema previously added with\n[add](#module_axway-schema..AxwaySchema+add) or\n[register](#module_axway-schema..AxwaySchema+register)\nand identified by `id`, or if `id` is a JSON schema object, `obj` is validated\nagainst that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> \\| <code>object</code> | The schema identifier or object. |\n| obj | <code>\\*</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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 && npm run check:dependencies","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.9.4","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_3.0.0-2_1525942562603_0.4916857448457914","host":"s3://npm-registry-packages"}},"3.0.0-3":{"name":"axway-schema","version":"3.0.0-3","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@3.0.0-3","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"778eb4606097541f44cfba398f23319440a80098","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-3.0.0-3.tgz","fileCount":5,"integrity":"sha512-TrQHUufNetrYcKWS2+Lhzu4LIdxwqiVYCYdJwkMB5+GXBvSA3KDziZ/JcIfjXOGXZ93fCKwTx1b5iZ68EKOt5g==","signatures":[{"sig":"MEYCIQCm5jFjLcWk+0KmSvBFVRxbmnUwDHXRd7ynb3W5COAQ1AIhAPNi9tTa3hnhvz1kuPNGwrbGp0PK5NFyI4J0DRffN+M8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBv4VCRA9TVsSAnZWagAA3woP/it447J0AiYlBjJ/guxF\n7+oFnPmElhBmrkgsHsjKByasZefJB5fGTN+xWTiR3tbD/MGS3+N/0AdFzuiK\nrosaxAgm3rZ2nq0NJhK5D7IpbVbTx9euiotBCixRNOSyGunNoMT/caih5dWb\nDgjh+PTurUkFW9F6nccQ3hKHBCW6bWHA+UJglG/65O8GU8bYmD82TW5+f37t\njrdQccsMKvld/bQHAv5Az7atLBSpW8UaLsX4FHvXxoOJ3dgXG/QIJkTVEi3r\nqG9SV8DuDITVQMeONrMe+pBMccOngtskWB6iZJ2ZtyXmrxeXIFGA1j/mJ7oD\nejeK+fkuW4XxJM+0FtXr3hmo6bmMpZlaTPr6OQXKHjEpyh1pRDT6rrKRGR0Z\n8hWHe1U20lhm1U+6rU6J7yXXf4Abig3r7VYWre7vFg96S1KjFAaV6FgRSV7s\n0OygKTDyaAWNuwAW3UlFxeXDEFKdzi+VD5uu/9a05MHLm0yWprVYsRPThFsP\nhF/DXV9+ojnfeNWcsBPmPBEUaISjvsvnd86878CNr54hHEZyXFTfWp4Vo2Ru\nopESj/8CjMSZGP6wj+e4cbx35NeUSWKcSoDoJZm+blI3XobggSqspZ3hCXWY\n5cxLJnsvSUUQwJTuOSZ7P90XGVc22Amo7dc9jRAsmuPzgfP4qdJcYJkuR7r1\na7ta\r\n=4pBq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE","index.js"],"readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myproject/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myproject/bar');\n schemas.validate('schema:///foo/myproject/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://project/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'project');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema previously added with\n[add](#module_axway-schema..AxwaySchema+add) or\n[register](#module_axway-schema..AxwaySchema+register)\nand identified by `id`, or if `id` is a JSON schema object, `obj` is validated\nagainst that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> \\| <code>object</code> | The schema identifier or object. |\n| obj | <code>\\*</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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 && npm run check:dependencies","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.9.4","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_3.0.0-3_1527184917568_0.9605315320252914","host":"s3://npm-registry-packages"}},"3.0.0-4":{"name":"axway-schema","version":"3.0.0-4","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@3.0.0-4","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"14dbf6f42b8e1ba8ac01ae38fa02236d76bf8dd7","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-3.0.0-4.tgz","fileCount":5,"integrity":"sha512-hRAFtjc/PLxXPyR46tsPbYfLVQXLhINrh5grs/jBMfsKOBhvNdsTbu+zuLOhiUHb10CdembKsSWvjE14CTx57A==","signatures":[{"sig":"MEUCIF+jdyUIUY5uc2aFWAG7iN3ET2pnyeA8ah/n3Xohuc7wAiEApMqhmKrze0ZHjfUwfn1xr6P6YiAyn8fz0SPj4hGHwKU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCDTbCRA9TVsSAnZWagAA2gIP/0Jq3wxqMMKhLnMYUjRc\nK7lWc2rnsoqdpUTdgNTB6XMaM24C2g4qWn7FsTAnx7zYeVU6qgrjkTEl0SsB\nQAd8/8cbmcZBSVLZUUAubamZ/iD5jcoKD80RCQHhAhsn+ceS+xJ52OkNyxIc\n+GSs7sP4A+LJkoNdzmaWrpGdcHwS+Ri9VXA0QKA1qFc56r1CrU932BL1tyhi\nm2YB5nJ/hLIwi4+VxBqPwX7jU2bPm0JMjdYjmb7uryltO3jWDNBFBl3bV45d\njRauGY4l6ADOT4VbwlLJI/El29xx2N1/C297WFwpYSR8xY3dZgTlofnMyay3\n6AWVBh8oEeAX7mM4O8ejr0S651hcxFOR5zHLlCvMJipO+odYnm2pDuuVvkav\ncmNXYZZW+enNgy2HyqQVo/o7qsRWFqKVuY1nZapS+xEHIcTJDvT1uTQ0MZ2r\ndxs6FerhJmL+dT3hqaGE/W6yzXskz/ptgvawwWaCANz4Yv9br7HvdcBq3k1B\nUyVcp5G0UNvMX1XMcCPhE8gA08NeCBB9YDC/AcjL5g5Ax7gzEj1xsb1g3MdG\nkjEoIeW79QdeTGmPT+BHardGAfyAtxxYOXFynrYJDxUwfJs0UbbLy5+Vu6xf\nEZGdXMIu+iDpO5+yUd7wPxS1i04C8XD2YurKn7PwbDP+3ILNjyEqUXKFOcwT\nr/nr\r\n=GwGI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE","index.js"],"readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myproject/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myproject/bar');\n schemas.validate('schema:///foo/myproject/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://project/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'project');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema previously added with\n[add](#module_axway-schema..AxwaySchema+add) or\n[register](#module_axway-schema..AxwaySchema+register)\nand identified by `id`, or if `id` is a JSON schema object, `obj` is validated\nagainst that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> \\| <code>object</code> | The schema identifier or object. |\n| obj | <code>\\*</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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 && npm run check:dependencies","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.9.4","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_3.0.0-4_1527264474618_0.009622240600356768","host":"s3://npm-registry-packages"}},"3.0.0-5":{"name":"axway-schema","version":"3.0.0-5","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@3.0.0-5","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"d2a4ad1d179f2331a8ee09abeffa1e12ccf83212","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-3.0.0-5.tgz","fileCount":5,"integrity":"sha512-rHIrJDzKdgWEwHKAoBoGHwfZPa1xMvcs0PhIfKivmY1Yxi1Qa1stO5TQuxhLJ8cxcW2JOtl03sywYMOzRC9Rcg==","signatures":[{"sig":"MEYCIQCKKZI6mkwhRkwZs+ezYv/pOhGz4hi83q+OW47xgUTNHAIhANxmRnn0f5B2fBwpwjebNeEGoM0ERpQS9JQxtiNCyCvD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbI5w2CRA9TVsSAnZWagAAxTsP/RMdHi1kjng1u08HaSNI\n9+bnWkVW4fY/WDxBIhaVd2BQBbnGXAxB0nF1+61KLrttX/sxEYXHahSR27CR\nyMNZ80l/LurCE8q7lXkmIgF5cAsmN/Gc1chAOjIRjG/9RcHdE+NbpVSRrjJC\nKEBf67cXPlly7QzwUSumrsmmi3dUD8Vk1zc8aHEwZ1ymtTsWCko2tJoejync\nXu8Gy+53YJrtdeWa3oviey3bWi6wq47SDNzB3/LAlp/c/x8vfmM6ZtySAtoz\nRlF2jnuk5RMzPOQpbldln2mqWcUfGrkrOKA12kLrsWcWnY+qaqXszU23bltx\nceBN2PjnJeX5m5YQCTM5ffaOn/HFvVXZIAQrnCZDvYDt33FR2S31vuLaBwNB\nTeeJ5sxW5CEtqrwkUX1G6W1IyUoaEWZiB9MvBhLGfyAfEmnHwPMzILIEu0a1\n3naSV4HS3c4gVnb85SVOaWzDrYFyAdLTchv4v67WjPxzB8S22iiFKYcPK0Xu\nAczpc0Dea+uKb9dcscLSOQvGUFJRopMHTis/tFRUbHpY8wJ+OuQpYkWraNoO\nJoGJ4RnOOkAsw9K4/Ip/yLX+h6ziQ/KBGr5E7yWCu0riEkcpxqDLm5pnpThA\niEeW/BLRuN0A/6Ro4uGXIBG9AmgI9t0GgTOz5EK37WCIX+xpRN9GMgRrIdgB\nxjzk\r\n=9Oxh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE","index.js"],"readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myservice/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myservice/bar');\n schemas.validate('schema:///foo/myservice/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://service/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'service');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema previously added with\n[add](#module_axway-schema..AxwaySchema+add) or\n[register](#module_axway-schema..AxwaySchema+register)\nand identified by `id`, or if `id` is a JSON schema object, `obj` is validated\nagainst that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> \\| <code>object</code> | The schema identifier or object. |\n| obj | <code>\\*</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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 && npm run check:dependencies","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":"builder11@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.9.4","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_3.0.0-5_1529060406158_0.5975984159530414","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"axway-schema","version":"2.1.1","keywords":["amplify"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENCE","_id":"axway-schema@2.1.1","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"dist":{"shasum":"35647455c17ed2e4605ecfb4657dc85d7f6f3ff9","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-2.1.1.tgz","fileCount":5,"integrity":"sha512-RUjuqmHQnnSuAK3TlLzRMPFcDPso8CC6SQSdObJzaNRS2PctayjZh0OQvsD56dgotBfTlYMWa5XpwgBBArVt7g==","signatures":[{"sig":"MEUCIDBu7hpYevzF3yKgKFRG03qc8jKz684JlzArkHjyo7TlAiEA8YN3OvJWtxZR8A7e4l1KKJgLVHCKtcUNCl1/aoFRwks=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33186,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbJ8VACRA9TVsSAnZWagAAUg8P/1C4rPkpLOgjiAyaDWfy\n3baiphJlwhh84hmqsoZbaw9phlpQT1SLSN7XKlbdkJIV2YgyDtjU2cMiw/dX\nrqAMWAWnEamhAKlgdLcV5OkpUur8reuBpKI6OpA8FiXDtmW2MJO/m9MLrLyF\nMBgAplLewc4KnL8Q582CQo1RPU9jodsNCXn54W5pJygOFtq2qHRWJCijbyVG\nYLJHR+KQMK9KxCJAlcUyfbwPPT2y5TA/v8C5S4UGowMNtOUZkKo7LxWl0q6/\n3gcjkHCtPk0d+1tDcB1X4yW5iKpNLz140adfew27ArnfSNPdtKKO+PeEqDuK\nQOt9ZjTam7j7gN264YK50S24QGuGk+W9nWDH9DhWg/CCIXVQEnI3UFaRLZ55\ngW9Db3YCw3FH2n+d1AP5yw9KdGi7Oi2janwOXlqu0Rv32UWFRi6+LoT2K96+\nNRQJC2ygiHS+TmvTt+mz6WNUjKITAW1ds3ivzgMBlyLzhpU3f9sCTRC/u/cc\nH5BAKkKiNLe4QjdyQZSoImxRQg70nJZtLuhLKffqh/gYpKH/Z/UaOfhWHXV0\n1eRDb6WEVHBKzSYU5Xrnd+0KA3VgEYSHuI7BF1XsIxL6JpxRMKeKpgkeNSeZ\nVexGR2qkoXoM70x+DljgE8A9aYq9/CABMGJrQDQrqTbOoxsYRVyXrUenugmt\nB1yb\r\n=u1to\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 --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/axway-schema","type":"git"},"_npmVersion":"6.0.0","description":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"10.0.0","dependencies":{"ajv":"^5.0.1","uri-js":"^3.0.2","json-refs":"^3.0.1","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","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/axway-schema_2.1.1_1529333038336_0.6796381163174243","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"axway-schema","version":"3.0.0","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@3.0.0","maintainers":[{"name":"axway","email":"gmatthews@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"135cf3cbacbdf7cc7beaa9a7432d708f764e442f","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-3.0.0.tgz","fileCount":5,"integrity":"sha512-2RbNPfp+uLRljPnk+sSaQuF1nXdoJ9o4rA/cKOp81L0T97SMT2Kiu53kFOUZFyphI+Kh9/eoOPGfradbFA1V9g==","signatures":[{"sig":"MEUCIH7ZAZW9OMxZcnjG7eujq07DrABXdvDBIT9pHNmW8UUmAiEAloC8zwAiIzN0CRrSxSEa85k2Yf/zXDXV+nrM9YcHfL0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66730,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbM2K3CRA9TVsSAnZWagAAnSgQAJWy8H4Rw0MEqeR480an\n90JBVJTh31KdggHnAbdNfQqFWF+FjMBM/6Za7080aWC3MF4qdkuoJG1dPu5H\nK7FFDMzbdf3t/BeebkaNzz2HnDAVc7Yd0wwvRsZqS1GSqLvKN4/1OWOOQZIQ\n/mBl3w/Kf/hxZlZeWLNknypRpo5dxcbApRBbKRzF117uSlKTCMtcRn0PX/o8\nQmWlKgVTh5H9Jp3HFXjudYorDb/ninALnQOq07IpJ06dLTSm0LclNUOVXNmX\nOIm9JtlSySxDaJXiDotUQwYT6FLif+B1O67UMDWIDCmVAcLZGfNmaJbz/1Zw\nfc5q+CcR2T3/wGjDSM1TYJ2WD3UP6ktaJYRd40XvW/mCUAaz2jbXfkJnxUxV\n21uCcFRuVPajHXFzkNGwpvAzxtMj5/UsR0ocmGBU6kjODOa2vCOhMoHu71xg\nfmdF70RUc9L63+IbLHlvSclHjvnQORw5Cqsw7ILxOaUO0fJ8T5hNufXXWtNH\n2PJI/6ofRpSF8KGOBURE63Dz9TcMecv1ZmT84vliBBUZTM4Y9lHJilNjmp1z\ndRrPPE8A5E5wLN7yzV4Nnl+Ksjz6KdGkc/DDP04dbn5rZ8AlnYi/3UFolbI8\nKYEd3DfGvPwFZhd77cDysY0IbgiBpo9LtMeXQRxuR4gyjH2tyX6jjjI/zfal\nDszw\r\n=SOUq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","files":["src","README.md","LICENSE","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 && npm run check:dependencies","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":"builder11@axway.com"},"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"5.6.0","description":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.9.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_3.0.0_1530094263514_0.08084065746829383","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"axway-schema","version":"3.0.1","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@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":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"b03f776603735b364c4fe2e824fbaa0d7f332cf5","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-3.0.1.tgz","fileCount":5,"integrity":"sha512-q5WWTwJjP/MSXUVSzMi5u8t3R7LpEZ5QPnHdNu9q87Xffi2X+U+M2hy2U4sOEsMvzdn/rdY+IBMBFtmnwJWkPw==","signatures":[{"sig":"MEYCIQD84hnbbC94VFhaQL5rFSbnd8H0cMK0uTxfpgmlbBHpVAIhAMszpXjZI9Ug3+InO+tHJAL5OAy/f4x9f7iAwDOnBuZZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66730,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbazdCCRA9TVsSAnZWagAAIqMP/ju4YBC32hst5xnjWI9A\nXmnyp+HdQ2BMKRxmzdCimXAeRVsL5syVPbmqINdfFnpBS7HuhQZxfvNC2Gj1\nHSMqpW7U0RCRa8JVDU3idDGh9gf5EiA+WwkhPblWFul3bumJKyWMYjCHHQsN\nIQgk/ejNzo6IWJdFDL9UVUXBdFK/sCnp+/pptjBPf8PczXzaAMYM5mqqz1pk\noKfE1Fuqy7UKlNpPBu3BJLYqlwrNxNVze5jRnp4aqdsjvEgIN7Sb9KdLvBQp\ngcpKzFGkp3vDlDNisdbzvKlIeiiqr5HNPDOSMKLkoi83eO7o3d6Rb10NJ0eU\n5XQrgXrlwgjjW9J6Z0MJcor0bhG8nJ6YYApQWCOPmpqQ4MNJhNkXi0e64SdH\n47MFZTj2IQ/0E6BfHCicu/PlppmpaWhkzesIs05VIjyOTYP1YxCWpYgyspow\n/6fNfP9bth4Ok+Dlzwpd1yGoLayNyGFwpww/DoovrfdTWk9HlNT7gyI5EYqt\ncpebW3s5z0zzmZkuhRhq2hiA5+ZNhkg4JH2bclqr1lzlepFp3Rx404PB5J1o\nD0qxyJm3JDr8d+M4gJyLPJq8J03VjaOZYfEYKSeIndJtcdS8ymfBhBqcO3Hf\nS3DMcA0HbEsxqjAPCo9Xfq69atjTV5O+Z4xgoCU7oQt84+gFnult6U56Fa6k\nsh2k\r\n=0DhT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@3.0.1.tgz","files":["src","README.md","LICENSE","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 && npm run check:dependencies","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":"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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_3.0.1_1533753154225_0.9873563380287991","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"axway-schema","version":"4.0.0","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@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":"346dba09c326e9abcd7579d30ae2792ffda55bf9","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.0.0.tgz","fileCount":5,"integrity":"sha512-OvzgvRyCb4R/MqvdFW0udD1Xyjy7VIt+Vn5zsrGkHPhv1dUA9Sdqq4lrsRNmcEPf0J+XsTFQg+9lw+vBklcGMg==","signatures":[{"sig":"MEQCIFQdSs61u81cNzBPT7d5AfcAiGHPkaEBlelOuEB3KDwtAiAf9Hj7Gn+eszJHDb7FP8KHQsByHdMvIHE6aHLU8oVYZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66730,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfZbrCRA9TVsSAnZWagAAlBMP/1up2eOPwVQHyNraWqCR\neQFy9m6V813f3tzvlv2Vb4SiFQv/Zib1Y0Wu4hDqi5KxDXy4oRGQh+e40TME\nONOfrxsaveJcphitEqUrEMQKj8cu45/5GRGhUK4du1WniWOOye67YdmjoaqM\nWpwDMUDyQ4E8oKvRqU01leI0q92RGLN1YrQSNojGAMMYzYZd0coNadjHnViB\n2FxgIpZbh4VqaGe+G1KMI5mfUk1XcpcbM6yIywSidQDv5XY43/kAVY+r3dZ4\nJrJOAwhjLaQNmxK2Td2xHdGDmdAsCq0cOD+Xy331HuvVt2cIvM/QdIqI+KPY\neUjTrFkiGt/Zu7r0MX5laIGKztiJDAc83kpWbizVBOmScdK/mHdBdksF3xWN\npBzdlzSJ57OFE6LABicAIONyZ20OLx0WPjnJvIzEoV/jGvHdwNzqBrPgE4t5\ndKltV92cMmz9CznuwFdH1CBq3B5pV+MP7FDvzgHFHOWgVlBcYnzAEE1w3sni\ngUkgRKkv+1kSLuZ1cciN8anYcwmts1i+I8mVcTUZNMGCmN7VjHo0qIyD5Kkh\nUd/LFFAkzMhGzj2ufCJLJk9+6Wdw5HCow769Hx0/X2+Fpnkmo+JAU/pW/5Fz\nV7N7uI18jEsII+b7iWJzJgMQvAT+zY1+R4nzy6kWKXTq7/hL7/4/WTPOv3K0\ngunT\r\n=TzUR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.0.0.tgz","files":["src","README.md","LICENSE","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 && npm run check:dependencies","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":"jamie.peabody","email":"jamie.peabody@gmail.com"},"_resolved":"","_integrity":"","repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"_npmVersion":"6.2.0","description":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.10.0","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.0.0_1534957290690_0.3301457048484253","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"axway-schema","version":"4.0.1","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@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":"c42f57e2171ade89a9269e345071723bf5d64705","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.0.1.tgz","fileCount":5,"integrity":"sha512-zD5vnxvQs8wXj2KWE/+yr0EMMelX8UtK/ChsFSIh76GJ/fMliDprQhIJ2Z5jM2DzhHX1qppm66g8Q/eVtSQotQ==","signatures":[{"sig":"MEUCIEbdfhWa+0dctcyP/p3WWxDgCJDXVA0XOc7IsyTAofxUAiEA16Bp4FFomnWeT/DfJvfCzuyWwD8tW8pOTJy+iNqaAuc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkS1ECRA9TVsSAnZWagAAji0P/3x3Q4cj7sudRBJ9F0zN\nD6kQQ0/xquB6cOmsZD78834h78RybnxVG6xHgKwuvetIiMDrTJ6fL8YCTrEa\n6thJ3vjGhZPQT5mnIEezIMpnr9mKgU9sxSDtI9kR+0GZo1H8kjPOChknnNDs\nT7zinBSHPw7a0NxQFpX2k05FUXX2AAA7cqmgCecpf4nM16ssnV8rHpC28Y2a\nISxAAB6MBJ/xi2yM5irdjO+Pyeg09u3zUsht8yUwBIPOs6IC47bO/cJe1yQ6\nvq3M5+Sm2cppTzoDBtVWm3F64YTiwWEbo5GQEmLyg96v3Pi/D3Unhkro7tlc\nR7EyLcib3980PnwfeQano+hV01p6/W6wOE6hcUHWpPydq+NwUqgqHOhPX9Pq\n9SW8K1DcPK7H/FupF/V9XxvipydAdp8nzz5yxaUmGFuykVOCrwRS/gOJJdEY\nvGyaHaIJZAVZLuExJDuA/IkVIFBWKWP4y2YiSdJnyGvAp7GBhQ3hBSW4IP3f\nFWqPpehY7k3LZ2i8owNdRHxogfY/rKQ6+9xORRckGk6Ntv0rM1p5acHXpptN\neP/faTm/T7bMIaYCNy63PVE4sjB5oqelfAb5x42H6FQ5xhKU9cZm5HKrQp//\nA7STqMmB59+i++UswBKJ9B6WyH2cWqX4XvtjcppY8CEkFo5d++MBCUTIBcqu\n5Eqj\r\n=RYNx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@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 && npm run check:dependencies","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":"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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.0.1_1536240964013_0.8876805841269895","host":"s3://npm-registry-packages"}},"2.2.2":{"name":"axway-schema","version":"2.2.2","keywords":["amplify","api-builder"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@2.2.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":"nkeranova","email":"nkeranova@axway.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","dist":{"shasum":"86d4e89b510b2f0ac3788c07f3a538adae661cbc","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-2.2.2.tgz","fileCount":4,"integrity":"sha512-csjoTmKhSSI4XZ5ia+s8Av2FXHaYl75+iQO3NAAoQWZ8CzU5baPTh+x6IOGnLjl82ZM85KZzca5RK8C86boxlQ==","signatures":[{"sig":"MEUCIQDQl3jezu6ufUJojQImaM+imDn5XoB8WQIwU9LneEawbwIgQQjv4G8m6MGGpceqZHMY3SkHAauT272Wb7sRcyQNcVc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0epECRA9TVsSAnZWagAAiD8QAKRjiSPqLNqY77RVEQ2+\nnqPOh450N/S5BgiFFMwl3yp5NgMyrezLG3oCnE+6+JazwUuW+fhPfCPuTImU\nvzph01SqXCe/fhTRqJcRdbLu6LP1zkB9fDYGcxAFs1/SYYeuq43cniAMJyh/\n0REq9Edv1wLVUYPa8NLEMODmVy0duT5hBGHtP9jKw5d0/iQEJAq9i1x4FyHh\n/Cv17puYodSbpKdUuH3sJy9PD4981PynRjZ8GS7HI8FsUm55D0ANTHQLHT40\n5Syw5H6GusFBoxMI0QElnuh2/3FmI5yf+4U4JpqICCZ1nu+FrHV4EchFVL7e\n08eKlCLGQ06EYVlCCH7BrMXN76M4cZQMcErhLoxG5fASRUZ36+D8CkkKMyPh\n5SC+QnGJ2Wx8jqfZvUju4WKhQgUxEn74ejHiBTJuz7EgT4VlUml+KIQZt2iU\nv/ewV+6AUT/ZBv5m3YpzUQl5BrvVJGMTHveVPrSsWfvk6f25s2DEmbFMuczk\nGJ5KsK9191MjHlG/0E5DDK3wHoGeEB1H6IHCJK8GS4fvKaWmaiHsvrqKR/yd\no03bzj7Bw1aJQxBLqfgIzAer/MfoNJ6KiW4wxKF/Q4ZhDVUUYlKunDthMjj0\ngEJM77w5B0J4Ve7EK/y5gpHjJPMdyf8PoHAbpegPewz5w3Ftd6eKEX6G7G5u\nGqyR\r\n=i5+s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:published/axway-schema@2.2.2.tgz","readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myproject/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myproject/bar');\n schemas.validate('schema:///foo/myproject/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://project/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'project');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier. |\n| obj | <code>object</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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 && npm run check:dependencies","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.1","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_2.2.2_1540483651825_0.2660464825905624","host":"s3://npm-registry-packages"}},"4.0.2":{"name":"axway-schema","version":"4.0.2","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@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":"862dc6a17791e1b11bfd51a56a01f93c21ba4300","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.0.2.tgz","fileCount":5,"integrity":"sha512-HgpeUpIE8AP9LHYDy4fxuSQlfNBuQ3BUzFaVOxEaUUxutWK6NwDROOCIyKpC0XKy+KmBT6bguXU9DyceJN9pPQ==","signatures":[{"sig":"MEYCIQCo+w/xzzKlzX2gQLDFbImp2T6r7g2PulikILbtWxQYGAIhAJi/cmQZlnbh+qfYZgrBJaOsURr8/DPpLJfrocUyXqG1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSeZNCRA9TVsSAnZWagAAS4oQAJUUQ2/sIv4ID/49U4s0\nHvQaq/3NSMdEsKYc0TrJrBSmcSkB18vRvptW/8Qe4zGo1Pl5k+QYzB3TZbj9\noYAZZHt3D3VUPN5TJonO4e8DHGEh5LurJyxPsgxm/nIUkKAPgAgDtYEhhkuV\nr86Bc6ArFFzXEZxeTmuAP1jghO14+ntf0TJXvQT3BUQHrD9PVKK2zXzdAvEc\ncGoEJVSaHJpOmQgN0IDC9RFjpzBBcPu9MlTrrqgSNK65qXsXShZoCZ24N9Jo\nuWDNxao7oW7Z50Z969B3zhVRqTGy6+xLucgK4gFTwCsgHn/h9YCHgC8G2VrJ\nElkeZat1TXjDUgBKeJDTYMN8jWfK8MJAR7ceWXHp7Yac+ABmPDWfWtXlvIO7\n85l65jjixrrzxI2wKAp3EPVfVbobzgF2z/HYkkeHLbjEIgiOT0yqljZRjdcu\nMdE9jagyMrpbNEP1Iv6hqzvyN7wyI67vqoIU02jGh6y6t9lh7rrBEFFFcTBx\ndxDv0RTIcOHnjeMwMLErs8NvZrAWQnSMYRJuoEKSkI09kfK+r6ClRsyZvfZ7\nlOKI6WzrLBO2ea5xUX9OJmHnlmIhpPeMpvw7h9cze980ZBawOKQqCNkem2QO\nV6dog6Ugz7EfCm111doPu8NY9JpGGoEGk4lo4zfKTBIIUJ7NRUEzWmhNahyF\nfVUs\r\n=ycrt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.0.2.tgz","readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myservice/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myservice/bar');\n schemas.validate('schema:///foo/myservice/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://service/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'service');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema previously added with\n[add](#module_axway-schema..AxwaySchema+add) or\n[register](#module_axway-schema..AxwaySchema+register)\nand identified by `id`, or if `id` is a JSON schema object, `obj` is validated\nagainst that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> \\| <code>object</code> | The schema identifier or object. |\n| obj | <code>\\*</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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); 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":"32b68e5c130ed335c467527b71c9091ef29beeba","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 && npm run check:dependencies","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":"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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.0.2_1548346957255_0.006397312246023468","host":"s3://npm-registry-packages"}},"4.0.3":{"name":"axway-schema","version":"4.0.3","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@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":"5d65cd1b4513b3b7f7fe19398674987f54a4d396","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.0.3.tgz","fileCount":5,"integrity":"sha512-fNkjtlZMKIM6g/KGktgEfgtLOolGJmEhHIv/C+M9EqYUht4ZFUs3KbqHwqTwkMo50o5wJSeByoPIax8G1yxjVQ==","signatures":[{"sig":"MEUCIQCZ/u5SSaL2wi2TRkmI76IDXBN72nyhMAonIWxDb3xMVgIgDYtiM5cEsrmOlWTDcR0q22VzoO0Y5KidfyKR3h5g8wo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31696,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUX+YCRA9TVsSAnZWagAAEQAP/ix0XlxbH5WTcnmwgOWB\nhwyeOwzdRsAR0FWnggmkKsTIrpyYD+3Z1rHBVdbfiZ8E982SHS32nUrwSYy8\nSm+7p7cPmJa4TLemxtFbmFyc+v9VDKM2eGsNMuSURGQdnkeONa6egLX2wd/T\nmWUSuG9p629kryZTezoZ/7mnIyWtOTcyTkdHXguQMkmajvzsb15hEgAuiz8+\ny4vPO2TUHX5yFDwwz0Pi6lIjLcDlkeZog+T6c4Fzd6xOL4HrbUGGSE9QpOjw\nUvQWVm6wvLWpHuvZirBFoFoGmSsS6lylxIVc+ds/xWiEm5LO7LrBkS+vsY4p\ntmsgKiQjkSUUlKKfQgAWtURzVae2zLEaM503i0J+CB6417KIWacx5gdjDatV\ndDVTH520oRqPEngUEMunjpkbfyy9t2csCqNbNN3gRUy/gz2+RPntPVzhoC7f\nBGnJ2MQmjgRxKsJY6Ufz28stCjlwEeDLNp1xNwcaoou6JDUPM+YEYBr0WD9C\n5YLpoPv0RMXrSE6EKZzLrCgxuvz9L38f4TOZ3KNmF001hK5op6tHU/M3Sby1\nnTIvb1D1OemPwh9ypF0xX3Jmi9JsaWgM1wt/DRbSU1FG/lxPYyFoY6jzFTbY\n+xzqhuChk93lQkXLIJwKArj046/koB8pm7PDcu4GMp3FitVg3Y/hXElk722V\nWC0R\r\n=JHoN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.0.3.tgz","engines":{"node":">= 8.9"},"gitHead":"9438796503a087e721ffdf13741c780ae93d4905","scripts":{"test":"shx rm -rf coverage .nyc_output && env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev && npm run check:dependencies","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":"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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.0.3_1548844952501_0.8705916108353036","host":"s3://npm-registry-packages"}},"2.2.3":{"name":"axway-schema","version":"2.2.3","keywords":["amplify","api-builder"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@2.2.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":"bcdef3dfd84ec3a1330b4cc70a15cb0209d5c052","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-2.2.3.tgz","fileCount":4,"integrity":"sha512-RyyjXu/pCXjWtR23UhQe+6lusvCZTKZK0y72iqmShPiaMSebz2pB15HBIkTZlQUPdZexYEJAy+iAPch6DAHCkQ==","signatures":[{"sig":"MEUCIDOSePI24F6ZcgyioPYXFECL9Gt9HfpepPlHB4M/Jbz0AiEA+FqGePq+jlvVvqpEwCcpVBSNL7OCXlhmctQe2KxLieE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYZanCRA9TVsSAnZWagAA8SYP/1mcwrFmxi8PC3pKQ7te\nStEs4yMqdWYbTRm9qRuxm47eTYJPAl0e8co/NG9fN28cLsUVVzQaOyRlqzuI\nxgV2CqLiZja2i8dadCa+yx/AX1epQ0ujonqxv/gwxv6BoJepclec5SiEZe51\nDmYiswNmin6CLSenwzr9XLlmNZqlpE1bQySQakwEXG76utK5YZjvk2M1QBHp\npQprgAMR8qZW+ygIoDIDpyQFpsglxlto9vTxJ4N5rgt7SK3H2KAZ+G5Tvxec\nzbq7dDvWwlLyTZmiej0MD/EwUQ0fMmvzdQalaq6YKMoMJwxnxAo30yJgaeLj\n9PKQC2fOgZzondLbKVHSa1+nXOKQRwInxP14oudbwgzFovUJxzltWJZA1BJp\nS7fjNthRA5hPjBMIjpMrZNa+QnqTu/tEtaL5Xw59cUiicBq/oJXJxKnP13bt\n+gHMjYz6R7LyaNzB7U5FSsaIxHUgWpPBBzG/zQ50wbk+qUWpRsu6/Jf/6Y6P\n7Yq5mNCbdHuCquncrvc10LB+NcGQih0R9UIewNXYRgoRIGqvymhISOvPTJVD\n0tz7F0+xY6/mQ5das3qjXauNXC//+Sg+3YKvbZSWUJKxdGEbH4Jw5Ux0PJ/e\nclc4V0HsFAa7zGvn9nGIO5+cra0IVnKLeXlDmISs3iHdtNwg/bdpCnH5d5A7\ndx0l\r\n=UmvT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:published/axway-schema@2.2.3.tgz","readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myproject/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myproject/bar');\n schemas.validate('schema:///foo/myproject/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://project/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'project');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier. |\n| obj | <code>object</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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 && npm run check:dependencies","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","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_2.2.3_1549899430476_0.0855988034761217","host":"s3://npm-registry-packages"}},"4.0.4":{"name":"axway-schema","version":"4.0.4","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.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":"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":"c98dd7b2e09f7a455c7ff9bb33572f13fb390e84","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.0.4.tgz","fileCount":5,"integrity":"sha512-t14aizVmkB4NiURAFjc/CRwrExi4KFxRmTea4ohy/ZBKLMW3vsxEfWVMXr36tcUMYWdGDaK1t7e2GKzVp3YBMg==","signatures":[{"sig":"MEQCIEkkIKU26Bv5m6JB7MweLCKiH2cNej31rML0KYZNOhj4AiBqCH2AU7oWE0NYDlZxhtxHecCEB4bz9R+qnMs1s0t6Ig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciPmXCRA9TVsSAnZWagAAhqUP+wTuhS6Sz+AIBDr2IYKo\nxTyOw2wW7suLHAYD3pwodkF20LirT5OLdFb3pBvH3B1EaDg8lPCuXhGLtfW2\nZ2/LGNZv0imsa1x0nbtTCG7oQJBL3B/JomkpL3MK4/0EWzyJkK3lCUSSuNai\nixlpv0OJHwrJTxeeDTtPIykkEj5GJmu0PjpQB16T3rnxE4U9ruzbKEpV8Ke9\nIpY04TEQwvl9YlnJg81AVtnRcWyxxZKBZ3EN/xkO8kZtfafN8Z5Mlxy27jJr\nMJ6O1qYsrSPQeEzhjE4zN2I3SCtOi/j5g6MYTdtBB0N9ATYd/p9sqYxlguoD\niUpu4aMYeuQOKjfxYOywud+Vnqzj95A/CwkMsszMwtQokQuIrsTjk246gjwU\ne+0crKPTUvRMkO61B8xeijesKMTt3g5sVa/YBOA0LcXE/eJ9Hx8CFXuVLIj7\nY+oAcATzR3HH6V4suvjRTj33FzMfQoUNnhBBK9tfMdnlkrTWC9UWaPVVDLtl\nXSnuf6kL/UeeY3W7KUlpECq0lNPuBqeNIUCHSuRZC0jkuhDIh0ySe7Jqs+hl\nSCx3k0DAkhwc00yzC3Wb2eDoWNAD3p0sevtAQIjL52KZ/nIfbotgZ09QpyfY\nmRspMNjZcnr7QnEst4zRMQ9E2a2BT2xrIwK5ZKtBWG8P8CT4ZwPSReWjdFJM\nT40y\r\n=Gub+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.0.4.tgz","engines":{"node":">= 8.9"},"gitHead":"438a9b107d9579cd5ecfcf4d689d2e7ffc752177","scripts":{"test":"shx rm -rf coverage .nyc_output && env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev && npm run check:dependencies","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":"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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.0.4_1552480662936_0.115970440737859","host":"s3://npm-registry-packages"}},"4.0.5":{"name":"axway-schema","version":"4.0.5","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.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":"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":"37babb3d0a2984bd44d283da5818732e238b923f","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.0.5.tgz","fileCount":5,"integrity":"sha512-V1X+SrqtF8GDP8loAdefv1Ne2/Y6+gADbOnrpuj5sB7/mn9fS00usd8Io3CungvntkdvffIEzIybzv3YvGvovA==","signatures":[{"sig":"MEQCIFhkWnGKVUcurUE+TRNO7k3EI+Rs7iJRfIGr/W2fxppOAiAjKVZBachnOonO5QZZH7dmIU2ZMNLWqAYddETwAcuFnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJct3YzCRA9TVsSAnZWagAAq18P/i0lqwhVph/+TfeRdU9+\neySrjXrSMKH6N2nWLym5JffhLPUvw1daSBWJkLLD8QMod3zm2ymfcKWwvOHU\nHU+3OLWcf0qZN6jRMejOvu3DCDxieiFPz6edeGzP/LTgvs5WfcCZWeVcn9Xz\nEXYU7cDHCOPt/WPm8ykEMjnGweGS6giSb7fwq+3oF0tZayCKkZFWNHwXtCka\nmdOLdVeVOjd1qlAqRh91Zi6oiVYDEgBMm94uGP5jxNLUBNRzxRoT9i2Y4BHS\naVEjzAW9GJB8aB2SS3Ec8wiu7feA2YQtWux81iWOctqiHPkjiCuakfuG1h1u\nHziQVV/ByEl+De9AXHijd36yuEYvXpXWE3e5AWdNUKODewq1/L/WQwGMYozb\n1v4NOY6Fur3XDrPglBNPvrYv8aQT+6uXcBGU2iGyiJ095Qhz5ru5AqG13AvS\nwZaHrIPFeZCk+FtgIqbBiIWNacG3P9Lf5psFuo4gw0aCnRWZfWMHDMAksxCt\n8jX1ej6hBvzYeb9I5BhI+X9mQ4xMQkIFuaW+5Kpj0Liu0/BvqDm0hE5cKOHW\nwWp03Vp+7Rx1/dbZTljBIO7/gwWWtvzmB6A/M0/FkibOZtatg4q7kszwWokR\nFn9LS8urrrBNxTtV77iOyg82FOGuKl+oh0kIpxBpJATNKj4BYL8qKgN3ZduQ\nd+K3\r\n=6wg/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.0.5.tgz","engines":{"node":">= 8.9"},"gitHead":"b488e3bbf3a17ed44aaa516f2b9141878d21e904","scripts":{"test":"shx rm -rf coverage .nyc_output && nyc --reporter=lcov --reporter=text-summary mocha  --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev && npm run check:dependencies","clean":"shx rm -rf coverage .nyc_output","posttest":"nyc check-coverage --lines 80 --branches 80 --functions 80 --statements 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":"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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.0.5_1555527218895_0.015023899549600594","host":"s3://npm-registry-packages"}},"4.0.6":{"name":"axway-schema","version":"4.0.6","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.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":"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":94,"branches":90,"per-file":false,"functions":93,"statements":94},"dist":{"shasum":"b474da8c52c8492cbeb7626197cd70594f54f658","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.0.6.tgz","fileCount":5,"integrity":"sha512-xYyANdqBFGS7o+FF95RK0W1oYMLrqLtRhoXjx4BzlCj1DnWrD+/0Fce5lY3WwI58dliAjtYs2LSdZTZ69JlgIA==","signatures":[{"sig":"MEYCIQDKVWV6Ym8Ri9tbGdDryzrUtkeYWr7XZpG9nWSuAMz9bQIhAKoivfRRRp0r5U7tSbdHpRBlsWOkCc5fXrqeQSJZ4Ayw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1cjLCRA9TVsSAnZWagAA7z8P/2a366J+aojlNokmWqOI\nPSc+0HILc9FAuKLjwi5AWeq0aku051iIlTHPyqMyDLXXDg+t7awI12TA7me1\n5X1m9QZ6pr8ZAKKv1WPUqE4JL/wzhgaoM/rdTqx+UKKqHz2PqCJEMydsfimI\nf5aFFlszxKN0v6V0EilMdWRnELSw13oI8/hUG5DQRrYPOxuwR/ru3AS6n5KA\nDqUiiA1vo2xSZuhqa0fIEvWhLkpvGUKUuvvPyISsm0PjUFhYzeZwl9A2YoHj\nZM7He52y4SpJC3pWfAKmHGf6xBVcSPA8gPmIVFuF/XBaIX6wp6ZvYJTx8Qh1\njEv8WCC5M6RPo8ep3OWyUmsohFzSp+I+pjuVea/JCGjzuuiyoGBb2ddorto3\nWMuDsxaRf6obfen2AK5xNHj6qkODfqN+ep+kHmBe/j7hcFhCOCuEcOrv5K/f\nvKXDSmfGhdPNiKYSRtOgKDAcaFig8cbHCfCGrSkQWSbYASIZQm/MWVqjjnTq\ny777JgiijyT/it6CYIk9MYKdtK8pt9YaJUUs9JBsHnXdq7kOlkAjPLfvLXjq\nnKDpOWGpxMxI7ctjBPXNZRjUik69qzHxH42tTTxHKljZlc9PDzueM+ChgyjS\nQAKOlKzpKlOVsm5My1eJaGjtzCpseJobakO+776cdI/xLTRjq1CzIlggi1Ol\nnf8q\r\n=NwS0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.0.6.tgz","readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myservice/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myservice/bar');\n schemas.validate('schema:///foo/myservice/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://service/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'service');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema previously added with\n[add](#module_axway-schema..AxwaySchema+add) or\n[register](#module_axway-schema..AxwaySchema+register)\nand identified by `id`, or if `id` is a JSON schema object, `obj` is validated\nagainst that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> \\| <code>object</code> | The schema identifier or object. |\n| obj | <code>\\*</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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); 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":"8f571b4c3265e86e91afcca4e7e32755fead9ab4","scripts":{"test":"nyc mocha --colors ./test --recursive -R spec","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.0.6_1557514442812_0.6128809469460605","host":"s3://npm-registry-packages"}},"4.0.7":{"name":"axway-schema","version":"4.0.7","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.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":"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":94,"branches":90,"per-file":false,"functions":93,"statements":94},"dist":{"shasum":"ef6848193ee92f25fd1208588168fbebb75c5e88","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.0.7.tgz","fileCount":5,"integrity":"sha512-XN+lqCZZsR8cHjly2T/95Mba3YrJpNrVeMQ3nhaE3TJkZzkj9aEdNkfeAatoxWcwaRqcBpNO9FyYqp7MfheoFQ==","signatures":[{"sig":"MEYCIQC+AiDk1HTiOCzAsUXuZcbhMXWJEURemsU2VDFxYLNoSgIhANcwU1PwVSf7vHO2lMtBQ9iMo0R2CpawmReU9JqYlu1z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31823,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3A6XCRA9TVsSAnZWagAAxJ0P/iOTFL7K3GTpL0OAAVDf\nqhS+y6KlGNMIt8nQdfYjWih1EfSgw/wKACaqomjxKMXhf3fayxuGhXsFGEzk\nR5tC940evwdXQGKZ91ZPvQg6qzZiaKrbCq+QEv+NuRiJnrV9NnWvD7C/hp2P\nF3sCMTETd/JZrXlPyWwMdJXUz8AkUDoIb+PMlpsS5z0AmG0C2TJDWeyo1NNm\nhVKoxqfdwCdA9S55rBcBMqFWecme6xC4Cdp+Ly2OO2mJ1RUNbEjjvgbKLjgd\n1XjEdmSpJaoy3T8TO8mTBoV3xUckP3175wxE3+xuUIZz7bv3zII5cED09Klf\n6fPEReofwuXSsk7vnEBn/BlmBZCg6g0X7D5q1aYfakaHeeZsb2fle/pLqRPf\nmPNHbpWsji1DBRJtHoYzO/Cm+5UxP8HHy2n8JOERTRfWS1s1m6azMuLvNhnZ\ntaVTyqU6ZLsGp2zK/R7qWDZCFEIDFFpbaDjmtbpZUbi3IIIIxB6cTEQhgLNh\nd3y8/fp8gpATwnxG3YTGptjE0juSYK2VAcrhplBqTusehHgX/ZKPVcvNES4D\n9H5H4mMRK4A28wZiK5bx7KWSPz4Z+nVgiqpOz0YEgjmv8zRONmteB+JNY8Wx\njKEfF64h67bi4e54ymS1kjpuhxiZBbWAGUbvESjrQG1azqtROYwwVj6CvFUl\nvWG0\r\n=/+4b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.0.7.tgz","engines":{"node":">= 8.9"},"gitHead":"2d0f51d190a2bf7e7b149d94d46d253ff6af9522","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.0.7_1557925527086_0.33303238887774866","host":"s3://npm-registry-packages"}},"4.0.8":{"name":"axway-schema","version":"4.0.8","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.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":"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":94,"branches":90,"per-file":false,"functions":93,"statements":94},"dist":{"shasum":"c69ade97690015b37cd9fd451d22a4fca96010f5","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.0.8.tgz","fileCount":5,"integrity":"sha512-TgJi2HKfJDMC5dG1s3WHzxChttg2n7AXv5Gk4eB+YEB4ERTe7gyxXTPILM1NMF7WxJZ9dUZpaAyej1NaUORd6Q==","signatures":[{"sig":"MEQCIAaWNvIlEUJaAoMhmCGRxR9VseW9MeQyLoBFUQweZd/NAiAceegfwsRJmrKZqJgfvGd3idQA+KkdXl0TEX7usRczKA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31871,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMbb9CRA9TVsSAnZWagAANIYP+wTgZO6H/QAHMr0v8xhn\nsG3OhLLYOsTTreYaYHVYDEJ+Bss0l5xr7ug/S5iSConJ2dgmmo/O/EHRCFsr\nMQhzixSQcT8oXJGcyrbqAgy2lcSuccPP2C/pvllYlwh7RfoDmz2TMYiFDxFi\ntv/PHq47oDyXSX9ua3MSJKvvKr2ih0lCco2dNzgqeNkckXepco5HlGH02ahz\n7lRSyj+W95m+TZzuN2ksuM+AQtFBrefn2jS8Q13xC3MpconiaWsei9SDYcUP\nWPq41ZJJq43I+QXlfFL0QYfpgQTVo+p54APP5kIdmtjatt38S/Mw1TIBZSIw\nIXtrZ/E5UjoC+KZXXPan52NAELnXAw7/rFYjiFDGJmHoLED7+rgo8hYtlNii\nSlYu+2V/4RmMA1tCxs71qMvAO3xsaBR7sIE/2v6/D27DwHX/Cni2q12vj7Cf\nFZ+L0gjV4Pgz0gBLH9XbnxIrg6T75bRudv5mI5lQv8Tpaiq16aaxVND0W1DE\nMvRnxclGY7kHqtV4mmgPRgoLNgt/9Fcd7cpEUCWSG8IlKLro7UGHlLjeftnd\npw8wrAyLDrifK/CCQCJzwS7IH2PmOeaFa2RO4syfr2bHLPALQFdxpdTSF8sE\n/GVsxkFZR1JpbKIuOB0DaV8HSfbp+vkO0SfY2jERzHxNykgj0LdfuoFc1r0h\np0Q6\r\n=Dccy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.0.8.tgz","engines":{"node":">= 8.9"},"gitHead":"9799c9937c9de156b10977412afc00c624481962","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.0.8_1563539196950_0.25748386697972037","host":"s3://npm-registry-packages"}},"4.1.0":{"name":"axway-schema","version":"4.1.0","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@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":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":94,"branches":90,"per-file":false,"functions":93,"statements":94},"dist":{"shasum":"0b7bd9d1a4aae9a9689fd9dffd661b529b11d7c5","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.1.0.tgz","fileCount":5,"integrity":"sha512-RkOfNZ0O98dvgRivqbYHe2GOYRIV5z141EJHWQpNAHtUZ2++8yfxHEb0QXXreBPpW6Yoz1FTFIGwT1tWVNPRFA==","signatures":[{"sig":"MEQCIE/gHA6PEz3g9+JTKLh/pGpAMvS6VF0DQtW2QIO94yglAiByAYfpGDlx6+8YVAsGWB0xIVOkzwAcx6vLUUJz68ZFgA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQxL7CRA9TVsSAnZWagAA/JkP/i2hQtoFLOq8ECGK6xk/\ni7TvQPS3FdxE4SdvnJJh2HYYag5lFHVTuy9+WyYYeyvP7W0ZPjsTImrn61Jj\n0whCIRT7tFwpyrbkCsp8wIHbOIATuWuyxtmotk7/KzIHZYMIDX7jxceB2DYA\niZkKdf6y07MQw9x03vgUtIYKk/oDNbdHpfrPYXpSAhhtoN74yFnv73po0ycI\nE8hQPshsoPHbfm9FKpKOSPym0YhAHkp9Dr0UYavpc5/gmzoj3+IV8aJ0hQ23\n9PbRCk8mIyc+q++a5bNI7i8VOCMSi/dh/MFdxda6hGDkmqAd4idZFsArvL9L\nVobfhipJrE88ukFTMWlW6hA9er9cpN1FRSfJIOKMru0tXIT7GqgxcW1cABRJ\nBDbMQaJy1KP5nfrs0WqD6YZ7WwRhg0XXPEcRiB3HWwUrMUUP1uskREl4uiyW\nr1D9gXDWBGH+FHHFNlG/+0+YCAR/PyhTzpDN2sotq4+Usrks3Wk5srv3yQ2A\n6z09flCzzBmfurlq8+DgEgH36CL529YRYCUVAwSSeqnSwoOsdiImhheZhRsB\nEgQ82RvlrT45ry1uqWKILySStKQ5ItxJqdRV2qlrvayItQQhLrCqShmTIioh\nzDSaMHVs2RuzhgqptmtVl3gXPpMiNUnkgW6qMBV3ErctRM//NLM+N+bMa+Fo\nuARN\r\n=z/re\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.1.0.tgz","engines":{"node":">= 8.9"},"gitHead":"27bb39c63b74729d6082bfc8edbb334b58df38dd","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.1.0_1564676859240_0.8994413499945386","host":"s3://npm-registry-packages"}},"4.1.1":{"name":"axway-schema","version":"4.1.1","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.1.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":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":94,"branches":90,"per-file":false,"functions":93,"statements":94},"dist":{"shasum":"5fd3119e0d63f4af612263c1bb37628511085f1a","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.1.1.tgz","fileCount":5,"integrity":"sha512-1A3Y6RAElAhJMyAz688vxd/rxwKNfepxLcMps9Vni0vBsYkAoEv3ezEB+r4SEIUQJgCE5UBxllQlTJXX/MfLlw==","signatures":[{"sig":"MEQCIGiB/+vltKAVoBHQfuG9UFsMPlgAs9LRvo+t8Xb49JZuAiBvNHHiC4XPJktZl6c8rpk8WkLSzq0+/RTau+5O9kgg5w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjfUpCRA9TVsSAnZWagAAqlsQAJe4rkCAx89nCDOI5jlV\no3RWzT4bIjX4Nc0wbEl4jF8ei0NNiYvTK+9aklxl4ZFfdG8H1Tw9rM60dDTc\n8GE5AijEfz5oTdq96r1mEN4XMxnZA7QPIts7NETxj/C9Kl9bB9dpL2LKEiOO\nZYiGA2kgNY/7Auq2Hl415VBVGMcHtQTURmbKBsdhd1tp/elk/7PK51dfC47H\n+MyUIbygMMLsI748rtwnuj8ohE6d+dqHpO49Q2boHI3HVlbp4qBmLH8hU/CP\nENrFwKMZbVnKL694RVqoJHQB+O85Ln0BrjZhbLgT5+m5NwvUVU/orcFQ8Lbh\npzde5Jm+hXVrJMyijJ7qK+Dxe54iSPXI+RwVrL/RhSwFqV4jj3xmxP0N/Aca\nsdELg+u/E4de6Hv3D7ysfKkQ/4Q4hprnjADOu2F6gGXdgWiIuhwk5xiBTZ90\npY2mn+CArocgfxgU6uNSDtzXA7rWWlqz4+6hPTLUpq96e6syGhxAGIvjSJEC\nFbHt01UekZgXkgfwT9nMgH8IlFl5yyRdr4aGc1bU72+K8c7agCfGJJwR2mMZ\nPmYvjQNFOeELWbKTc5TtxM4OOE66+KexBFcvUTV9UGaqTR10DM5DfbDLEuu2\nwFfQTKBsC+oVT9TLh6zm6GEQWrK8HfDgYlQGUIiAYamwXwg3sQN0y3yOzAbr\nMkau\r\n=+rHK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.1.1.tgz","engines":{"node":">= 8.9"},"gitHead":"55279f992a49bf2d1a9213e0ac339ac40c85fb6c","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.1.1_1569584424558_0.36184163009105363","host":"s3://npm-registry-packages"}},"4.1.2":{"name":"axway-schema","version":"4.1.2","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.1.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":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":94,"branches":90,"per-file":false,"functions":93,"statements":94},"dist":{"shasum":"d80236cc97e8cc889da3b652cae0a378c5e6dd1b","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.1.2.tgz","fileCount":5,"integrity":"sha512-sAvSxzHlshl4RhGvomEmngzDHZDT/hSWnfIKuCqCAH21sjQd53bNm2PA7L/I5pGURbzkk/hGTCk8QiY0YbHkNg==","signatures":[{"sig":"MEYCIQCD/bsz0Cn7Pn1T18HJxH7ZLP0sRrmqFaqclxIpeTGMxAIhAKbVpRtJVuXZ7u3EldHnGmRHQNWGZ/7t7fBVENstRLC5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlzsmCRA9TVsSAnZWagAAzEsQAJQEdRxrsB52GGtW4UKj\nNl0R5qRhsu/prrWv8PCAeoCk+lqPUP06SlUm3hTzDXg3fi51lLjTIQC1P4y7\njlz0HMu9L3Nb9ZTEcpGTAGgXI56jVWhANzZCYfH0AIOVNFhO0cJZKyg/0sGJ\n1jwfjmO8YlcLV7bDTt0J54QMxoT+MLc6LE6sXR/RYvGMdiTQLujx2Q3rFxhb\n+pcJ0yNhFjhQtyv0JKGlPw+ajguLCbwBzUVQp3YM3v1s8P1ldJigIaBOFGA6\nKJL69wUs0gMFQ1Y8VVSA2mKRbkdIsTDVVmTr67g+8OH1+6xutte1aQOuxHgA\nhMu/c7Xr8yMmUS9++B0IVNqT3SUt6ZAyqZHpR5DLLBo08rjtfei5zkPYT+Z1\ncd8HTU6OZn1bzZ5jtU8gbVgCUFoMCdWdtUfVDMZRJ2QMFr7apE13x53ol0u2\nvar6fP7gkA0CHFB0eFUiOoZCqtwS1jbkzAjg2D2/ZfO531ZRic2pYdHA9Ssu\nbOG0EACa6oRrcA17gzCduCAUS3zd6xrYD0/dlddAgHUHp87x8CR9Qy5xBN8o\ncBp1WJD06BHoThMReq/Cvh76su0GN0lPPHEmm43Z0IXHWRMDguFgMV/nYApf\n9vdK4GnWDAQGTsvEI28k78JPJxW+S1Ie+yzGye+jwmYbzdhCTFLqBUC/ZF29\nO6tD\r\n=mWCO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.1.2.tgz","readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myservice/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myservice/bar');\n schemas.validate('schema:///foo/myservice/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://service/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'service');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be automatically re-added\non next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema previously added with\n[add](#module_axway-schema..AxwaySchema+add) or\n[register](#module_axway-schema..AxwaySchema+register)\nand identified by `id`, or if `id` is a JSON schema object, `obj` is validated\nagainst that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> \\| <code>object</code> | The schema identifier or object. |\n| obj | <code>\\*</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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); 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 <11"},"gitHead":"61f3e2f94a4ecc9b4eededf359d51c4efbe824fe","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.1.2_1570192165967_0.02631865833899316","host":"s3://npm-registry-packages"}},"4.1.3":{"name":"axway-schema","version":"4.1.3","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.1.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":"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":94,"branches":90,"per-file":false,"functions":93,"statements":94},"dist":{"shasum":"8f42569b18e87f57a455f1bf3a1d46dbf31003e7","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.1.3.tgz","fileCount":5,"integrity":"sha512-l+4Eq3Ps9cRIx7h9xWWePT88DBim0tcLjneQG6HnYWwYX25StWTlXAZCP89OCUeSB2Dzvc9WtwsaJNP3RaxiuQ==","signatures":[{"sig":"MEYCIQCb4S3bwn/A1fPWbj8QR77dbETN6Cpygt5hOeMtpoXb6QIhALVtnVBOQQ9xb4m+b7NaAq1X5HqkmCTywEenjuRARCPW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoHcvCRA9TVsSAnZWagAAZdIP/0IItQdIGP9VwA/jX77y\nyj4D/prudnAX6GQhcbCnD+Lbl02DrbRZW32ocqcBsiYaawLb9mvZdtjxIEUT\nsrTSfAKsN4sTLJiH6CJdyxxrgz8Eei4TrCOX5e6Vk/NRY00nY/lYo1o8UUcd\n85FQOTQXqVaT+4bwrRp32HRxL8SPVHY8j6xsV2WjiuTjLDaX6ASMequPYLlV\npavJJcWg5Fhh/k1m5JM4Zm14Q82B7b41SAoGO+WQ1GVyEylhMtBS0x6QgSuZ\nMnm4snlPzYR235wtxOfqQLhKEpi77j7hx4KqiixPqZRztor+eH2YXYw0S/3k\ndrI+6rJ/qDKiDiPTksFB59RE8Y2nrPDZ4lLbO0+6i1jil3Okaq4FfxoxfsOz\nhr1G1Zqtw5aArKqcNn3ttjVRj3PqErZSttVwuAIpNjVF0e+5IihNShzKsX57\nMk4y7WtsKCZq/nWfKFOYl/E9f2H/5kPMkWuLDfdn/q7TnChOVbKbzByr0gWw\nTMN6+SyGprR7jDT6Ulx+q2n+XP8g/+J6n/uCS7eO9m/hON+z33oq/hmLABCv\nJTzU7d27JOy7OVJH6EjIsiXvpIYvtCTPv8qx/NxbIEZtOUrGW/ZvyjFZEd5x\nXQs1tgdUFqqSDNgjO4DulRWafMGojGgqvb1qet2YxhiJ+eGEHfhQHchSRNbJ\n4fZX\r\n=ApGK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.1.3.tgz","engines":{"node":">=8.9 <11"},"gitHead":"c50ee05cf1027ac1b3abe501d0a8515410eb3508","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.1.3_1570797359175_0.5613384004811635","host":"s3://npm-registry-packages"}},"4.2.0":{"name":"axway-schema","version":"4.2.0","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.2.0","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":94,"branches":90,"per-file":false,"functions":93,"statements":94},"dist":{"shasum":"e38b7ba98efee1c23871f8859c36ac724e3bd4e3","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.2.0.tgz","fileCount":5,"integrity":"sha512-zvsA3QPy2hfFFsTGL8ZWBIWH4Y2R0eAHdGH+BKgGkmRPk0mxZiiYlyFS6OgbKvFEFhJsV6a683PFHFw6rv2UIg==","signatures":[{"sig":"MEYCIQCL38wLOJ7by/FESWqeUW4o/QUm7OAXuDDNwhjWpygErgIhAP3nsAR02xuympfEoymGuf4J5Pp7LMgdN9G+1y1PjUZY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd17jQCRA9TVsSAnZWagAACvEP/1NK8IparQ4/T093UUbN\n62vFm4OMdxWVrS3+I1nVs8pSHYOYd8o6DseuagcIo2VTKOUfDTlzHKf9aXIN\nihScpreFDvxofLj/ilDWtLY98OQ+gppPzmHt3q0g0pN3Nhh9nVaaj0l7Umai\nOyYo6FPVyBzo/xFcNw2gNCxWa5/4N13zBC9glyOJiEYowS92Re8PLS+jymZj\nmDGFwgqyyS+qI3ZvtVtwP4tBpLkTp8IR1ixb5Ii1CINSir8NnsPrpVlyLclh\nvr9G8t9pydLsO9hMIO49nBUqtv48T2/ZKRyGRQfKC15u6lUQI497zN4idQJJ\nAkSKlLFuG5KZVC3zf28+SfKT3G8Y1YDa749iS3UfpnlyRXp7nQt6SmI1gnSB\nr3qfvvpphTet1V+lM0LTaKCx7YqsbuTf7RxapSDIqBnN9xSmJfx0Ji8DaJ6M\nqKL4GwEM1gQ1uVvabeRtBlg/TV+YmCafgVxYEikPZug/gx4L+GBqRKh+AlWC\nL10KQvj2K5qi4SQ8RgrK3hpB6CVH/07lhWkzYl5EYNHYoYppQhhqY65T3xk2\n0diOGZG58K8EYRbzg0/0QJ2O9SyjCbJ0z6dFeUTgkYG5X6QJ099THTg0O4qZ\nSY+T32g49SvhWVBuM8EbeqyAwlLGPByhym5Fzrma1E6EjG20S9qW2S5Dsuon\nfM2X\r\n=HUce\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.2.0.tgz","engines":{"node":">=8.9"},"gitHead":"4d32d9665f9fa9fd4d3bf0852214af622af0930f","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.2.0_1574418640161_0.6253490039552165","host":"s3://npm-registry-packages"}},"4.2.1":{"name":"axway-schema","version":"4.2.1","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.2.1","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":94,"branches":90,"per-file":false,"functions":93,"statements":94},"dist":{"shasum":"850b60b2a0a30569865775c1a9c8882d8d1ecdfa","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.2.1.tgz","fileCount":5,"integrity":"sha512-/UzFOU9q7nFCM1f+rthyU5e7WiYQ+rmdB1zUlAilVViuO3KGLM9Sg8p3e24jp7+Laiifnk0VaBDtPys/OEzRFA==","signatures":[{"sig":"MEUCIQDtUqJSFJg3YVkDOstfBHZOkb3hCDviQRDC6yRgyXBFRQIgKtdTFSOpU64Y0EbDWS0UZTyNW73hmnVXkeqDXxg2bBg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3nLHCRA9TVsSAnZWagAA+XAP/ArijdtZpbw8+Bq5BmfQ\nHYraSywgkNptyLupe+lPBrZFkCtU5Fl/V7nLQsI4vNOwvtlciL+sxRTff3yp\n1ZetdCEiiTUlKYAP4OeP1pXY8SLfrSkO4iZt5UFMAvUcAHh3cEjxtlsKeWzN\nO+3BvX53AJm7R6dXEjKkaZ4c7oCY2un6zXuTpx0tUy/XwHpuej3JiXjb9mi9\ntsy1i6lPIFq/vd8O9TjpFACTgen8aXLjbOJSwIFXukO6guiEuv/sOshxWRrL\ncJCnVgDPXJVE1JzNJ6TtJ0CepsBn4Swfw3e0Rq+HX9e8hk9RBhIXFq7wYEQq\npXH1j6RJXpFxNacvpcvnG+ijgg/dJQeIysQDQ6z0DCUdtJ8nn8qqNXOHac46\nHVsYWjRtxv6j+MxVFw9jDdO3IGkzEaZhQPEHJldWYNgguNB9+/jArhnabecR\npoXEZtoRiZL5yvDoNwXeEPkYRQD/DHiJXf0+apbhX9BaTS1afghgYq6KFgZL\nCUMiyHP3/6tXXmcbweDtl5aATENhRlKadB3M53dOJs034chsl8uokYLAu9iq\nlI3kCSuDotrabLOZPfwCcfyT1H2Yt2ZFST39S3dtsFPQhytUZp1AVGH1do3v\nQkuYscfqaM97pNOKZK8ohvBsPgyjZRqHLHsOhz2GvF4zDey1B4YwjdO4y1l8\n16S4\r\n=VamV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.2.1.tgz","engines":{"node":">=8.9"},"gitHead":"67df9e6c89f10bd41e4043d10ab7f55a2b54ebad","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.2.1_1574859462995_0.04113178747879376","host":"s3://npm-registry-packages"}},"4.2.2":{"name":"axway-schema","version":"4.2.2","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.2.2","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":94,"branches":90,"per-file":false,"functions":93,"statements":94},"dist":{"shasum":"14565f23421289db23d47c3cdde6b5653c29a232","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.2.2.tgz","fileCount":5,"integrity":"sha512-FGwduFjDh47L/2Y6CKR321RkzI1u+Ffr7td6SVOos05m828CiR3T1WherbhjKCfVt7hg8q5SAImA7fQk4OXBbg==","signatures":[{"sig":"MEUCIAN26WedaONrXqST6+49NLfeEJ/PmzDr488MwOT7+howAiEAlFmOg8yidDvxNwyv74Q3fAMJhZNl5oqk6i2cdB3H9+I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezpjrCRA9TVsSAnZWagAA05IP/jbLWqlgjMqB65oG+U/6\nEEqDgt51c5nw8W0Z2ZZuM36a0oy5EZT1yFEMGzx0HRBN6KJZ9jTBqgjUuKsa\n2J8DSION9yXQQju4xv4/YrSwsKKf6LKz6X13YRyK8harFAsTv+wOFxb8D+9J\nCngbITtmSCzgttT6d/W1kj5ha/qiiiX0YOl/N4yADR7whV7gCHpM4ehWclhS\nhgqKSjM9BBvuNg1T/z7WRH9MUB/z7kh5Z7v+sle03BlIRZdRVxILl/T0dFuu\n7JOdbq1QEnyGGLN4pPve5UmlPOMt+p0udCdbGBJAEN1yr/nvMVOY3kQReAnj\ngipKxuimUeKfT/AAtsT0IGEnOkEoAUOeg7fVyabrNnw9GsbUX7Qm/IjUVlR5\ncZ7xONaXfLVDi5CaQMTvVIKZsG3xlJpPtFpAx3CnP3lqXTsdJnx2nIKWJlln\nK/CpMkg3GZD5/97tNx+Rw12Msl78wyEY+cl6F7YepSH2Cl/kKwuAqvp04SNt\nqmFvX59Hl5Oor9B1Gse9koQTi4PG7+H5BfpjwTZXepiL2g0eR63WWeE0/Gpg\nAOw9O9oAvdkWL9DKCMZLEkdD1yc5VdkNit1OCIXtoZ7/oZ91Vqo9GZPQDKSa\ng/QIxCklHvmAArqA3ODhcZposAEFFS9U8RoZtG4q4NefGMyXtxT/taZUX14H\nlexW\r\n=SILg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.2.2.tgz","engines":{"node":">=8.9"},"gitHead":"3c7b951fa53886c4070bc2e42f1b16e76194183c","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^5.3.0","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.2.2_1590597866356_0.0050926723751627545","host":"s3://npm-registry-packages"}},"4.2.3":{"name":"axway-schema","version":"4.2.3","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.2.3","maintainers":[{"name":"pltod2","email":"pl.todorov@gmail.com"},{"name":"axway_alasdair","email":"ahurst@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":94,"branches":90,"per-file":false,"functions":93,"statements":94},"dist":{"shasum":"889f9ce7af4f697e4aa5deffa265af70d79f64f6","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.2.3.tgz","fileCount":5,"integrity":"sha512-kmJang8Qpx8C54VSl6zRgxyPB2vIVzw1JCB5fTUY/BX++KbeLJayO6Y8fuJs0RhIqGXgeeAtHEjXUitKHE1Cag==","signatures":[{"sig":"MEQCIG19ePiTYZ2VEzTUEkezWuUHFFxTsqsDQgovps6YHwo/AiA69+/AqWvQlAKIzOTBYXJMgwoaa7KoMyxb3alR5E8AqA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfko51CRA9TVsSAnZWagAAy+oP/3IYlAXDgg46zGSEVjqR\nqOq7rE4lahbE/xKJqZKAM0VxzUszEVRl7HUSjiH46z+trYL/oZahmRge6n+/\nFT3+3FkFnqHNtltdLQCxlz2rkuUFX/ftYNHbyK9yRhk5i5wXdS5DnuMPV0jy\n2un/A7DGZMmr5thCOukkTQwWfxCSCtcaXg5kFiknXGJwvN66QKh/mZLzSDzJ\nO3WdfDI7ODXDO8eHbBQ+z0cUfHOarr9D9Pya0JiJPHvDYPO47JBS2oN4cWsO\nf2B425sokRRsPgEm+YvHRb8EL8Uqu21nv4hk0udjFHUQm5pVEUiW7nKVdgUu\n8ngfSbVUf6SP2XzrnfjXF5aMWl6ignZNqBD2XJuEqNUfOdOVTf5zCanB82CE\nZ/9bO0vAOv9qWL6VdYR5EJyR9EAQxkH1xcsgAIkffRpECaWQ6UnioGDiXxBY\nuNHGxy2ZGQHEPHqzxp/F46dEX+8nVIAnPLUl+E7oRmiFP1GouIJlkrDTJptg\n0fBLCaQTl/vorV9GjjnDBCD0IDKmByzX18nJmR7eerheNBRYeU+QNLUui9C1\n+UFUOVPFJ9+NSIzby0CQZE6TLjPBfA5WZS/xG7m0+hgs0Ro0bNgHibK9pYHC\nH0Ru/ouUSvRQekptOserQoxFQttgtWuB2mD1gdUcJdzeYvbgRUXQRzJqwPV2\nyKm0\r\n=nt4p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.2.3.tgz","engines":{"node":">=8.9"},"gitHead":"2a9245a89dc92a458af156a1a9697815f0f4fc06","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^6.12.5","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.2.3_1603440244540_0.7776943448501275","host":"s3://npm-registry-packages"}},"4.2.4":{"name":"axway-schema","version":"4.2.4","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.2.4","maintainers":[{"name":"pltod2","email":"pl.todorov@gmail.com"},{"name":"axway_alasdair","email":"ahurst@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"pboev-axway","email":"pboev@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":96.28,"branches":92.5,"per-file":false,"functions":96.77,"statements":96.41},"dist":{"shasum":"37dfe6430c319a814c449647c8b53b70a7d76e9b","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.2.4.tgz","fileCount":5,"integrity":"sha512-AFPMV0oknBxBuyHFAkodqDOr3v96zMjSHG7kLzqmb80n23Y+Z0r8SjOXtsj5eZR8TTstEIPHoC9rqgFdhpxv1A==","signatures":[{"sig":"MEYCIQCJ7znBWqSyleBP9hsUTiiACrohbjjw4pTymc9DLFq93wIhAJO798Yncnz5V5JsaqirhLSnK19xLWD+rYN0qB9/c5Rf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfs7pzCRA9TVsSAnZWagAAPPcP/27hbkOMXeKA8rb2xe6W\nn6GUrB0S7F1ToAuUh/nN08yNXduF5fbk3XSMDTAMKFi2srTqOPrIcdm34Jwx\nLjWQ851L7Pi/ACFxqXx/edlwWQNVfgfNayXiqZGYKPHkx5dFiuvj6GtR8dqB\nSJFbGXuJ3lenP7eAdtkeFguTsfW24znofBgXnairYeAepU1bKvtZyA8Y9GYw\nWxQwN/khm0CCjGbsPjaCTEWdH+OmsmRliG28E4vDq4CXu/2C9RPVNxKkrwij\nXOzWFzMdAQjqR+AxO+wMYPRYFLOAZW/uQgNf0Jajna/JUYM8PDT4aiad00kM\nohhgITY7J556K754WhtAFvrMvLoieHB+p0qm3gqPecmqQajKFi4ufSx4BEwy\nIjhrHS2G/7kbPB8Kc46O6UCAXHkZ4Gw+sd+UmHRMglCjVpQvxYApE1wpephi\n419R2zLXczHjYWyZJXqGgmtra3bb9C5joOsnRrgZxcM1SnrFVZX0Dl7RkYik\nYzziFIYhbXyiWid8YTnGk8eej5+0Mhhgd0jKA4aP4kysJTXFCwF9AbunP/PL\ndkgjjtjEpWg0t+V81mqnj0uVUu/Lr/lKcI62jolxmXGpZnTlHxr+T08rTpdM\nc/7k48rTTLXFooYytWy0NEBU7GBeBNq+EAE5e6mmmFW73fhko0HI7RgoZJuX\nP9fT\r\n=Zf63\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.2.4.tgz","engines":{"node":">=8.9"},"gitHead":"7b42cab00f1970ea5c1eb56fe3df1210414c3b9f","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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","test:nocoverage":"mocha ./test","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^6.12.5","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.2.4_1605614195420_0.48711665681512395","host":"s3://npm-registry-packages"}},"4.2.5":{"name":"axway-schema","version":"4.2.5","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.2.5","maintainers":[{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"axway_alasdair","email":"ahurst@axway.com"},{"name":"pltod2","email":"pl.todorov@gmail.com"},{"name":"npetrovski-axway","email":"npetrovski@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":96.28,"branches":92.5,"per-file":false,"functions":96.77,"statements":96.41},"dist":{"shasum":"ce8d269c5e42ad2dfc9806d4a038f4c2d4cac7fb","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.2.5.tgz","fileCount":5,"integrity":"sha512-oU0DiVe6ZtdCGrSYkd0/3byC1bHqfNPd0v1/BiJw34lDGPoIMPzAfQyBWcM06dkd41s5CqZYwARJFB9wLHUUlw==","signatures":[{"sig":"MEQCICA0feuhXtcRUMNpr9/Srza+UZs3VVjYIQiCoR8wri7cAiA2W/ZC56ZkI+j1WJZIm7PMb0UAdU6Usd0JQ/xFhc4rGw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJBxHCRA9TVsSAnZWagAAtXUQAIxRCkSGBq8zWJww4NOu\nQ5wD1FH8yt2lQ8QavzBKlg/Af3j8UYnKxM57ZdHxsmgIroTjlOhOZDsSqdrF\na1FT+pLnDjGXEszTfBg48arj3gfe9tWsM29cJjlti5Z+lJPhQVTwm1Wor4QG\neaL6H2JP2bpl9A+FB5CttR0yLCj1J8Vy5Xeo214WSHie8bIAyIw3Vrlxjdo6\n0PwhBoafbS9TFO+fxxY5XL0tCBG16ChnwiU3BEMqk/2pgi4uJgLn6zBkV6FP\ne8CFA/ZWlrsmyxdx+TkUsgUoCTpG28O09/aQeR3i+rj8sTmRI1fCRz3qEcP8\nSLriS8XsEs+RknS91BhuarX5nFJlCEW9EMXuvoXmV2zw6Tm/Xgjr6tg21CYH\noqd5OEeFo1o0jimjdhuv12hXKVRdgRf1y3rX3XlRvlT/D/xwMNX7JW84Obm1\nJbIuwURyrFlfzn9ypssDi56z8JFcLGRi8oo/dauOUL7Lzhb3djfxoP8fQenN\nWnB9/At+kpMTMlCkY1DA3g0kovhTE/cBSuUSt7kNLOUyKM+b5p8fbJEQCrBh\nK0SFjiwBhKaJwA68wRqVMJ4byzJxAUSMXKnDm4knkH/w3GlNf8Lf1v0wcUEB\nfRk5SySk+nOQB7Mvd97Wyb/619t89ruWZkpHkD27BDbohC0wqUNXkAd/XIW5\nYNzy\r\n=iqcl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.2.5.tgz","engines":{"node":">=8.9"},"gitHead":"5e519fb8cab37103d94281640971952ef8d79427","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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","test:nocoverage":"mocha ./test","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^6.12.5","uri-js":"^3.0.2","json-refs":"^3.0.2","json-pointer":"^0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.2.5_1612979270814_0.38982032424768964","host":"s3://npm-registry-packages"}},"4.2.6":{"name":"axway-schema","version":"4.2.6","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.2.6","maintainers":[{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"pboev-axway","email":"pboev@axway.com"},{"name":"jvos-axway","email":"jvos@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"axway_alasdair","email":"ahurst@axway.com"},{"name":"pltod2","email":"pl.todorov@gmail.com"},{"name":"npetrovski-axway","email":"npetrovski@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":96.28,"branches":92.5,"per-file":false,"functions":96.77,"statements":96.41},"dist":{"shasum":"edfd5f0f433f19b498d76e33bb974b6c254bef0c","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.2.6.tgz","fileCount":5,"integrity":"sha512-kgUyQcZeydGlYokVDMRZyKbbVT915E/zsAI0Sh+xyZJhbZkb/I8End7LpeTGHJ3BLeWD/ejyIYVQ8+9vYSU28A==","signatures":[{"sig":"MEQCIG4nKz0B5l2Ro2D2xV9huqFzXMzlihY0LSlU8rIiwd4vAiAInpQTBvZdhaNYBxsPPfSyZJYhR/3pU4DgAg+6ypI5MQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36443,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOP8fCRA9TVsSAnZWagAAK9EP/2S4UG9PAEkQbU/yDg6+\nKUqWOKxuMM7Ur3gV3bAq9lknEdBh2FQNI8ZLZglG+qTTVyKtXlfNe9QGbsB+\nusEv11lnP6wq4jpel9PeOh0GEMUbALP+S3FuxTUR2cH4WR2/h8Q2ooGL2GAj\nR+lrNrQVpCaroPiIxgucx4CKZ/EuKKayQJG3atXm+CQbnm4B6EAqfMghsGyH\nxLFF1tF7sxDWSMP3Wn5lkWIkE/83+qYAejMAx4alWjgFIAURzHmFIBZBT4nN\nnUj0WsZg1LiF5coT7o7nIUz5Y7gt6nlOTulEbUYvewgv4ctACS5GjtTzTemB\n31OAs1LCki/tKOnQSgMtL+wnWMp1RAVRMER5IBLlNo0Q8oQeNGW9P6nybvx5\nUiRwh9ZficAGcLCD5gO5S2JeRsTBawiKAt0Fs4dcDEdvqjQp39XHCpxjYjUL\ny1sPfVk62nRCcm3LzsSIRyAN0tDxbQGdHmqR0FIe7BgDIlJQXzGyhuCF+bhW\niNYWkYEKH2yEKPHJW0swQ8x9lIYveh5N/NhKpTUk8AuWPD5THq7LbwJ768xR\ngzHslTSGRdmhgKrKzpZnxn0f/t2CkIGtPMtAnUC3K7/yJn2ftXVCViCo4WpV\n4686QsC7lGVjsdU5ed+EuemwndXMun0wnJN89hECDnBltRpcYm63y0mD8n/W\nLnHn\r\n=aXw8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.2.6.tgz","engines":{"node":">=8.9"},"gitHead":"d41337729745c1d305e1aed27f0f721d280e071a","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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","test:nocoverage":"mocha ./test","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":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.11.3","dependencies":{"ajv":"^6.12.5","uri-js":"^3.0.2","json-pointer":"^0.6.0","@axway/json-refs":"^4.0.0","strict-uri-encode":"^2.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.2.6_1614348063211_0.007171925873523888","host":"s3://npm-registry-packages"}},"4.2.7":{"name":"axway-schema","version":"4.2.7","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.2.7","maintainers":[{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"axway_darnaudov","email":"darnaudov@axway.com"},{"name":"ddimonov-axway","email":"ddimonov@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"axway_alasdair","email":"ahurst@axway.com"},{"name":"pltod2","email":"pl.todorov@gmail.com"},{"name":"npetrovski-axway","email":"npetrovski@axway.com"},{"name":"pbozhkovaxway","email":"pbozhkov@axway.com"},{"name":"mbonchev-axway","email":"mbonchev@axway.com"},{"name":"axway-vertex","email":"agrakhov@axway.com"},{"name":"cdobrica","email":"cdobrica@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":96.28,"branches":92.5,"per-file":false,"functions":96.77,"statements":96.41},"dist":{"shasum":"f87570e886612b9d42c814e97999f3c62c02681e","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.2.7.tgz","fileCount":5,"integrity":"sha512-3B9urPIC+C4CK9uf7OZf1enNSzs+S2xFEgbfdL+bNm02OZeGApje0EazagiHNAxdbaTX9GnHpN85tHzxxajGdQ==","signatures":[{"sig":"MEUCIQCADaZoJYay/UkgyaSHETV3ubzmJ8EJO8fuEYapUcdEnAIgOwrwhwvrXX1kHhZrskeHWPDEkNF9MNQ6Ob6Ao7R8b9c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhp3PpCRA9TVsSAnZWagAAO7sP/3ksqEPjTMm6oPBlu6Gl\nOGD47DXVdNgaTlobto8CSSROoxpSbyuP0juRoOyRHRwZnqXH8DJp46rdA0t0\n7tGXSP503hKVAZaikzPp70R0FECDaadrClTvqCDntYAhrGHedz5HenSNYVxf\nhuJ8vnqLlMw6XdIIMowxFeHgzVVbWNEsn7RCXvz4B0UaSReWowjPy2zsGPtR\ny2+3vgcgqCMS8LOCrGy7YenQUVMUgIjIpZKRWzZFEOdjFJmZc4tsRWL0v113\nP9oAT4Kvzq3P1uibdqmT0vMKi2E0NKJfA/904ywYxmVkcSmGcKKUOIUJcfdB\n9IzzYgxYrrCXqzl8zKkEnFi+1oLrjCOwh1nQVsT3JEyUp3NkLOMdnQL7eGkd\nc3uRh89+wa6QZ27PQIMAM8viZ9lMeLexKpAb0eymY6K4kg+x5aMO9UZMd0Km\n0HcGuEYmCDBsrSZtAOqMBbjepIUBXVCwMCvZbRaMSCtsBKIM1aqCTHqOclPE\nACDkVDMvlKUIKSxbjTwDUvOk4wlulAxIespmRUmhnbRo+He6oJeEXKjC/MmZ\nf7WBlVGjIupQS3l84oOFyHj8LKHElRqdaL/9g6mcthWFehTJcLX8Aridh9BC\nKT4aHUbeD2yA8WZXSNr3HMGekQF9L8LFJEKEgNkh7ZiSjYWDBDTJzWcYU0Jj\n2HIr\r\n=J9jU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.2.7.tgz","engines":{"node":">=8.9"},"gitHead":"ac7ba5ca8828b8d321634a3652568d2b76378434","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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","test:nocoverage":"mocha ./test","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.9.0","description":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"8.17.0","dependencies":{"ajv":"^6.12.5","uri-js":"^3.0.2","@axway/json-refs":"^4.0.0","strict-uri-encode":"^2.0.0","@axway/json-pointer":"^0.7.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.2.7_1638364137650_0.20974036335240753","host":"s3://npm-registry-packages"}},"4.2.8":{"name":"axway-schema","version":"4.2.8","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.2.8","maintainers":[{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"axway_darnaudov","email":"darnaudov@axway.com"},{"name":"ddimonov-axway","email":"ddimonov@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"axway_alasdair","email":"ahurst@axway.com"},{"name":"pltod2","email":"pl.todorov@gmail.com"},{"name":"npetrovski-axway","email":"npetrovski@axway.com"},{"name":"pbozhkovaxway","email":"pbozhkov@axway.com"},{"name":"mbonchev-axway","email":"mbonchev@axway.com"},{"name":"axway-vertex","email":"agrakhov@axway.com"},{"name":"cdobrica","email":"cdobrica@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":96.28,"branches":92.5,"per-file":false,"functions":96.77,"statements":96.41},"dist":{"shasum":"4aaee245ddccbe33416165806c51fd21466e059f","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.2.8.tgz","fileCount":5,"integrity":"sha512-wJfikSzsBUT5iDK2oH7fvUX9lYrPgJJQOdGeeoqE9aHNOnx7J7pZUxyDiTGuHK0uxb7VzugObqxJ3LzX3BWFXg==","signatures":[{"sig":"MEQCIFra/jU1cT3rpQ/7jf5yYsSA5nVCbghV1XtkglT2hFP1AiAK8lzruyGo5N58QzEzHP4knMjXqUd4K1ivfzWCZOiy6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3XM3CRA9TVsSAnZWagAADlcQAJvxbTgRCnLiwztppS0I\nRaQRPZ9ZFlZq4dIqd8Wyg56pu2qbMpbAlfLXNwb0Krmzy4xHg9npuEm2/6hr\nvoQuoHzASZJuyi9dk4IbdEjzvpmE+2EuXFwJdneGLz0NWiGbcs+35ebQancY\n3lnv6d3amj0J5e1Ygj151tgcU9IC7foTBopPSQU2PipwWh7HmQ8Ta1OmfaOY\ng04csIdDYJ0tuKQLgy/cqZc/GuoJDwRya7fGGmkNIXgBuQk4sJO8Nie82ZI7\n7yKFqPS3RPudyNmQi/q7+yKasCG/iBmwqAOzIukLtE6vf2fCnmaKSJ48Slkx\nQ7T4C20Im3R96D4oiwaGx2T/FaBISRvXmN6paecssclHaY1FTgG3+D1s6SEl\nJHvUYpKywqaoVAgzCj1GsvVsFzJHdpc8KJDzW2beAvDSlakxPABnf3b/vM1Q\nZmwzvI24x0Mwv9co1l/PT1+QiIkKpIAoVqfmjqXcj1V4i4AtW5RRkxXD37H7\noKjGFbH+5CQqBAww6KB0WTlQZcj7rKnk3TkimYWMBMfPV4CFxVgD0DS9Af4i\n7am8QHKxAWJS7ysFJhdR6zc2Qe9Kkbq9qKTEYbYkmS9NgvdUAceW4gNwR+dQ\nZpd9g7mG7UYQyJJeyKiCgJlc7JSQinLHgqMC6yZZDNl6dYMEUr3FQ8md8UQL\nUoR9\r\n=0JLn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.2.8.tgz","engines":{"node":">=8.9"},"gitHead":"bea449db0c25c6708e1d1f4e499b6025422bfbb3","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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","test:nocoverage":"mocha ./test","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.14.13","description":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"14.17.0","dependencies":{"ajv":"^6.12.5","uri-js":"^3.0.2","@axway/json-refs":"^4.0.0","strict-uri-encode":"^2.0.0","@axway/json-pointer":"^0.7.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.2.8_1641902903780_0.772039364757489","host":"s3://npm-registry-packages"}},"4.3.0":{"name":"axway-schema","version":"4.3.0","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.3.0","maintainers":[{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"axway_darnaudov","email":"darnaudov@axway.com"},{"name":"ddimonov-axway","email":"ddimonov@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"axway_alasdair","email":"ahurst@axway.com"},{"name":"pltod2","email":"pl.todorov@gmail.com"},{"name":"npetrovski-axway","email":"npetrovski@axway.com"},{"name":"pbozhkovaxway","email":"pbozhkov@axway.com"},{"name":"mbonchev-axway","email":"mbonchev@axway.com"},{"name":"axway-vertex","email":"agrakhov@axway.com"},{"name":"cdobrica","email":"cdobrica@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":96.28,"branches":92.5,"per-file":false,"functions":96.77,"statements":96.41},"dist":{"shasum":"e0a2c0a7a46195b72b6000ad66b281ede9f9917e","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.3.0.tgz","fileCount":5,"integrity":"sha512-z5SdXIm4S5eS5bFOGCPjvddYgZMelybgrf3/Nneoozaefgfp7aojb8YXBsZIcikGcQDthZo35SchNb2og4rNMg==","signatures":[{"sig":"MEUCIBgEml8hFAGH+guYJPLiBaJwcC2aLhFXXNa+f/AoxBUtAiEAlMBVoTzWktwITBFP99u+MIfc/2wtQolWyMKMgb7hse8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8ogaCRA9TVsSAnZWagAA1S0P/01fRPTmzsv7FU7ztrBn\nglLwnKv/5/yw53VmZa/nV1qJgcE2chw2FfB1WfBRmM4d0tMwFAXMveai8Ftm\nk89vupCgNRQJoD7y4l7bYWN4VxPCTQm/cUULkUgRKYMZgh5K/KQ/Rl1KWE0l\n4Cn0e8CNW69ANXWtDSYRpeZvA/RX/4AHGFgH+gBpOA3AVb0uvgLhfW+78XkC\nX0QJ9xM8iqX+F7BfEdCMOMiKipczlLBXb2eNorF3vCybnTV4PJfDe/mACZGy\nPJcPCxG6c0vxdtnRxc/bvwrhqMrX/FN4qQoDB0oYqAGd5v8FNL9aXDCXnhbo\n4wHAXf9ihpjb2kQWC0PIFtQUswbNdEel0z9jj3R/oNDmke7KCSz+qfFXmZgS\nP1SZApRIllhd1KtP8cszqqQOZqVe+mBdDDtR5Xv/DnohbTys4Vkccp8pJ50M\njNVrzJaSddHTbcwEdQ23AjbsCgutygBIvnOXoysEZ/KvIAsbUOZ3re0b6uYM\nOc1ifxE4zRRUoc1A+nIHwtcYi1TNqBiIHYalHvin99tg4Xj1S+Nd9eomIDSZ\nwFdw62X3YjgXYbb6OPtac8uD3xrL+9Nw7xZmQorr+RUHXObjYoRm01kcq3o/\nuR2JIm4SkBCz8kPRHT+y8nUuAyw1ZsP3J+1EIaZfpTlnFHZ17ogjWgqQC6ZQ\nN02J\r\n=8yo/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.3.0.tgz","readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myservice/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myservice/bar');\n schemas.validate('schema:///foo/myservice/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [._updateRef(doc, ref, refpath, encodedRef)](#module_axway-schema..AxwaySchema+_updateRef)\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://service/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'service');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be\nautomatically re-added on next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema previously added with\n[add](#module_axway-schema..AxwaySchema+add) or\n[register](#module_axway-schema..AxwaySchema+register)\nand identified by `id`, or if `id` is a JSON schema object, `obj` is validated\nagainst that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> \\| <code>object</code> | The schema identifier or object. |\n| obj | <code>\\*</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+_updateRef\"></a>\n\n#### axwaySchema.\\_updateRef(doc, ref, refpath, encodedRef)\nUpdates the reference with its encoded equivalent.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>Object</code> | the doc to be updated |\n| ref | <code>Object</code> | reference details |\n| refpath | <code>string</code> | the path to be replaced |\n| encodedRef | <code>string</code> | the new path |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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); 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":"038784756602f0aace4a46e5281b9ae704ff1520","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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","test:nocoverage":"mocha ./test","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.14.13","description":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"14.17.0","dependencies":{"ajv":"^6.12.5","uri-js":"^3.0.2","@axway/json-refs":"^4.0.0","strict-uri-encode":"^2.0.0","@axway/json-pointer":"^0.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.3.0_1643284506142_0.9989073034650253","host":"s3://npm-registry-packages"}},"4.3.1-rdpp-7242-231c69.0.0":{"name":"axway-schema","version":"4.3.1-rdpp-7242-231c69.0.0","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.3.1-rdpp-7242-231c69.0.0","maintainers":[{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"axway_darnaudov","email":"darnaudov@axway.com"},{"name":"ddimonov-axway","email":"ddimonov@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"axway_alasdair","email":"ahurst@axway.com"},{"name":"pltod2","email":"pl.todorov@gmail.com"},{"name":"npetrovski-axway","email":"npetrovski@axway.com"},{"name":"pbozhkovaxway","email":"pbozhkov@axway.com"},{"name":"mbonchev-axway","email":"mbonchev@axway.com"},{"name":"axway-vertex","email":"agrakhov@axway.com"},{"name":"cdobrica","email":"cdobrica@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":96.28,"branches":92.5,"per-file":false,"functions":96.77,"statements":96.41},"dist":{"shasum":"83dd0559a418123523444c2b7c54b40ec1d704e0","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.3.1-rdpp-7242-231c69.0.0.tgz","fileCount":5,"integrity":"sha512-ehqJ4sDDqnYLDgYEh8k1KBAu7oIKCJDq/MwahWyzfDdsIdN3ccl6yFkADrkFu1lSmKz5EiI6cXjb6ivNED3BRQ==","signatures":[{"sig":"MEUCIQCJTyldPnrEW+infzYNKSNLQMHrQnHPy2ZT6z6yrk2y1gIgM/AcPFqtsk8h80CuRHOT6J5Abrc1QGix79RXNny6goc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8raXCRA9TVsSAnZWagAAbqgP/0EAASC+V8Dq9Xdy+wKt\nlBc0l4v7izdR9DvRvDb9YYbFssBRZ76sjHNkvO56jhGkzc5ePQBTp86dwLVS\n/eVIC+6lFMQF7irCZbqSHQBIofCAmH9PCeVxxUNRvDOUuuXJ8OZGRFCmr6/H\nOcTUpukRt1rUOUeOSvFk1J8KCePuoDve5umG5/pxyPa38c6tqBCp92X4004V\nhDaQ1jOi71A4u79m1zrSO99hYKJg+pUeH5u52dhV/6RrHntzRiflR/fPArqY\nJYMg57dXnCxrgMrvSNp/yWEbu/Kp2zKpJz+R4eg9k+uz19NbYhQaVGmoxQ4w\nsw3+QW5Odtu2zUS3p+kNj4Yz8wZTMsnwdGdowPvGy/BIW/NRQBOYD+DMf7tx\nNSmIVC+pddfRMYPF6kwq7LpGfZGTQ2cOqoIIxcYU8plvqtkzuFi0QIU7iZXV\nBRx9UaaaA4rMiJjzCTMyu8zzerR4tw1pTWw56MvctSBN/py657Mm206sVnhK\nI3tFFKdCi5sBXmqFL0hJw0o4IB0Zzxud/oxyMxsQF1NAIEJzDO2Ml5dumQ5X\nNZ/h09QplEztnbnt2m6Ch8FYiuiMXyz0FA2ViC28IF5R2zZbzDMz+eD/pKx6\nBGf9SYGBEYTp5DrZOUv/dcBf3VS2EdNF1CjdDkDRCx4bU9GfRW2S3eSRffWx\nzeST\r\n=pgWy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.3.1-rdpp-7242-231c69.0.0.tgz","readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myservice/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myservice/bar');\n schemas.validate('schema:///foo/myservice/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [._updateRef(doc, ref, refpath, encodedRef)](#module_axway-schema..AxwaySchema+_updateRef)\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://service/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'service');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be\nautomatically re-added on next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema previously added with\n[add](#module_axway-schema..AxwaySchema+add) or\n[register](#module_axway-schema..AxwaySchema+register)\nand identified by `id`, or if `id` is a JSON schema object, `obj` is validated\nagainst that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> \\| <code>object</code> | The schema identifier or object. |\n| obj | <code>\\*</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+_updateRef\"></a>\n\n#### axwaySchema.\\_updateRef(doc, ref, refpath, encodedRef)\nUpdates the reference with its encoded equivalent.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>Object</code> | the doc to be updated |\n| ref | <code>Object</code> | reference details |\n| refpath | <code>string</code> | the path to be replaced |\n| encodedRef | <code>string</code> | the new path |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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); 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":"231c6904f4353d5b681cb78e6e3bd057bdea2f76","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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","test:nocoverage":"mocha ./test","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.14.13","description":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"14.17.0","dependencies":{"ajv":"^6.12.5","uri-js":"^3.0.2","@axway/json-refs":"^4.0.0","strict-uri-encode":"^2.0.0","@axway/json-pointer":"^0.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.3.1-rdpp-7242-231c69.0.0_1643296407150_0.9572598177458382","host":"s3://npm-registry-packages"}},"4.3.1":{"name":"axway-schema","version":"4.3.1","keywords":["amplify","api-builder","axway"],"author":{"url":"https://axway.com","name":"Axway","email":"support@axway.com"},"license":"SEE LICENCE IN LICENSE","_id":"axway-schema@4.3.1","maintainers":[{"name":"nkeranova","email":"nkeranova@axway.com"},{"name":"axway-npm","email":"builder11@axway.com"},{"name":"cb1kenobi","email":"chris@cb1inc.com"},{"name":"jamie.peabody","email":"jamie.peabody@gmail.com"},{"name":"awam","email":"ewanharris93@gmail.com"},{"name":"bladedancer","email":"bladedancer.gavin@gmail.com"},{"name":"axway_darnaudov","email":"darnaudov@axway.com"},{"name":"ddimonov-axway","email":"ddimonov@axway.com"},{"name":"neon-axway","email":"cshantakumar@axway.com"},{"name":"vchauhan","email":"vchauhan@axway.com"},{"name":"mdimitrova","email":"mdimitrova@axway.com"},{"name":"pdzhorev","email":"pdzhorev@axway.com"},{"name":"axway_alasdair","email":"ahurst@axway.com"},{"name":"pltod2","email":"pl.todorov@gmail.com"},{"name":"npetrovski-axway","email":"npetrovski@axway.com"},{"name":"pbozhkovaxway","email":"pbozhkov@axway.com"},{"name":"mbonchev-axway","email":"mbonchev@axway.com"},{"name":"axway-vertex","email":"agrakhov@axway.com"},{"name":"cdobrica","email":"cdobrica@axway.com"}],"homepage":"https://platform.axway.com","nyc":{"lines":96.28,"branches":92.5,"per-file":false,"functions":96.77,"statements":96.41},"dist":{"shasum":"451aa0d231f196667b13985a89a2bde8aeac9cf9","tarball":"https://registry.npmjs.org/axway-schema/-/axway-schema-4.3.1.tgz","fileCount":5,"integrity":"sha512-HHQ6J6PKNEqbwPnggt0juGSjw6m2IZohr3d8vTU+Djpn47joMyQ0s/vab4lysP5Twka6jnr0VnMGR/E/Bx3DLw==","signatures":[{"sig":"MEUCIE3rSBGw12asEbaIaOpW7BYRoUYsGd4xurjopforDogpAiEAke3hmVTbd08Iek4Diu0Ml0Ai5DVSxLOe521SkHw0/PE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37389,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8vBSCRA9TVsSAnZWagAATwIP/1Pdrwa4g9fUfAH1tnOU\n1aQtT3bMipTg6a4aOh/SOoIY9Ae6ieIILpsG6zsd551FFok62ofIqfADxK5s\nTzDfn1QdgfEewyoQ6s9kCZKYrC7XoZRA5vohnkcR5y9ImxxDDErJFviTSke7\nLeYvmHBOnXaTYnbv5Jz0+nhuRcNHEUyz+I2mzBf3XOv+SgrVGsoAeVU1nRPb\n38pAXUN9wAVA821ICzPcv0mGGqGk1kKTih7X4T/wIWuz17L4qwUxFQ7026SE\nA7hfcaGB7OBD+7rP6jgeVuvcR9d6Z7+LhN87VDN5gsLUH+8ViiRf4H8gldBo\nTZE60bqPpLCc/y6knHuSglsCtE1O4lSKmiWxxvK/uYtDJEgoyLGUUqx3Fnzt\ntGCiBiilHIzr4chRVnYWxywVqV2+rAwuuoQVYrxCbe49Le46wyzYzXBzqz/Z\nPE1KScrAnplXiR3cUjNSNce5gXZHOlXsKBIFnAG4wjrJDqSZMsuJqA2uBJBB\n0tw2C+/gqRIqx9XTk16NfO6JMm3xHUixAmldmtgsS8Qv5NeModmLC8ceGnj/\nvDvkHl3PoDAg9eMASewj04QX2BaAS1HPMGOEcAbGZD/G1drfiB77ePCw7QZS\nW8fVYX03EITVEz1Gqfuko6P4c+jaSn6k6j7wmokN6usGpy+iVkP6bdZLiG+2\nfCb6\r\n=y97m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","_from":"file:published/axway-schema@4.3.1.tgz","readme":"# axway-schema\n\nA singleton module for loading custom schemas and resolving them to json-schema docs\n\n# API Reference\n\n**Example** *(Quick start)*  \n```javascript\n const schemas = require('axway-schema');\n schemas.add('./schemas/foo.json')\n\t  .add('./schemas/bar.json', 'schema://myservice/bar')\n\t  .add('./schemas/swagger-v2.0.json')\n\t  .loadSync();\n schemas.get('schema:///foo');\n schemas.validate('schema:///foo', foo);\n schemas.get('schema:///foo/myservice/bar');\n schemas.validate('schema:///foo/myservice/bar', bar);\n schemas.get('http://swagger.io/v2/schema.json#');\n schemas.validate('http://swagger.io/v2/schema.json#', swagger);\n schemas.dereference(swagger);\n schemas.dereference(swagger, { target: '#/definitions' });\n schemas.dereference(swagger, { target: '#/definitions', rename: (id) => { return 'foo'; } });\n```\n<a name=\"module_axway-schema..AxwaySchema\"></a>\n\n### axway-schema~AxwaySchema\nA schema manager.\n\n**Kind**: inner class of [<code>axway-schema</code>](#module_axway-schema)  \n**Access**: public  \n\n* [~AxwaySchema](#module_axway-schema..AxwaySchema)\n    * [new AxwaySchema()](#new_module_axway-schema..AxwaySchema_new)\n    * [.setLogger(logger)](#module_axway-schema..AxwaySchema+setLogger)\n    * [.add(item, [defaultId])](#module_axway-schema..AxwaySchema+add) ⇒ <code>AxwaySchema</code>\n    * [.register(schema)](#module_axway-schema..AxwaySchema+register) ⇒ <code>AxwaySchema</code>\n    * [.loadSync()](#module_axway-schema..AxwaySchema+loadSync) ⇒ <code>AxwaySchema</code>\n    * [.clear()](#module_axway-schema..AxwaySchema+clear) ⇒ <code>AxwaySchema</code>\n    * [.exists(id)](#module_axway-schema..AxwaySchema+exists) ⇒ <code>boolean</code>\n    * [.get([id])](#module_axway-schema..AxwaySchema+get) ⇒ <code>object</code>\n    * [.validate(id, obj)](#module_axway-schema..AxwaySchema+validate) ⇒ <code>string</code>\n    * [._updateRef(doc, ref, refpath, encodedRef)](#module_axway-schema..AxwaySchema+_updateRef)\n    * [.dereference(doc, [options])](#module_axway-schema..AxwaySchema+dereference) ⇒ <code>object</code>\n    * [.getErrorString(errors, objectType)](#module_axway-schema..AxwaySchema+getErrorString) ⇒ <code>string</code>\n\n<a name=\"new_module_axway-schema..AxwaySchema_new\"></a>\n\n#### new AxwaySchema()\nConstructs a schema manager.  The instance is a singleton.\n\n<a name=\"module_axway-schema..AxwaySchema+setLogger\"></a>\n\n#### axwaySchema.setLogger(logger)\nSets the Logger\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| logger | <code>Logger</code> | A logger. |\n\n<a name=\"module_axway-schema..AxwaySchema+add\"></a>\n\n#### axwaySchema.add(item, [defaultId]) ⇒ <code>AxwaySchema</code>\nAdds an item to be loaded later by calling\n[loadSync](#module_axway-schema..AxwaySchema+loadSync).\nThe `item` can be a `string`, in which case it is a schema file, and an optional `defaultId`\nwill be used for the `id` if the file does not have an `id`.  If the file does not have an\n`id` and no `defaultId` is supplied, the function will throw.\n\nIf the `item` is an object, it is a valid schema that has an `id` defined so that\nit can be referenced later.  In this case, `defaultId` is ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| item | <code>string</code> \\| <code>object</code> | The item to add (a filename or schema). |\n| [defaultId] | <code>string</code> | The item id if one not supplied. |\n\n**Example** *(Add a schema)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas.add('./schema1.json');\n schemas.add('./schema2.json', 'schema://service/myapp/schema2.json');\n schemas.add({id: 'http://axway.com/schemas/user.json'});\n```\n<a name=\"module_axway-schema..AxwaySchema+register\"></a>\n\n#### axwaySchema.register(schema) ⇒ <code>AxwaySchema</code>\nRegisters a global schema that will persist across calls to\n[clear](#module_axway-schema..AxwaySchema+clear) operations.  Schemas registered with\nthe same `id` will generate a warning but will be ignored.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>object</code> | The schema. |\n\n<a name=\"module_axway-schema..AxwaySchema+loadSync\"></a>\n\n#### axwaySchema.loadSync() ⇒ <code>AxwaySchema</code>\nLoads all schemas previously added with calls to\n[add](#module_axway-schema..AxwaySchema+add).\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n**Example** *(Load schemas)*  \n```javascript\n const schemas = new AxwaySchema();\n schemas\n\t  .add('./schema1.json');\n\t  .add('./schema2.json', 'service');\n\t  .loadSync());\n```\n<a name=\"module_axway-schema..AxwaySchema+clear\"></a>\n\n#### axwaySchema.clear() ⇒ <code>AxwaySchema</code>\nClears all schemas and resets state.  All registered schema will be\nautomatically re-added on next load.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>AxwaySchema</code> - The [AxwaySchema](AxwaySchema) object.  \n**Access**: public  \n<a name=\"module_axway-schema..AxwaySchema+exists\"></a>\n\n#### axwaySchema.exists(id) ⇒ <code>boolean</code>\nTests whether or not a schema is loaded, identified by `id`.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>boolean</code> - True if the schema exists.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> | The schema identifier to test. |\n\n<a name=\"module_axway-schema..AxwaySchema+get\"></a>\n\n#### axwaySchema.get([id]) ⇒ <code>object</code>\nGets a schema by `id`.  If `id` is not supplied, all schemas are returned.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a schema identified by `id`.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [id] | <code>string</code> | The schema identifier. |\n\n<a name=\"module_axway-schema..AxwaySchema+validate\"></a>\n\n#### axwaySchema.validate(id, obj) ⇒ <code>string</code>\nValidates an object `obj` against a schema previously added with\n[add](#module_axway-schema..AxwaySchema+add) or\n[register](#module_axway-schema..AxwaySchema+register)\nand identified by `id`, or if `id` is a JSON schema object, `obj` is validated\nagainst that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - Returns an error string when not valid, undefined otherwise.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>string</code> \\| <code>object</code> | The schema identifier or object. |\n| obj | <code>\\*</code> | The object to validate. |\n\n<a name=\"module_axway-schema..AxwaySchema+_updateRef\"></a>\n\n#### axwaySchema.\\_updateRef(doc, ref, refpath, encodedRef)\nUpdates the reference with its encoded equivalent.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>Object</code> | the doc to be updated |\n| ref | <code>Object</code> | reference details |\n| refpath | <code>string</code> | the path to be replaced |\n| encodedRef | <code>string</code> | the new path |\n\n<a name=\"module_axway-schema..AxwaySchema+dereference\"></a>\n\n#### axwaySchema.dereference(doc, [options]) ⇒ <code>object</code>\nDereferences non-local references in the supplied document.  The supplied\ndocument is not modified.  All non-local references (e.g `schema://`) will\nbe replaced with the corresponding loaded schema.  If schema are not found,\nan error will be thrown.\n\nIf `options.target` is not supplied, then references are expanded inline.  If\n`options.target` is supplied, then references are expanded in the location specified\nby `options.target` and any existing reference updated to point to the new target.\nFor example, if the `options.target` is `#/definitions`, then the schema will be\nexpanded to `$.definitions` with the name of the schema the trailing component\n(basename) of its `id`, or if `options.rename` is supplied, the name\nreturned by that.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>object</code> - Returns a document with `schema://` references expanded.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| doc | <code>object</code> | A document |\n| [options] | <code>object</code> | Options |\n| [options.target] | <code>string</code> | A target |\n| [options.rename] | <code>targetRenameCallback</code> | A callback to rename schema |\n\n<a name=\"module_axway-schema..AxwaySchema+getErrorString\"></a>\n\n#### axwaySchema.getErrorString(errors, objectType) ⇒ <code>string</code>\nThe ajv.errorsText is actually not very good.\n\n**Kind**: instance method of [<code>AxwaySchema</code>](#module_axway-schema..AxwaySchema)  \n**Returns**: <code>string</code> - A formatted error string.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| errors | <code>array</code> | ajv errors object |\n| objectType | <code>string</code> | The name of the object type that was validated |\n\n<a name=\"module_axway-schema..targetRenameCallback\"></a>\n\n### axway-schema~targetRenameCallback ⇒ <code>string</code>\nCallback function to rename a target when used as a\n[dereference](#module_axway-schema..AxwaySchema+dereference) target.\nFor example, if your id is \"schema://svc.foo/bar\", then `bar` will be written\nto the dereference target as `bar`.  If you want to rename `bar`, then use\nthis function.\n\n**Kind**: inner typedef of [<code>axway-schema</code>](#module_axway-schema)  \n**Returns**: <code>string</code> - Return the renamed target.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>id</code> | The schema id. |\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); 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":"ec421c030fc7c141f4a45b3987352a072da77945","scripts":{"test":"nyc mocha ./test","build":"npm run clean && npm run build:dev && npm run check:dependencies","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","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","test:nocoverage":"mocha ./test","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.14.13","description":"A singleton module for loading custom schemas and resolving them to json-schema docs","directories":{},"_nodeVersion":"14.17.0","dependencies":{"ajv":"^6.12.5","uri-js":"^3.0.2","@axway/json-refs":"^4.0.0","strict-uri-encode":"^2.0.0","@axway/json-pointer":"^0.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/axway-schema_4.3.1_1643311186807_0.43020786840807457","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-11-15T16:04:54.207Z","modified":"2025-07-25T08:30:48.569Z","2.0.2":"2017-11-15T16:04:54.207Z","2.0.4":"2017-11-21T18:09:56.594Z","2.0.5-101":"2018-02-05T16:47:28.788Z","2.0.5-102":"2018-02-13T14:13:06.582Z","2.0.5-103":"2018-02-22T04:38:25.585Z","2.1.0":"2018-02-22T18:26:02.686Z","2.1.1-0":"2018-03-20T13:53:17.567Z","2.1.1-1":"2018-04-11T14:50:19.224Z","3.0.0-1":"2018-04-12T11:19:31.291Z","3.0.0-2":"2018-05-10T08:56:02.669Z","3.0.0-3":"2018-05-24T18:01:57.628Z","3.0.0-4":"2018-05-25T16:07:54.710Z","3.0.0-5":"2018-06-15T11:00:06.260Z","2.1.1":"2018-06-18T14:43:58.520Z","3.0.0":"2018-06-27T10:11:03.629Z","3.0.1":"2018-08-08T18:32:34.334Z","4.0.0":"2018-08-22T17:01:30.805Z","4.0.1":"2018-09-06T13:36:04.225Z","2.2.2":"2018-10-25T16:07:32.266Z","4.0.2":"2019-01-24T16:22:37.422Z","4.0.3":"2019-01-30T10:42:32.607Z","2.2.3":"2019-02-11T15:37:10.592Z","4.0.4":"2019-03-13T12:37:43.049Z","4.0.5":"2019-04-17T18:53:39.142Z","4.0.6":"2019-05-10T18:54:03.496Z","4.0.7":"2019-05-15T13:05:27.270Z","4.0.8":"2019-07-19T12:26:37.132Z","4.1.0":"2019-08-01T16:27:39.404Z","4.1.1":"2019-09-27T11:40:24.688Z","4.1.2":"2019-10-04T12:29:26.068Z","4.1.3":"2019-10-11T12:35:59.293Z","4.2.0":"2019-11-22T10:30:40.329Z","4.2.1":"2019-11-27T12:57:43.121Z","4.2.2":"2020-05-27T16:44:26.522Z","4.2.3":"2020-10-23T08:04:04.751Z","4.2.4":"2020-11-17T11:56:35.587Z","4.2.5":"2021-02-10T17:47:50.940Z","4.2.6":"2021-02-26T14:01:03.363Z","4.2.7":"2021-12-01T13:08:57.894Z","4.2.8":"2022-01-11T12:08:23.929Z","4.3.0":"2022-01-27T11:55:06.295Z","4.3.1-rdpp-7242-231c69.0.0":"2022-01-27T15:13:27.316Z","4.3.1":"2022-01-27T19:19:46.955Z"},"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"],"repository":{"url":"https://git.ecd.axway.int/amplify/api-builder","type":"git"},"description":"A singleton module for loading custom schemas and resolving them to json-schema docs","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":"","readmeFilename":""}