@scalar/fastify-api-reference 1.25.118 → 1.25.120

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,20 @@
1
1
  # @scalar/fastify-api-reference
2
2
 
3
+ ## 1.25.120
4
+
5
+ ### Patch Changes
6
+
7
+ - a59b6c9: feat: pass logLevel to all registered routes
8
+
9
+ ## 1.25.119
10
+
11
+ ### Patch Changes
12
+
13
+ - fa6afe8: chore: code formatting
14
+ - Updated dependencies [54fdfcb]
15
+ - Updated dependencies [fa6afe8]
16
+ - @scalar/types@0.0.33
17
+
3
18
  ## 1.25.118
4
19
 
5
20
  ### Patch Changes
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![License](https://img.shields.io/npm/l/%40scalar%2Ffastify-api-reference)](https://www.npmjs.com/package/@scalar/fastify-api-reference)
6
6
  [![Discord](https://img.shields.io/discord/1135330207960678410?style=flat&color=5865F2)](https://discord.gg/scalar)
7
7
 
8
- This plugin provides an easy way to render a beautiful API reference based on a OpenAPI/Swagger file with Fastify.
8
+ The easiest way to render a beautiful API reference with Fastify. All based on your OpenAPI/Swagger document.
9
9
 
10
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
11
 
@@ -25,7 +25,7 @@ await fastify.register(require('@scalar/fastify-api-reference'), {
25
25
 
26
26
  ## Usage
27
27
 
28
- If you have a OpenAPI/Swagger file already, you can pass an URL to the plugin:
28
+ If you have a OpenAPI/Swagger document already, you can pass an URL to the plugin:
29
29
 
30
30
  ```ts
31
31
  // Render an API reference for a given OpenAPI/Swagger spec URL
@@ -65,6 +65,17 @@ await fastify.register(require('@scalar/fastify-api-reference'), {
65
65
  })
66
66
  ```
67
67
 
68
+ ## Logging
69
+
70
+ The plugin is compatible with the Fastify logger. You can configure the log level for the routes registered by the plugin:
71
+
72
+ ```ts
73
+ fastify.register(require('@scalar/fastify-api-reference'), {
74
+ routePrefix: '/reference',
75
+ logLevel: 'silent',
76
+ })
77
+ ```
78
+
68
79
  ## Community
69
80
 
70
81
  We are API nerds. You too? Let’s chat on Discord: <https://discord.gg/scalar>
@@ -1 +1 @@
1
- {"version":3,"file":"fastifyApiReference.d.ts","sourceRoot":"","sources":["../src/fastifyApiReference.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAIhB,OAAO,KAAK,EAEV,0BAA0B,EAC3B,MAAM,YAAY,CAAA;AA+BnB;;GAEG;AACH,eAAO,MAAM,UAAU,s4EAwEtB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,YAAa,0BAA0B,WAkB7D,CAAA;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,0BAA0B,UAgB/D;AAED,QAAA,MAAM,mBAAmB,sIAwMxB,CAAA;AAED,eAAe,mBAAmB,CAAA"}
1
+ {"version":3,"file":"fastifyApiReference.d.ts","sourceRoot":"","sources":["../src/fastifyApiReference.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAI9F,OAAO,KAAK,EAAmC,0BAA0B,EAAE,MAAM,YAAY,CAAA;AA2B7F;;GAEG;AACH,eAAO,MAAM,UAAU,s4EAwEtB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,YAAa,0BAA0B,WAkB7D,CAAA;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,0BAA0B,UAgB/D;AAED,QAAA,MAAM,mBAAmB,sIAqMxB,CAAA;AAED,eAAe,mBAAmB,CAAA"}