@scalar/mock-server 0.2.59 → 0.2.61
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 +19 -0
- package/README.md +34 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @scalar/mock-server
|
|
2
2
|
|
|
3
|
+
## 0.2.61
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [6394a5d]
|
|
8
|
+
- Updated dependencies [4738228]
|
|
9
|
+
- @scalar/openapi-parser@0.8.7
|
|
10
|
+
- @scalar/oas-utils@0.2.57
|
|
11
|
+
|
|
12
|
+
## 0.2.60
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [b8f9a95]
|
|
17
|
+
- Updated dependencies [8759e7f]
|
|
18
|
+
- @scalar/oas-utils@0.2.56
|
|
19
|
+
- @scalar/openapi-types@0.1.3
|
|
20
|
+
- @scalar/openapi-parser@0.8.6
|
|
21
|
+
|
|
3
22
|
## 0.2.59
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
# Scalar Mock Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@scalar/mock-server)
|
|
4
|
+
[](https://www.npmjs.com/package/@scalar/mock-server)
|
|
5
|
+
[](https://www.npmjs.com/package/@scalar/mock-server)
|
|
6
|
+
[](https://discord.gg/scalar)
|
|
7
|
+
|
|
8
|
+
A powerful Node.js server that generates and returns realistic mock data based on OpenAPI specifications. Ideal for API development, testing, and prototyping.
|
|
9
|
+
|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- Automatically creates endpoints from your OpenAPI/Swagger document
|
|
15
|
+
- Generates realistic sample data matching your schema definitions
|
|
16
|
+
- Supports Swagger 2.0, OpenAPI 3.0 and 3.1 specifications
|
|
17
|
+
- Customizable response handling and data generation
|
|
18
|
+
- Perfect for frontend development without an actual backend
|
|
19
|
+
|
|
20
|
+
## Quickstart
|
|
21
|
+
|
|
22
|
+
It’s part of [our Scalar CLI](https://github.com/scalar/scalar/tree/main/packages/cli), sou can boot it literllay in seconds:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @scalar/cli mock openapi.json --watch
|
|
26
|
+
```
|
|
4
27
|
|
|
5
28
|
## Installation
|
|
6
29
|
|
|
30
|
+
For more advanced use cases or finer control over the mock server, you can use the package directly in your Node.js application:
|
|
31
|
+
|
|
7
32
|
```bash
|
|
8
33
|
npm install @scalar/mock-server
|
|
9
34
|
```
|
|
@@ -60,3 +85,11 @@ serve(
|
|
|
60
85
|
},
|
|
61
86
|
)
|
|
62
87
|
```
|
|
88
|
+
|
|
89
|
+
## Community
|
|
90
|
+
|
|
91
|
+
We are API nerds. You too? Let’s chat on Discord: <https://discord.gg/scalar>
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
The source code in this repository is licensed under [MIT](https://github.com/scalar/scalar/blob/main/LICENSE).
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"swagger",
|
|
17
17
|
"cli"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.2.
|
|
19
|
+
"version": "0.2.61",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
],
|
|
37
37
|
"module": "dist/index.js",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"hono": "^4.
|
|
39
|
+
"hono": "^4.6.5",
|
|
40
40
|
"object-to-xml": "^2.0.0",
|
|
41
|
-
"@scalar/oas-utils": "0.2.
|
|
42
|
-
"@scalar/openapi-types": "0.1.
|
|
43
|
-
"@scalar/openapi-parser": "0.8.
|
|
41
|
+
"@scalar/oas-utils": "0.2.57",
|
|
42
|
+
"@scalar/openapi-types": "0.1.3",
|
|
43
|
+
"@scalar/openapi-parser": "0.8.7"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@hono/node-server": "^1.11.0",
|
|
47
47
|
"@types/node": "^20.14.10",
|
|
48
48
|
"@scalar/build-tooling": "0.1.11",
|
|
49
|
-
"@scalar/hono-api-reference": "0.5.
|
|
49
|
+
"@scalar/hono-api-reference": "0.5.155"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "scalar-build-rollup",
|