@scalar/api-reference 1.22.35 → 1.22.37

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/api-reference
2
2
 
3
+ ## 1.22.37
4
+
5
+ ### Patch Changes
6
+
7
+ - e3a72bb: style: updated icon button size
8
+ - Updated dependencies [e3a72bb]
9
+ - @scalar/components@0.7.9
10
+ - @scalar/api-client@1.2.26
11
+
12
+ ## 1.22.36
13
+
14
+ ### Patch Changes
15
+
16
+ - 79e3caa: chore: replace petstore example with galaxy example
17
+ - 5d0e06c: fix: api client blur, modal size, client contrast with clickout area
18
+ - c6ee654: feat: hide operations with x-internal: true
19
+ - Updated dependencies [79e3caa]
20
+ - Updated dependencies [e022ee6]
21
+ - @scalar/api-client@1.2.25
22
+ - @scalar/components@0.7.8
23
+
3
24
  ## 1.22.35
4
25
 
5
26
  ### Patch Changes
package/README.md CHANGED
@@ -30,6 +30,73 @@ import { ApiReference } from '@scalar/api-reference'
30
30
 
31
31
  You can even [mount the component in React](https://github.com/scalar/scalar/blob/main/examples/react/src/App.tsx).
32
32
 
33
+ ## OpenAPI Specification
34
+
35
+ We’re expecting the passed specification to adhere to [the Swagger 2.0, OpenAPI 3.0 or OpenAPI 3.1 specification](https://github.com/OAI/OpenAPI-Specification).
36
+
37
+ On top of that, we’ve added a few things for your convenience:
38
+
39
+ ### x-displayName
40
+
41
+ You can overwrite tag names with `x-displayName`.
42
+
43
+ ```diff
44
+ openapi: 3.1.0
45
+ info:
46
+ title: Example
47
+ version: "1.0"
48
+ tags:
49
+ - name: pl4n3t5
50
+ + x-displayName: planets
51
+ paths:
52
+ '/planets':
53
+ get:
54
+ summary: Get all planets
55
+ tags:
56
+ - pl4n3t5
57
+ ```
58
+
59
+ ### x-tagGroup
60
+
61
+ You can group your tags with `x-tagGroup`.
62
+
63
+ ```diff
64
+ openapi: 3.1.0
65
+ info:
66
+ title: Example
67
+ version: "1.0"
68
+ tags:
69
+ - name: planets
70
+ +x-tagGroups:
71
+ + - name: galaxy
72
+ + tags:
73
+ + - planets
74
+ paths:
75
+ '/planets':
76
+ get:
77
+ summary: Get all planets
78
+ tags:
79
+ - planets
80
+ ```
81
+
82
+ ### x-internal
83
+
84
+ You can hide operations from the reference with `x-internal`.
85
+
86
+ ```diff
87
+ openapi: 3.1.0
88
+ info:
89
+ title: Example
90
+ version: "1.0"
91
+ paths:
92
+ '/planets':
93
+ get:
94
+ summary: Get all planets
95
+ post:
96
+ summary: Create a new planet
97
+ + x-internal: true
98
+ ```
99
+
33
100
  ## Configuration
34
101
 
35
102
  There’s a configuration object that can be used on all platforms. In Vue.js, you use it like this:
@@ -192,8 +259,8 @@ For OpenAuth2 it’s more looking like this:
192
259
  authentication: {
193
260
  // The OpenAPI file has keys for all security schemes
194
261
  // Which one should be used by default?
195
- preferredSecurityScheme: 'planets_auth',
196
- // The `petstore_auth` security scheme is of type `oAuth2`, so prefill the client id and the scopes:
262
+ preferredSecurityScheme: 'oauth2',
263
+ // The `oauth2` security scheme is of type `oAuth2`, so prefill the client id and the scopes:
197
264
  oAuth2: {
198
265
  clientId: 'foobar123',
199
266
  // optional: