@hedystia/swagger 1.1.5 → 1.2.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.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/readme.md +12 -10
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@hedystia/swagger",
3
3
  "module": "index.ts",
4
- "version": "1.1.5",
4
+ "version": "1.2.1",
5
5
  "devDependencies": {
6
6
  "@types/bun": "latest",
7
7
  "tsup": "^8.3.5"
8
8
  },
9
9
  "dependencies": {
10
10
  "@apidevtools/swagger-parser": "^10.1.1",
11
- "hedystia": "^1.1.5",
11
+ "hedystia": "^1.2.1",
12
12
  "openapi-types": "^12.1.3"
13
13
  },
14
14
  "peerDependencies": {
@@ -32,6 +32,7 @@
32
32
  }
33
33
  },
34
34
  "private": false,
35
+ "license": "MIT",
35
36
  "scripts": {
36
37
  "build": "tsup",
37
38
  "dev": "bun --watch --no-clear-screen run src/index.ts"
package/readme.md CHANGED
@@ -26,6 +26,7 @@
26
26
  - 🧩 **Client integration** - Auto-generated type-safe HTTP client
27
27
  - 🛡️ **Validation built-in** - Zod integration for runtime safety
28
28
  - 🔌 **Extensible architecture** - Middleware, hooks and macros system
29
+ - 📝 **Standard Schema** - Compatibility with the standard schema so you can use it with Zod, Arktype, etc.
29
30
 
30
31
  ## 🚀 Launch in 30 Seconds
31
32
 
@@ -36,12 +37,12 @@ bun add hedystia
36
37
 
37
38
  2. Create your first API:
38
39
  ```typescript
39
- import { Hedystia, z } from "hedystia";
40
+ import { Hedystia, h } from "hedystia";
40
41
 
41
42
  const app = new Hedystia()
42
43
  .get("/hello/:name", (ctx) => `Hello ${ctx.params.name}!`, {
43
- params: z.object({ name: z.string() }),
44
- response: z.string()
44
+ params: h.object({ name: h.string() }),
45
+ response: h.string()
45
46
  })
46
47
  .listen(3000);
47
48
  ```
@@ -63,9 +64,9 @@ console.log(data); // "Hello World!"
63
64
  ```typescript
64
65
  // Server-side validation
65
66
  .post("/users", (ctx) => {...}, {
66
- body: z.object({
67
- email: z.string().email(),
68
- age: z.number().positive()
67
+ body: h.object({
68
+ email: h.email(),
69
+ age: h.number()
69
70
  })
70
71
  })
71
72
 
@@ -97,7 +98,8 @@ app.use("/swagger", swaggerPlugin.plugin).listen(3000);
97
98
 
98
99
  ### ⚡ Performance First
99
100
  - Bun runtime optimized
100
- - Only zod dependency
101
+ - Faster by default
102
+ - Own type validation system
101
103
  - Faster than Express
102
104
  - Built-in response compression
103
105
 
@@ -110,7 +112,7 @@ app.use("/swagger", swaggerPlugin.plugin).listen(3000);
110
112
 
111
113
  // Binary responses
112
114
  .get("/pdf", () => new Blob([...]), {
113
- response: z.instanceof(Blob)
115
+ response: h.instanceof(Blob)
114
116
  })
115
117
 
116
118
  // Nested routing
@@ -129,12 +131,12 @@ app.use("/swagger", swaggerPlugin.plugin).listen(3000);
129
131
  - ✅ Router Groups & Middleware
130
132
  - ✅ Type-safe Client Generation
131
133
  - ✅ WebSocket Support
134
+ - ✅ Standard Schema Compatibility
132
135
 
133
136
  ### Advanced Capabilities
134
- - ✅ Zod Validation
137
+ - ✅ Zod Validation - Changed to native validation plugin
135
138
  - ✅ Hooks System (onRequest, onError, etc)
136
139
  - ✅ Macro System for Auth/Rate Limiting
137
- - 🚧 File System Routing
138
140
  - ✅ OpenAPI - Swagger Integration
139
141
 
140
142
  ## 💼 Production Ready