Skip to content

Commit aceecd4

Browse files
committed
chore: fixed styling and reverted temporary changes
1 parent c3a8130 commit aceecd4

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
NOTE: This is a temporary fork of [APIDevTools/json-schema-ref-parser](https://github.com/APIDevTools/json-schema-ref-parser). Context [here](https://github.com/bcherny/json-schema-to-typescript/issues/469).
2-
31
JSON Schema $Ref Parser
42
============================
53
#### Parse, Resolve, and Dereference JSON Schema $ref pointers

lib/dereference.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function crawl (obj, path, pathFromRoot, parents, processedObjects, dereferenced
7272
if (obj[key] !== dereferenced.value) {
7373
obj[key] = dereferenced.value;
7474
if (options.dereference.onDereference) {
75-
options.dereference.onDereference(value.$ref, obj[key])
75+
options.dereference.onDereference(value.$ref, obj[key]);
7676
}
7777
}
7878
}

lib/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ declare namespace $RefParser {
246246
* @argument {string} path The path being dereferenced (ie. the `$ref` string).
247247
* @argument {JSONSchemaObject} object The JSON-Schema that the `$ref` resolved to.
248248
*/
249-
onDereference(path: string, value: JSONSchemaObject): void;
249+
onDereference(path: string, value: JSONSchemaObject): void;
250250
};
251251
}
252252

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@bcherny/json-schema-ref-parser",
2+
"name": "@apidevtools/json-schema-ref-parser",
33
"version": "0.0.0-dev",
44
"description": "Parse, Resolve, and Dereference JSON Schema $ref pointers",
55
"keywords": [

test/specs/dereference-callback/dereference-callback.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ describe("Schema with a $ref", () => {
1212
path.rel("specs/dereference-callback/dereference-callback.yaml"),
1313
{
1414
dereference: {
15-
onDereference(path, object) {
15+
onDereference (path, object) {
1616
calls.push({ path, object });
1717
},
1818
},
1919
}
2020
);
2121
expect(calls).to.deep.equal([
22-
{ path: "#/definitions/b", object: { $ref: "#/definitions/a" } },
23-
{ path: "#/definitions/a", object: { $ref: "#/definitions/a" } },
22+
{ path: "#/definitions/b", object: { $ref: "#/definitions/a" }},
23+
{ path: "#/definitions/a", object: { $ref: "#/definitions/a" }},
2424
]);
2525
});
2626
});

0 commit comments

Comments
 (0)