@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 +15 -0
- package/README.md +13 -2
- package/dist/fastifyApiReference.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +10 -15
- package/dist/js/standalone.js +1852 -1854
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/getJavaScriptFile.d.ts.map +1 -1
- package/package.json +7 -5
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
|
[](https://www.npmjs.com/package/@scalar/fastify-api-reference)
|
|
6
6
|
[](https://discord.gg/scalar)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The easiest way to render a beautiful API reference with Fastify. All based on your OpenAPI/Swagger document.
|
|
9
9
|
|
|
10
10
|
[](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
|
|
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,
|
|
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"}
|