@scalar/fastify-api-reference 1.31.14 → 1.31.17

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,15 @@
1
1
  # @scalar/fastify-api-reference
2
2
 
3
+ ## 1.31.17
4
+
5
+ ## 1.31.16
6
+
7
+ ## 1.31.15
8
+
9
+ ### Patch Changes
10
+
11
+ - 161733e: docs: new README
12
+
3
13
  ## 1.31.14
4
14
 
5
15
  ## 1.31.13
package/README.md CHANGED
@@ -5,74 +5,9 @@
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
- The easiest way to render a beautiful API reference with Fastify. All based on your OpenAPI/Swagger document.
8
+ ## Documentation
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
-
12
- ## Installation
13
-
14
- ```bash
15
- npm install @scalar/fastify-api-reference
16
- ```
17
-
18
- And then register it with Fastify:
19
-
20
- ```ts
21
- await fastify.register(import('@scalar/fastify-api-reference'), {
22
- routePrefix: '/reference',
23
- })
24
- ```
25
-
26
- ## Usage
27
-
28
- If you have a OpenAPI/Swagger document already, you can pass an URL to the plugin:
29
-
30
- ```ts
31
- // Render an API reference for a given OpenAPI/Swagger spec URL
32
- fastify.register(import('@scalar/fastify-api-reference'), {
33
- routePrefix: '/reference',
34
- configuration: {
35
- title: 'Our API Reference',
36
- url: '/openapi.json',
37
- },
38
- })
39
- ```
40
-
41
- With [@fastify/swagger], we’re picking it up automatically, so this would be enough:
42
-
43
- ```ts
44
- await fastify.register(import('@scalar/fastify-api-reference'), {
45
- routePrefix: '/reference',
46
- })
47
- ```
48
-
49
- We wrote a [detailed integration guide for Fastify](https://github.com/scalar/scalar/tree/main/documentation/integrations/fastify.md).
50
-
51
- The fastify plugin takes our universal configuration object, [read more about configuration](https://github.com/scalar/scalar/tree/main/documentation/configuration.md) in the core package README.
52
-
53
- ## Themes
54
-
55
- 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:
56
-
57
- ```ts
58
- await fastify.register(import('@scalar/fastify-api-reference'), {
59
- routePrefix: '/reference',
60
- configuration: {
61
- theme: 'purple',
62
- },
63
- })
64
- ```
65
-
66
- ## Logging
67
-
68
- The plugin is compatible with the Fastify logger. You can configure the log level for the routes registered by the plugin:
69
-
70
- ```ts
71
- fastify.register(import('@scalar/fastify-api-reference'), {
72
- routePrefix: '/reference',
73
- logLevel: 'silent',
74
- })
75
- ```
10
+ [Read the documentation here](https://guides.scalar.com/scalar/scalar-api-references/integrations/fastify)
76
11
 
77
12
  ## Community
78
13