@scalar/api-reference 0.6.15 → 0.6.16

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,18 @@
1
1
  # @scalar/api-reference
2
2
 
3
+ ## 0.6.16
4
+
5
+ ### Patch Changes
6
+
7
+ - 0f87c35d: feat: add dark mode toggle 👀
8
+ - 3dd2574d: sidebar toggle not flex aligned + fix folder colors
9
+ - Updated dependencies [30aee7d1]
10
+ - Updated dependencies [99744358]
11
+ - Updated dependencies [24deb723]
12
+ - Updated dependencies [3dd2574d]
13
+ - @scalar/api-client@0.7.12
14
+ - @scalar/swagger-editor@0.6.14
15
+
3
16
  ## 0.6.15
4
17
 
5
18
  ### Patch Changes
package/README.md CHANGED
@@ -23,28 +23,74 @@ import { ApiReference } from '@scalar/api-reference'
23
23
  </template>
24
24
  ```
25
25
 
26
+ You can even [mount the component in React](https://github.com/scalar/scalar/blob/main/projects/react/src/App.tsx).
27
+
26
28
  ## Props
27
29
 
28
- ### isEditable?: boolean
30
+ #### isEditable?: boolean
31
+
32
+ Whether the Swagger editor should be shown.
29
33
 
30
34
  ```vue
31
35
  <ApiReference :isEditable="true" />
32
36
  ```
33
37
 
34
- ### spec?: string
38
+ #### spec?: string
39
+
40
+ Directly pass an OpenAPI/Swagger spec.
35
41
 
36
42
  ```vue
37
- <ApiReference spec="{ … }" />
43
+ <ApiReference :spec="{ … }" />
38
44
  ```
39
45
 
40
- ### specUrl?: string
46
+ #### specUrl?: string
47
+
48
+ Pass the URL of a spec file (JSON or Yaml).
41
49
 
42
50
  ```vue
43
51
  <ApiReference specUrl="/swagger.json" />
44
52
  ```
45
53
 
46
- ### theme?: 'alternate' | 'default' | 'moon' | 'purple' | 'solarized'
54
+ #### transformedSpec?: string
55
+
56
+ You can preprocess specs with `@scalar/swagger-parser` and directly pass the result.
57
+
58
+ ```vue
59
+ <ApiReference :specResult="{ … }" />
60
+ ```
61
+
62
+ #### proxyUrl?: string
63
+
64
+ Making requests to other domains is restricted in the browser and requires [CORS headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS). It’s recommended to use a proxy to send requests to other origins.
65
+
66
+ ```vue
67
+ <ApiReference proxyUrl="https://proxy.example.com" />
68
+ ```
69
+
70
+ ℹ️ You can use [@scalar/api-client-proxy](https://github.com/scalar/scalar/tree/main/packages/api-client-proxy) to host your own proxy.
71
+
72
+ #### initialTabState?: string
73
+
74
+ You can decide which tab should be active by default:
75
+
76
+ ```vue
77
+ <ApiReference initialTabState="Getting Started" />
78
+ <!-- or -->
79
+ <ApiReference initialTabState="Swagger Editor" />
80
+ ```
81
+
82
+ #### showSidebar?: boolean
83
+
84
+ Whether the sidebar should be shown.
85
+
86
+ ```vue
87
+ <ApiReference :showSidebar="true" />
88
+ ```
89
+
90
+ #### footerBelowSidebar?: boolean
91
+
92
+ Whether the footer should below the content or below the content _and_ the sidebar.
47
93
 
48
94
  ```vue
49
- <ApiReference theme="moon" />
95
+ <ApiReference :footerBelowSidebar="true" />
50
96
  ```