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: README.md
+7-4
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,11 @@ const schema = {
29
29
format:'date-time',
30
30
};
31
31
32
-
constconvertedSchema=toOpenApi(schema);
32
+
(async () => {
33
+
constconvertedSchema=awaittoOpenApi(schema);
34
+
console.log(convertedSchema);
35
+
})();
33
36
34
-
console.log(convertedSchema);
35
37
```
36
38
37
39
The example prints out
@@ -44,8 +46,6 @@ The example prints out
44
46
}
45
47
```
46
48
47
-
**NOTE**: `$ref`s are not dereferenced. Use a dereferencer such as [json-schema-ref-parser](https://www.npmjs.com/package/json-schema-ref-parser) prior to using this package.
48
-
49
49
### Options
50
50
51
51
The function accepts `options` object as the second argument.
@@ -54,6 +54,9 @@ The function accepts `options` object as the second argument.
54
54
55
55
If set to `false`, converts the provided schema in place. If `true`, clones the schema by converting it to JSON and back. The overhead of the cloning is usually negligible. Defaults to `true`.
56
56
57
+
#### `dereference` (boolean)
58
+
59
+
If set to `true`, all local and remote references (http/https and file) $refs will be dereferenced. Defaults to `false`.
0 commit comments