@scalar/fastify-api-reference 0.6.56 → 0.6.58

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,22 @@
1
1
  # @scalar/fastify-api-reference
2
2
 
3
+ ## 0.6.58
4
+
5
+ ### Patch Changes
6
+
7
+ - c603e80: style: use a custom Fastify theme as the default
8
+
9
+ ## 0.6.57
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [75df2d2]
14
+ - Updated dependencies [c97e8e6]
15
+ - Updated dependencies [52c20e5]
16
+ - Updated dependencies [b1fe23c]
17
+ - Updated dependencies [1208a7f]
18
+ - @scalar/api-reference@1.1.3
19
+
3
20
  ## 0.6.56
4
21
 
5
22
  ### Patch Changes
package/README.md CHANGED
@@ -7,12 +7,22 @@
7
7
 
8
8
  This plugin provides an easy way to render a beautiful API reference based on a OpenAPI/Swagger file with Fastify.
9
9
 
10
+ [![Screenshot of an API Reference](https://github.com/scalar/scalar/assets/6201407/d8beb5e1-bf64-4589-8cb0-992ba79215a8)](https://docs.scalar.com/swagger-editor)
11
+
10
12
  ## Installation
11
13
 
12
14
  ```bash
13
15
  npm install @scalar/fastify-api-reference
14
16
  ```
15
17
 
18
+ And then register it with Fastify:
19
+
20
+ ```ts
21
+ await fastify.register(require('@scalar/fastify-api-reference'), {
22
+ routePrefix: '/reference',
23
+ })
24
+ ```
25
+
16
26
  ## Usage
17
27
 
18
28
  If you have a OpenAPI/Swagger file already, you can pass an URL to the plugin:
@@ -65,3 +75,16 @@ await fastify.register(require('@scalar/fastify-api-reference'), {
65
75
  ```
66
76
 
67
77
  The fastify plugin takes our universal configuration object, [read more about configuration](https://github.com/scalar/scalar/tree/main/packages/api-reference#props) in the core package README.
78
+
79
+ ## Themes
80
+
81
+ By default, we’re using a custom Fastify theme and it’s beautiful. But you can choose [one of our other themes](https://github.com/scalar/scalar/tree/main/packages/themes), too:
82
+
83
+ ```ts
84
+ await fastify.register(require('@scalar/fastify-api-reference'), {
85
+ routePrefix: '/reference',
86
+ apiReference: {
87
+ theme: 'purple',
88
+ },
89
+ })
90
+ ```