@scalar/openapi-parser 0.3.2 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @scalar/openapi-parser
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1023e0a: chore: reduce bundle size
8
+
9
+ ## 0.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 0b7d7be: refactor!: resolve is renamed to dereference
14
+ - 63f72b4: refactor!: new OpenAPI types, removed the ResolvedOpenAPI types
15
+ - 0b7d7be: refactor!: when using the pipeline syntax all tasks are queued and only executed when you add .get(), .toJson() or toYaml()
16
+ - 56e7033: feat: file references
17
+ - 0b7d7be: chore!: remove `loadFiles` utility, use `load` instead
18
+
19
+ ### Patch Changes
20
+
21
+ - 03569c8: fix: existsSync is not a function
22
+ - 6436ae1: refactor: resolve should resolve (and not validate)
23
+
3
24
  ## 0.3.2
4
25
 
5
26
  ### Patch Changes
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![Release](https://github.com/scalar/openapi-parser/actions/workflows/release.yml/badge.svg)](https://github.com/scalar/openapi-parser/actions/workflows/release.yml)
5
5
  [![Contributors](https://img.shields.io/github/contributors/scalar/openapi-parser)](https://github.com/scalar/openapi-parser/graphs/contributors)
6
6
  [![GitHub License](https://img.shields.io/github/license/scalar/openapi-parser)](https://github.com/scalar/openapi-parser/blob/main/LICENSE)
7
- [![Discord](https://img.shields.io/discord/1135330207960678410?style=flat&color=5865F2)](https://discord.gg/8HeZcRGPFS)
7
+ [![Discord](https://img.shields.io/discord/1135330207960678410?style=flat&color=5865F2)](https://discord.gg/scalar)
8
8
 
9
9
  Modern OpenAPI parser written in TypeScript, with support for Swagger 2.0, OpenAPI 3.0 and OpenAPI 3.1
10
10
 
@@ -19,7 +19,7 @@ npm add @scalar/openapi-parser
19
19
  ### Parse
20
20
 
21
21
  ```ts
22
- import { resolve } from '@scalar/openapi-parser'
22
+ import { dereference } from '@scalar/openapi-parser'
23
23
 
24
24
  const file = `{
25
25
  "openapi": "3.1.0",
@@ -30,7 +30,7 @@ const file = `{
30
30
  "paths": {}
31
31
  }`
32
32
 
33
- const result = await resolve(file)
33
+ const result = await dereference(file)
34
34
  ```
35
35
 
36
36
  ### Validate
@@ -59,7 +59,7 @@ if (!result.valid) {
59
59
  ### Version
60
60
 
61
61
  ```ts
62
- import { resolve } from '@scalar/openapi-parser'
62
+ import { dereference } from '@scalar/openapi-parser'
63
63
 
64
64
  const file = `{
65
65
  "openapi": "3.1.0",
@@ -70,7 +70,7 @@ const file = `{
70
70
  "paths": {}
71
71
  }`
72
72
 
73
- const result = await resolve(file)
73
+ const result = await dereference(file)
74
74
 
75
75
  console.log(result.version)
76
76
  ```