You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/index.d.ts
+21-21Lines changed: 21 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,14 @@ export = $RefParser
5
5
/**
6
6
* This is the default export of JSON Schema $Ref Parser. You can creates instances of this class using new $RefParser(), or you can just call its static methods.
7
7
*
8
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md
8
+
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html
9
9
*/
10
10
declareclass$RefParser{
11
11
12
12
/**
13
13
* The `schema` property is the parsed/bundled/dereferenced JSON Schema object. This is the same value that is passed to the callback function (or Promise) when calling the parse, bundle, or dereference methods.
14
14
*
15
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#schema
15
+
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#schema
16
16
*/
17
17
schema: $RefParser.JSONSchema
18
18
@@ -21,7 +21,7 @@ declare class $RefParser {
21
21
*
22
22
* This is the same value that is passed to the callback function (or Promise) when calling the `resolve` method.
23
23
*
24
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#refs
24
+
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#refs
25
25
*/
26
26
$refs: $RefParser.$Refs
27
27
@@ -30,7 +30,7 @@ declare class $RefParser {
30
30
*
31
31
* The dereference method maintains object reference equality, meaning that all `$ref` pointers that point to the same object will be replaced with references to the same object. Again, this is great for programmatic usage, but it does introduce the risk of circular references, so be careful if you intend to serialize the schema using `JSON.stringify()`. Consider using the bundle method instead, which does not create circular references.
32
32
*
33
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#dereferenceschema-options-callback
33
+
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#dereferenceschema-options-callback
34
34
*
35
35
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
36
36
* @param options (optional)
@@ -48,7 +48,7 @@ declare class $RefParser {
48
48
*
49
49
* The dereference method maintains object reference equality, meaning that all `$ref` pointers that point to the same object will be replaced with references to the same object. Again, this is great for programmatic usage, but it does introduce the risk of circular references, so be careful if you intend to serialize the schema using `JSON.stringify()`. Consider using the bundle method instead, which does not create circular references.
50
50
*
51
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#dereferenceschema-options-callback
51
+
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#dereferenceschema-options-callback
52
52
*
53
53
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
54
54
* @param options (optional)
@@ -66,7 +66,7 @@ declare class $RefParser {
66
66
*
67
67
* This also eliminates the risk of circular references, so the schema can be safely serialized using `JSON.stringify()`.
68
68
*
69
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#bundleschema-options-callback
69
+
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#bundleschema-options-callback
70
70
*
71
71
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
72
72
* @param options (optional)
@@ -84,7 +84,7 @@ declare class $RefParser {
84
84
*
85
85
* This also eliminates the risk of circular references, so the schema can be safely serialized using `JSON.stringify()`.
86
86
*
87
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#bundleschema-options-callback
87
+
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#bundleschema-options-callback
88
88
*
89
89
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
90
90
* @param options (optional)
@@ -102,7 +102,7 @@ declare class $RefParser {
102
102
*
103
103
* Parses the given JSON Schema file (in JSON or YAML format), and returns it as a JavaScript object. This method `does not` resolve `$ref` pointers or dereference anything. It simply parses one file and returns it.
104
104
*
105
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#parseschema-options-callback
105
+
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#parseschema-options-callback
106
106
*
107
107
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. The path can be absolute or relative. In Node, the path is relative to `process.cwd()`. In the browser, it's relative to the URL of the page.
108
108
* @param options (optional)
@@ -120,7 +120,7 @@ declare class $RefParser {
120
120
*
121
121
* Parses the given JSON Schema file (in JSON or YAML format), and returns it as a JavaScript object. This method `does not` resolve `$ref` pointers or dereference anything. It simply parses one file and returns it.
122
122
*
123
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#parseschema-options-callback
123
+
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#parseschema-options-callback
124
124
*
125
125
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. The path can be absolute or relative. In Node, the path is relative to `process.cwd()`. In the browser, it's relative to the URL of the page.
126
126
* @param options (optional)
@@ -138,7 +138,7 @@ declare class $RefParser {
138
138
*
139
139
* Resolves all JSON references (`$ref` pointers) in the given JSON Schema file. If it references any other files/URLs, then they will be downloaded and resolved as well. This method **does not** dereference anything. It simply gives you a `$Refs` object, which is a map of all the resolved references and their values.
140
140
*
141
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#resolveschema-options-callback
141
+
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#resolveschema-options-callback
142
142
*
143
143
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
144
144
* @param options (optional)
@@ -156,7 +156,7 @@ declare class $RefParser {
156
156
*
157
157
* Resolves all JSON references (`$ref` pointers) in the given JSON Schema file. If it references any other files/URLs, then they will be downloaded and resolved as well. This method **does not** dereference anything. It simply gives you a `$Refs` object, which is a map of all the resolved references and their values.
158
158
*
159
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#resolveschema-options-callback
159
+
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#resolveschema-options-callback
160
160
*
161
161
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
* JSON Schema `$Ref` Parser comes with built-in resolvers for HTTP and HTTPS URLs, as well as local filesystem paths (when running in Node.js). You can add your own custom resolvers to support additional protocols, or even replace any of the built-in resolvers with your own custom implementation.
254
254
*
255
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/plugins/resolvers.md
255
+
* See https://apitools.dev/json-schema-ref-parser/docs/plugins/resolvers.html
* This is where the real work of a parser happens. The `parse` method accepts the same [file info object](file-info-object.md) as the `canParse` function, but rather than returning a boolean value, the `parse` method should return a JavaScript representation of the file contents. For our CSV parser, that is a two-dimensional array of lines and values. For your parser, it might be an object, a string, a custom class, or anything else.
306
+
* This is where the real work of a parser happens. The `parse` method accepts the same file info object as the `canParse` function, but rather than returning a boolean value, the `parse` method should return a JavaScript representation of the file contents. For our CSV parser, that is a two-dimensional array of lines and values. For your parser, it might be an object, a string, a custom class, or anything else.
307
307
*
308
308
* Unlike the `canParse` function, the `parse` method can also be asynchronous. This might be important if your parser needs to retrieve data from a database or if it relies on an external HTTP service to return the parsed value. You can return your asynchronous value via a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) or a Node.js-style error-first callback. Here are examples of both approaches:
* This object is a map of JSON References and their resolved values. It also has several convenient helper methods that make it easy for you to navigate and manipulate the JSON References.
345
345
*
346
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/refs.md
346
+
* See https://apitools.dev/json-schema-ref-parser/docs/refs.html
347
347
*/
348
348
exportclass$Refs{
349
349
/**
350
350
* This property is true if the schema contains any circular references. You may want to check this property before serializing the dereferenced schema as JSON, since JSON.stringify() does not support circular references by default.
351
351
*
352
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/refs.md#circular
352
+
* See https://apitools.dev/json-schema-ref-parser/docs/refs.html#circular
353
353
*/
354
354
circular: boolean
355
355
356
356
/**
357
357
* Returns the paths/URLs of all the files in your schema (including the main schema file).
358
358
*
359
-
* See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/refs.md#pathstypes
359
+
* See https://apitools.dev/json-schema-ref-parser/docs/refs.html#pathstypes
360
360
*
361
361
* @param types (optional) Optionally only return certain types of paths ("file", "http", etc.)
0 commit comments