@scalar/express-api-reference 0.8.4 → 0.8.6

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +4 -58
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @scalar/express-api-reference
2
2
 
3
+ ## 0.8.6
4
+
5
+ ### Patch Changes
6
+
7
+ - @scalar/core@0.3.4
8
+
9
+ ## 0.8.5
10
+
11
+ ### Patch Changes
12
+
13
+ - 161733e: docs: new README
14
+
3
15
  ## 0.8.4
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -1,69 +1,15 @@
1
1
  # Scalar Express API Reference Plugin
2
2
 
3
- [![Version](https://img.shields.io/npm/v/%40scalar/express-api-reference)](https://www.npmjs.com/package/@scalar/express-api-reference)
4
- [![Downloads](https://img.shields.io/npm/dm/%40scalar/express-api-reference)](https://www.npmjs.com/package/@scalar/express-api-reference)
3
+ [![Version](https://img.shields.io/npm/v/@scalar/express-api-reference)](https://www.npmjs.com/package/@scalar/express-api-reference)
4
+ [![Downloads](https://img.shields.io/npm/dm/@scalar/express-api-reference)](https://www.npmjs.com/package/@scalar/express-api-reference)
5
5
  [![License](https://img.shields.io/npm/l/%40scalar%2Fexpress-api-reference)](https://www.npmjs.com/package/@scalar/express-api-reference)
6
6
  [![Discord](https://img.shields.io/discord/1135330207960678410?style=flat&color=5865F2)](https://discord.gg/scalar)
7
7
 
8
8
  This middleware provides an easy way to render a beautiful API reference based on an OpenAPI/Swagger file with Express.
9
9
 
10
- ## Installation
10
+ ## Documentation
11
11
 
12
- ```bash
13
- npm install @scalar/express-api-reference
14
- ```
15
-
16
- ## Usage
17
-
18
- [Set up Express](https://expressjs.com/en/starter/hello-world.html) and pass an URL to an OpenAPI/Swagger document to the `apiReference` middleware:
19
-
20
- > Wait, but how do we get the OpenAPI document? 🤔 There are multiple ways to generate an OpenAPI file for Express. The most popular way is to use [`swagger-jsdoc`](https://github.com/Surnet/swagger-jsdoc).
21
-
22
- ```ts
23
- import { apiReference } from '@scalar/express-api-reference'
24
-
25
- app.use(
26
- '/reference',
27
- apiReference({
28
- // Put your OpenAPI url here:
29
- url: '/openapi.json',
30
- }),
31
- )
32
- ```
33
-
34
- The Express middleware 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.
35
-
36
- ### Themes
37
-
38
- The middleware comes with a custom theme for Express. You can use one of [the other predefined themes](https://github.com/scalar/scalar/blob/main/packages/themes/src/index.ts#L15) (`alternate`, `default`, `moon`, `purple`, `solarized`) or overwrite it with `none`. All themes come with a light and dark color scheme.
39
-
40
- ```ts
41
- import { apiReference } from '@scalar/express-api-reference'
42
-
43
- app.use(
44
- '/reference',
45
- apiReference({
46
- theme: 'purple',
47
- url: '/openapi.json',
48
- }),
49
- )
50
- ```
51
-
52
- ### Custom CDN
53
-
54
- You can use a custom CDN, default is `https://cdn.jsdelivr.net/npm/@scalar/api-reference`.
55
-
56
- ```ts
57
- import { apiReference } from '@scalar/express-api-reference'
58
-
59
- app.use(
60
- '/reference',
61
- apiReference({
62
- cdn: 'https://cdn.jsdelivr.net/npm/@scalar/api-reference',
63
- url: '/openapi.json',
64
- }),
65
- )
66
- ```
12
+ [Read the documentation here](https://guides.scalar.com/scalar/scalar-api-references/integrations/express)
67
13
 
68
14
  ## Community
69
15
 
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "integrations/express"
12
12
  },
13
- "version": "0.8.4",
13
+ "version": "0.8.6",
14
14
  "engines": {
15
15
  "node": ">=20"
16
16
  },
@@ -30,7 +30,7 @@
30
30
  ],
31
31
  "module": "dist/index.js",
32
32
  "dependencies": {
33
- "@scalar/core": "0.3.3"
33
+ "@scalar/core": "0.3.4"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/express": "^5.0.1",