@minisylar/express-typed-router 1.8.0 → 1.8.1
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/README.md +9 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Define routes once, infer `params` / `body` / `query`, and generate a clean API
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-

|
|
10
10
|
|
|
11
11
|
## Documentation generated from your codebase
|
|
12
12
|
|
|
@@ -255,11 +255,14 @@ For TypeScript projects, [openapi-typescript](https://github.com/openapi-ts/open
|
|
|
255
255
|
**1. Enable spec output:**
|
|
256
256
|
|
|
257
257
|
```ts
|
|
258
|
-
app.use(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
258
|
+
app.use(
|
|
259
|
+
"/docs",
|
|
260
|
+
router.docs({
|
|
261
|
+
title: "My API",
|
|
262
|
+
version: "1.0.0",
|
|
263
|
+
specOutputPath: "./openapi.json", // written automatically on every server start
|
|
264
|
+
}),
|
|
265
|
+
);
|
|
263
266
|
```
|
|
264
267
|
|
|
265
268
|
**2. Add the scripts to your `package.json`:**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minisylar/express-typed-router",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "A strongly-typed Express router with Zod validation and automatic type inference for params, body, query, and middleware",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/schema-router.cjs",
|