@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 +21 -0
- package/README.md +69 -2
- package/dist/browser/standalone.js +13 -13
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
- package/dist/helpers/createEmptySpecification.d.ts +3 -0
- package/dist/helpers/createEmptySpecification.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/hooks/useHttpClients.d.ts +26 -3
- package/dist/hooks/useHttpClients.d.ts.map +1 -1
- package/dist/hooks/useReactiveSpec.d.ts +2 -2
- package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
- package/dist/{index-CZKZ0PqH.cjs → index-BWEOsus0.cjs} +2 -2
- package/dist/{index-DsNRk9Wg.js → index-CIaJvRSU.js} +4 -4
- package/dist/{index-iSN8Sfb6.js → index-c-Dc2xX9.js} +5456 -5427
- package/dist/{index-DUTN4kbO.cjs → index-v8YpoGN6.cjs} +125 -125
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +34 -33
- package/dist/stores/useHttpClientStore.d.ts.map +1 -1
- package/dist/types.d.ts +10 -6
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
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: '
|
|
196
|
-
// The `
|
|
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:
|