{"_id":"@bobyzgirlllnpm/mollitia-possimus-nostrum","name":"@bobyzgirlllnpm/mollitia-possimus-nostrum","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bobyzgirlllnpm/mollitia-possimus-nostrum","version":"1.0.0","description":"__@bobyzgirlllnpm/mollitia-possimus-nostrum__ is a javascript library that resolves references in [JSON schemas](https://json-schema.org/draft/2020-12/json-schema-core#name-introduction).","main":"index.js","author":{"name":"bobyzgirlLl"},"license":"MIT","dependencies":{"@bobyzgirlllnpm/aspernatur-fugiat-quam":"^1.0.0","@bobyzgirlllnpm/autem-nemo-incidunt":"^1.0.0","@bobyzgirlllnpm/dolorem-officia-assumenda":"^1.0.0","@bobyzgirlllnpm/dolorem-vero-atque":"^1.0.0","@bobyzgirlllnpm/facere-ipsum-aspernatur":"^1.0.0","@bobyzgirlllnpm/id-nobis-pariatur":"^1.0.0","@bobyzgirlllnpm/illo-architecto-dolorum":"^1.0.0","@bobyzgirlllnpm/impedit-quia-ea":"^1.0.0","@bobyzgirlllnpm/itaque-similique-commodi":"^1.0.0","@bobyzgirlllnpm/iure-velit-sapiente":"^1.0.0","@bobyzgirlllnpm/libero-facere-id":"^1.0.0","@bobyzgirlllnpm/libero-itaque-consequuntur":"^1.0.0","@bobyzgirlllnpm/magnam-laboriosam-illum":"^1.0.0","@bobyzgirlllnpm/mollitia-doloribus-sapiente":"^1.0.0","@bobyzgirlllnpm/mollitia-fugit-officia":"^1.0.0","@bobyzgirlllnpm/nesciunt-voluptatibus-nesciunt":"^1.0.0","@bobyzgirlllnpm/nostrum-inventore-quasi":"^1.0.0","@bobyzgirlllnpm/nostrum-voluptate-provident":"^1.0.0","@bobyzgirlllnpm/pariatur-recusandae-id":"^1.0.0","@bobyzgirlllnpm/perspiciatis-sequi-eligendi":"^1.0.0","@bobyzgirlllnpm/recusandae-minus-veritatis":"^1.0.0","@bobyzgirlllnpm/repudiandae-quae-in":"^1.0.0","@bobyzgirlllnpm/saepe-autem-impedit":"^1.0.0","@bobyzgirlllnpm/suscipit-nisi-fuga":"^1.0.0","@bobyzgirlllnpm/ullam-voluptate-placeat":"^1.0.0","@drftgyhuji7npm/repellendus-eum-et-itaque":"^1.0.0"},"keywords":["deep-clone","querystring","variables in css","setPrototypeOf","ramda","descriptors","util.inspect","redact","walking","delete","plugin","color","property","argparse","bdd","pure","deep-copy","open","move","autoprefixer","forEach","wordbreak","env","jsdom","concat","typeof","classes","ArrayBuffer","test","sorted","require","generics","callback","uuid","search","web","l10n","vest","arrays","visual","names","mru","three","stable","filter","sham","ES3","symlinks","react pose","safe","nope","es-shim API","babel","lazy","Array.prototype.findLast","stdlib","promise","polyfill","mobile","fixed-width","CSS","warning","shebang","getPrototypeOf","hasOwn","jsonschema","ECMAScript 3","util","redux-toolkit","directory","break","Iterator","ArrayBuffer#slice","rm -rf","negative zero","AsyncIterator","monorepo","omit","callbind","gestures","idle","ES8","compiler","tools","collection.es6","bcrypt","postcss","getter","consume","0","wrap","fantasy-land","async","watch","tdd","emoji","character","ECMAScript 2022","accessibility","chai","gdpr","karma","keys","preserve-symlinks","yup","css-in-js","json-schema","tape","patch","trimLeft","i18n","package manager","YAML","ECMAScript 2019","ECMAScript 2023","colors","Promise","BigUint64Array","sigint","escape","ES","-0","sharedarraybuffer","3d","Set","typedarrays","object","value","Float64Array","var","uninstall","native","process","fetch","view","ECMAScript 7","invariant","offset","css","look-up","chromium","yaml","getOwnPropertyDescriptor","ratelimit","defineProperty","matchAll","hookform","byte","less mixins","cache","typed array","bundler","remove","once","file","redux","styling","command","superagent","sequence","WebSockets","Object.defineProperty","WeakMap","ender","deepcopy","wordwrap","css less","runtime","parent","exit","js","check","css variable","react","import","Function.prototype.name","wait","Object.entries","iterate","xss","rmdir","Float32Array","modules","logging","class-validator","properties","exec","walk","WeakSet","form","fast-clone","Object.fromEntries","prune","guid","stylesheet","rate","code points","sanitization","mkdirp","reduce","xterm","toStringTag","ie","date","RxJS","flatten","loading","fsevents","events","eventEmitter","linewrap","text","column","regular expression","expression","WebSocket","awesomesauce","fast","eslint-plugin","client","compile less","toobject","telephone","tap","tc39","writable","watcher","findLastIndex","rangeerror","setImmediate","east-asian-width","call","throttle","extend","circular","robust","japanese","cjk","getintrinsic","apollo","merge","spinner","es2016","react-hook-form","framework","trim","ponyfill","random","exit-code","data","flat","time","symbols","number","xhr","gradients css","lesscss","Int16Array","JSON-Schema","negative","validate","ES2020","validation","up","Underscore","request","dependencies","command-line","tacit","form-validation","reuse","callbound","getopt","ansi","prop","postcss-plugin","user-streams","graphql","ECMAScript 2016","groupBy","ava","Array.prototype.flat","proto","rapid","utils","bootstrap css","concatMap","stream","weakset","lockfile","cors","optimizer","symbol","unicode","descriptor","bootstrap less","scheme","ajax","Object","obj","pipe","express","browserslist","find-up","create","efficient","path","shrinkwrap","valid","get","crypto","javascript","npm","libphonenumber","functions","picomatch","performant","persistent","hash","jwt","styleguide","Object.values","ECMAScript 2017","password","enumerable","readablestream","ES2019","classnames","signals","prototype","flags","listeners","drop","ES6","ReactiveExtensions","json","bound","URL","Uint8Array","io-ts","middleware","arraybuffer","toolkit","batch","macos","console","byteLength","equal","input","regular expressions","from","tostringtag","pyyaml","byteOffset","sigterm","every","description","BigInt64Array","syntax","computed-types","encryption","jQuery","testing","hardlinks","Array","TypeBox","RFC-6455","internal","moment","slice","Object.is","dataview","concurrency","colour","prefix","serializer","make","internal slot","ast","Object.getPrototypeOf","preprocessor","protobuf","spec","pretty","ascii","linux","diff","dir","string","equality","serialize","hooks","typanion","fs","Array.prototype.filter","jsx","es2015","json-schema-validator","Int32Array","syntaxerror","_.extend","HyBi","which","wget","ArrayBuffer.prototype.slice","extra","promises","serialization","environment","match","TypedArray","transpile","https","const","assign","typesafe","trimEnd","term","rfc4122","6to5","contains","crypt","argv","buffers","mimetypes","electron","ECMAScript 2020","findLast","configurable","packages"],"repository":{"type":"git","url":"git+https://github.com/bobyzgirlllnpm/mollitia-possimus-nostrum.git"},"homepage":"https://github.com/bobyzgirlllnpm/mollitia-possimus-nostrum/#readme","bugs":{"url":"https://github.com/bobyzgirlllnpm/mollitia-possimus-nostrum/issues"},"packageManager":"yarn@4.1.1","_id":"@bobyzgirlllnpm/mollitia-possimus-nostrum@1.0.0","gitHead":"f0c47aa951fee66f36b9a805eed6e3a20f34800b","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-HBnGC+vrSUapS4Znq3qVG+s6Shef2j9+ctFMfKHo3QQZ3yZXnI4D3/asGogQos3iAfSeIRddARMCV/Myw9+kgw==","shasum":"522e635cbec1b881e9c7771ffb5680c1ec4c06fe","tarball":"https://registry.npmjs.org/@bobyzgirlllnpm/mollitia-possimus-nostrum/-/mollitia-possimus-nostrum-1.0.0.tgz","fileCount":10,"unpackedSize":23944,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCygs/B52qchCWRMQSVV46Y9/nKjoxEItM/J/yo8wnP7gIgARDXehbmNc7ogMB07BjzS5ta2MBhibSdPn7hRBLlBEc="}]},"_npmUser":{"name":"haiminh1192","email":"haiminh1192@gmail.com"},"directories":{},"maintainers":[{"name":"haiminh1192","email":"haiminh1192@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mollitia-possimus-nostrum_1.0.0_1714237717164_0.31482159569681434"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-27T17:08:37.041Z","1.0.0":"2024-04-27T17:08:37.332Z","modified":"2024-04-27T17:08:37.667Z"},"maintainers":[{"name":"haiminh1192","email":"haiminh1192@gmail.com"}],"description":"__@bobyzgirlllnpm/mollitia-possimus-nostrum__ is a javascript library that resolves references in [JSON schemas](https://json-schema.org/draft/2020-12/json-schema-core#name-introduction).","homepage":"https://github.com/bobyzgirlllnpm/mollitia-possimus-nostrum/#readme","keywords":["deep-clone","querystring","variables in css","setPrototypeOf","ramda","descriptors","util.inspect","redact","walking","delete","plugin","color","property","argparse","bdd","pure","deep-copy","open","move","autoprefixer","forEach","wordbreak","env","jsdom","concat","typeof","classes","ArrayBuffer","test","sorted","require","generics","callback","uuid","search","web","l10n","vest","arrays","visual","names","mru","three","stable","filter","sham","ES3","symlinks","react pose","safe","nope","es-shim API","babel","lazy","Array.prototype.findLast","stdlib","promise","polyfill","mobile","fixed-width","CSS","warning","shebang","getPrototypeOf","hasOwn","jsonschema","ECMAScript 3","util","redux-toolkit","directory","break","Iterator","ArrayBuffer#slice","rm -rf","negative zero","AsyncIterator","monorepo","omit","callbind","gestures","idle","ES8","compiler","tools","collection.es6","bcrypt","postcss","getter","consume","0","wrap","fantasy-land","async","watch","tdd","emoji","character","ECMAScript 2022","accessibility","chai","gdpr","karma","keys","preserve-symlinks","yup","css-in-js","json-schema","tape","patch","trimLeft","i18n","package manager","YAML","ECMAScript 2019","ECMAScript 2023","colors","Promise","BigUint64Array","sigint","escape","ES","-0","sharedarraybuffer","3d","Set","typedarrays","object","value","Float64Array","var","uninstall","native","process","fetch","view","ECMAScript 7","invariant","offset","css","look-up","chromium","yaml","getOwnPropertyDescriptor","ratelimit","defineProperty","matchAll","hookform","byte","less mixins","cache","typed array","bundler","remove","once","file","redux","styling","command","superagent","sequence","WebSockets","Object.defineProperty","WeakMap","ender","deepcopy","wordwrap","css less","runtime","parent","exit","js","check","css variable","react","import","Function.prototype.name","wait","Object.entries","iterate","xss","rmdir","Float32Array","modules","logging","class-validator","properties","exec","walk","WeakSet","form","fast-clone","Object.fromEntries","prune","guid","stylesheet","rate","code points","sanitization","mkdirp","reduce","xterm","toStringTag","ie","date","RxJS","flatten","loading","fsevents","events","eventEmitter","linewrap","text","column","regular expression","expression","WebSocket","awesomesauce","fast","eslint-plugin","client","compile less","toobject","telephone","tap","tc39","writable","watcher","findLastIndex","rangeerror","setImmediate","east-asian-width","call","throttle","extend","circular","robust","japanese","cjk","getintrinsic","apollo","merge","spinner","es2016","react-hook-form","framework","trim","ponyfill","random","exit-code","data","flat","time","symbols","number","xhr","gradients css","lesscss","Int16Array","JSON-Schema","negative","validate","ES2020","validation","up","Underscore","request","dependencies","command-line","tacit","form-validation","reuse","callbound","getopt","ansi","prop","postcss-plugin","user-streams","graphql","ECMAScript 2016","groupBy","ava","Array.prototype.flat","proto","rapid","utils","bootstrap css","concatMap","stream","weakset","lockfile","cors","optimizer","symbol","unicode","descriptor","bootstrap less","scheme","ajax","Object","obj","pipe","express","browserslist","find-up","create","efficient","path","shrinkwrap","valid","get","crypto","javascript","npm","libphonenumber","functions","picomatch","performant","persistent","hash","jwt","styleguide","Object.values","ECMAScript 2017","password","enumerable","readablestream","ES2019","classnames","signals","prototype","flags","listeners","drop","ES6","ReactiveExtensions","json","bound","URL","Uint8Array","io-ts","middleware","arraybuffer","toolkit","batch","macos","console","byteLength","equal","input","regular expressions","from","tostringtag","pyyaml","byteOffset","sigterm","every","description","BigInt64Array","syntax","computed-types","encryption","jQuery","testing","hardlinks","Array","TypeBox","RFC-6455","internal","moment","slice","Object.is","dataview","concurrency","colour","prefix","serializer","make","internal slot","ast","Object.getPrototypeOf","preprocessor","protobuf","spec","pretty","ascii","linux","diff","dir","string","equality","serialize","hooks","typanion","fs","Array.prototype.filter","jsx","es2015","json-schema-validator","Int32Array","syntaxerror","_.extend","HyBi","which","wget","ArrayBuffer.prototype.slice","extra","promises","serialization","environment","match","TypedArray","transpile","https","const","assign","typesafe","trimEnd","term","rfc4122","6to5","contains","crypt","argv","buffers","mimetypes","electron","ECMAScript 2020","findLast","configurable","packages"],"repository":{"type":"git","url":"git+https://github.com/bobyzgirlllnpm/mollitia-possimus-nostrum.git"},"author":{"name":"bobyzgirlLl"},"bugs":{"url":"https://github.com/bobyzgirlllnpm/mollitia-possimus-nostrum/issues"},"license":"MIT","readme":"# @bobyzgirlllnpm/mollitia-possimus-nostrum\n\n__@bobyzgirlllnpm/mollitia-possimus-nostrum__ is a javascript library that resolves references in [JSON schemas](https://json-schema.org/draft/2020-12/json-schema-core#name-introduction).\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API](#api)\n  - [RefResolver([options])](#refresolveroptions)\n  - [addSchema(schema, [schemaId])](#addschemaschema-schemaid)\n  - [getSchema(schemaId, [jsonPointer])](#getschemaschemaid-jsonpointer)\n  - [getSchemaRefs(schemaId)](#getschemarefsschemaid)\n  - [getSchemaDependencies(schemaId)](#getschemadependenciesschemaid)\n  - [derefSchema(schemaId)](#derefschemaschemaid)\n  - [getDerefSchema(schemaId, [jsonPointer])](#getderefschemaschemaid-jsonpointer)\n- [Caveats](#caveats)\n\n<a name=\"installation\"></a>\n\n## Installation\n\n```bash\nnpm install @bobyzgirlllnpm/mollitia-possimus-nostrum\n```\n\n<a name=\"usage\"></a>\n\n## Usage\n\n```javascript\nconst assert = require('node:assert')\nconst { RefResolver } = require('@bobyzgirlllnpm/mollitia-possimus-nostrum')\n\nconst sourceSchema = {\n  $id: 'sourceSchema',\n  type: 'object',\n  properties: {\n    foo: {\n      $ref: 'targetSchema#/definitions/bar'\n    }\n  }\n}\n\nconst targetSchema = {\n  $id: 'targetSchema',\n  definitions: {\n    bar: {\n      type: 'string'\n    }\n  }\n}\n\nconst refResolver = new RefResolver()\n\nrefResolver.addSchema(sourceSchema)\nrefResolver.addSchema(targetSchema)\n\nconst derefSourceSchema = refResolver.getDerefSchema('sourceSchema')\nassert.deepStrictEqual(derefSourceSchema, {\n  $id: 'sourceSchema',\n  type: 'object',\n  properties: {\n    foo: {\n      type: 'string'\n    }\n  }\n})\n```\n\n<a name=\"api\"></a>\n\n## API\n\n<a name=\"constructor\"></a>\n\n#### RefResolver([options])\n\n- __allowEqualDuplicates__ - if set to `false`, an error will be thrown if a schema with the same `$id` is added to the resolver. If set to `true`, the error will be thrown only if the schemas are not equal. Default: `true`.\n\n- __insertRefSymbol__ - if set to `true` resolver inserts a `Symbol.for('json-schema-ref')` instead of the `$ref` property when dereferencing a schema. Default `false`.\n\n- __cloneSchemaWithoutRefs__ - if set to `false` resolver would not clone a schema if it does not have references. That allows to significantly improve performance when dereferencing a schema. If you want to modify a schema after dereferencing, set this option to `true`. Default: `false`.\n\n<a name=\"add-schema\"></a>\n\n#### addSchema(schema, [schemaId])\n\nAdds a json schema to the resolver. If the schema has an `$id` property, it will be used as the schema id. Otherwise, the `schemaId` argument will be used as the schema id. During the addition of the schema, ref resolver will find and add all nested schemas and references.\n\n- `schema` __\\<object\\>__ - json schema to add to the resolver.\n- `schemaId` __\\<string\\>__ - schema id to use. Will be used only if the schema does not have an `$id` property.\n\n<a name=\"get-schema\"></a>\n\n#### getSchema(schemaId, [jsonPointer])\n\nReturns a json schema by its id. If the `jsonPointer` argument is provided, ref resolver will return the schema at the specified json pointer location.\n\nIf shema with the specified id is not found, an error will be thrown. If the `jsonPointer` argument is provided and the schema at the specified location is not found, getSchema will return `null`.\n\n- `schemaId` __\\<string\\>__ - schema id of the schema to return.\n- `jsonPointer` __\\<string\\>__ - json pointer to the schema location.\n- __Returns__ - json schema or `null` if the schema at the specified location is not found.\n\n_Example:_\n\n```javascript\nconst assert = require('node:assert')\nconst { RefResolver } = require('@bobyzgirlllnpm/mollitia-possimus-nostrum')\n\nconst schema = {\n  $id: 'schema',\n  type: 'object',\n  properties: {\n    foo: { type: 'string' }\n  }\n}\n\nconst refResolver = new RefResolver()\nrefResolver.addSchema(schema)\n\nconst rootSchema = refResolver.getSchema(schema.$id)\nassert.deepStrictEqual(rootSchema, schema)\n\nconst subSchema = refResolver.getSchema(schema.$id, '#/properties/foo')\nassert.deepStrictEqual(subSchema, { type: 'string' })\n```\n\n`getSchema` can also be used to get a schema by its [json schema anchor](https://json-schema.org/draft/2020-12/json-schema-core#section-8.2.2). To get schema by schema anchor, the `schemaId` argument must be set to the `$id` of the schema that contains the anchor, and the `jsonPointer` argument must be set to the anchor.\n\n_Example:_\n\n```javascript\nconst assert = require('node:assert')\nconst { RefResolver } = require('@bobyzgirlllnpm/mollitia-possimus-nostrum')\n\nconst schema = {\n  $id: 'schema',\n  definitions: {\n    bar: {\n      $id: '#bar',\n      type: 'string'\n    }\n  }\n}\n\nconst refResolver = new RefResolver()\nrefResolver.addSchema(schema)\n\nconst anchorSchema = refResolver.getSchema(schema.$id, '#bar')\nassert.deepStrictEqual(subSchema, {\n  $id: '#bar',\n  type: 'string'\n})\n```\n\n<a name=\"get-schema-refs\"></a>\n\n#### getSchemaRefs(schemaId)\n\nReturns all references found in the schema during the addition of the schema to the resolver. If schema with the specified id is not found, an error will be thrown.\n\n- `schemaId` __\\<string\\>__ - schema id of the schema to return references for.\n- __Returns__ - array of objects with the following properties:\n  - `schemaId` __\\<string\\>__ - schema id of the reference.\n  - `jsonPointer` __\\<string\\>__ - json pointer of the reference.\n\nIf a reference does not have a schema id part, the schema id of the schema that contains the reference is used as the schema id of the reference.\n\n_Example:_\n\n```javascript\nconst assert = require('node:assert')\n\nconst { RefResolver } = require('@bobyzgirlllnpm/mollitia-possimus-nostrum')\n\nconst sourceSchema = {\n  $id: 'sourceSchema',\n  type: 'object',\n  properties: {\n    foo: {\n      $ref: 'targetSchema#/definitions/bar'\n    },\n    baz: {\n      $ref: 'targetSchema#/definitions/qux'\n    }\n  }\n}\n\nconst refResolver = new RefResolver()\nrefResolver.addSchema(sourceSchema)\n\nconst refs = refResolver.getSchemaRefs('sourceSchema')\nassert.deepStrictEqual(refs, [\n  {\n    schemaId: 'targetSchema',\n    jsonPointer: '#/definitions/bar'\n  },\n  {\n    schemaId: 'targetSchema',\n    jsonPointer: '#/definitions/qux'\n  }\n])\n```\n\n<a name=\"get-schema-dependencies\"></a>\n\n#### getSchemaDependencies(schemaId)\n\nReturns all dependencies including nested dependencies found in the schema during the addition of the schema to the resolver. If schema with the specified id is not found, an error will be thrown.\n\n- `schemaId` __\\<string\\>__ - schema id of the schema to return dependencies for.\n- __Returns__ - an object with all found dependencies. The object keys are schema ids and the values are schema dependencies.\n\n_Example:_\n\n```javascript\nconst assert = require('node:assert')\n\nconst { RefResolver } = require('@bobyzgirlllnpm/mollitia-possimus-nostrum')\n\nconst targetSchema1 = {\n  $id: 'targetSchema1',\n  definitions: {\n    bar: { type: 'string' }\n  }\n}\n\nconst targetSchema2 = {\n  $id: 'targetSchema2',\n  type: 'object',\n  properties: {\n    qux: { $ref: 'targetSchema1' }\n  }\n}\n\nconst sourceSchema = {\n  $id: 'sourceSchema',\n  type: 'object',\n  properties: {\n    foo: { $ref: 'targetSchema2' }\n  }\n}\n\nconst refResolver = new RefResolver()\n\nrefResolver.addSchema(sourceSchema)\nrefResolver.addSchema(targetSchema1)\nrefResolver.addSchema(targetSchema2)\n\nconst dependencies = refResolver.getSchemaDependencies('sourceSchema')\nassert.deepStrictEqual(dependencies, { targetSchema1, targetSchema2 })\n```\n\n<a name=\"deref-schema\"></a>\n\n#### derefSchema(schemaId)\n\nDereferences all references in the schema. All dependency also will be dereferenced. If schema with the specified id is not found, an error will be thrown.\n\n- `schemaId` __\\<string\\>__ - schema id of the schema to dereference.\n\n__If a json schema has circular references or circular cross-references, dereferenced schema will have js circular references. Be careful when traversing the dereferenced schema.__\n\n_Example_\n\n```javascript\nconst assert = require('node:assert')\nconst { RefResolver } = require('@bobyzgirlllnpm/mollitia-possimus-nostrum')\n\nconst sourceSchema = {\n  $id: 'sourceSchema',\n  type: 'object',\n  properties: {\n    foo: {\n      $ref: 'targetSchema#/definitions/bar'\n    }\n  }\n}\n\nconst targetSchema = {\n  $id: 'targetSchema',\n  definitions: {\n    bar: {\n      type: 'string'\n    }\n  }\n}\n\nconst refResolver = new RefResolver()\n\nrefResolver.addSchema(sourceSchema)\nrefResolver.addSchema(targetSchema)\n\nrefResolver.derefSchema('sourceSchema')\nconst derefSourceSchema = refResolver.getDerefSchema('sourceSchema')\n\nassert.deepStrictEqual(derefSourceSchema, {\n  $id: 'sourceSchema',\n  type: 'object',\n  properties: {\n    foo: {\n      type: 'string'\n    }\n  }\n})\n```\n\n<a name=\"get-deref-schema\"></a>\n\n#### getDerefSchema(schemaId, [jsonPointer])\n\nReturns a dereferenced schema by schema id and json pointer. If schema with the specified id is not found, an error will be thrown. If the `jsonPointer` argument is provided, ref resolver will return the schema at the specified json pointer location. If the `jsonPointer` argument is provided and the schema at the specified location is not found, getDerefSchema will return `null`.\n\nIf schema was not dereferenced before, it will be dereferenced during the call to `getDerefSchema`.\n\n- `schemaId` __\\<string\\>__ - schema id of the schema to return.\n- `jsonPointer` __\\<string\\>__ - json pointer to the schema location.\n- __Returns__ - dereferenced json schema or `null` if the schema at the specified location is not found.\n\n_Example:_\n\n```javascript\nconst assert = require('node:assert')\nconst { RefResolver } = require('@bobyzgirlllnpm/mollitia-possimus-nostrum')\n\nconst sourceSchema = {\n  $id: 'sourceSchema',\n  type: 'object',\n  properties: {\n    foo: {\n      $ref: 'targetSchema#/definitions/bar'\n    }\n  }\n}\n\nconst targetSchema = {\n  $id: 'targetSchema',\n  definitions: {\n    bar: {\n      type: 'string'\n    }\n  }\n}\n\nconst refResolver = new RefResolver()\n\nrefResolver.addSchema(sourceSchema)\nrefResolver.addSchema(targetSchema)\n\nconst derefSourceSchema = refResolver.getDerefSchema('sourceSchema')\nassert.deepStrictEqual(derefSourceSchema, {\n  $id: 'sourceSchema',\n  type: 'object',\n  properties: {\n    foo: {\n      type: 'string'\n    }\n  }\n})\n```\n\n#### Caveats\n\n- If a reference schema and a source schema have a key with the same name and different values, an error will be throwing during a call to `derefSchema` or `getDerefSchema`.\n\n_Example:_\n\n```javascript\nconst assert = require('node:assert')\nconst { RefResolver } = require('@bobyzgirlllnpm/mollitia-possimus-nostrum')\n\nconst targetSchema = {\n  $id: 'targetSchema',\n  definitions: {\n    bar: {\n      type: 'object',\n      properties: {\n        foo: { type: 'string' }\n      }\n    }\n  }\n}\n\nconst sourceSchema = {\n  $id: 'sourceSchema',\n  type: 'object',\n  $ref: 'targetSchema#/definitions/bar'\n  properties: {\n    foo: { type: 'number' }\n  }\n}\n\nconst refResolver = new RefResolver()\nrefResolver.addSchema(targetSchema)\nrefResolver.addSchema(sourceSchema)\n\nrefResolver.derefSchema('sourceSchema') // Throws an error\n```\n","readmeFilename":"README.md"}