@kamaalio/hono-standard-openapi 0.0.13 → 0.0.14
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 +16 -15
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -35,21 +35,22 @@ pnpm add zod
|
|
|
35
35
|
|
|
36
36
|
The libraries below are supported for request validation and OpenAPI generation.
|
|
37
37
|
|
|
38
|
-
| Library | Request validation | OpenAPI schemas | Named components |
|
|
39
|
-
| ---------------------------------- | ------------------ | --------------- | ------------------------------- |
|
|
40
|
-
| [ArkType](./docs/arktype.md) | ✅ | ✅ | ✅ |
|
|
41
|
-
| [Zod](./docs/zod.md) | ✅ | ✅ | ✅ |
|
|
42
|
-
| [Zod Mini](./docs/zod.md#zod-mini) | ✅ | ✅ | ✅ |
|
|
43
|
-
| [Valibot](./docs/valibot.md) | ✅ | ✅ | ✅ |
|
|
44
|
-
| [Sury](./docs/sury.md) | ✅ | ✅ | ❌ — schemas are emitted inline |
|
|
45
|
-
| [VineJS](./docs/vinejs.md) | ✅ | ✅ | ❌ — schemas are emitted inline |
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
38
|
+
| Library | Request validation | OpenAPI schemas | Named components | `openapi-3.0` documents | Responses show transforms |
|
|
39
|
+
| ---------------------------------- | ------------------ | --------------- | ------------------------------- | ----------------------- | -------------------------------------- |
|
|
40
|
+
| [ArkType](./docs/arktype.md) | ✅ | ✅ | ✅ | ❌ — throws | ✅ |
|
|
41
|
+
| [Zod](./docs/zod.md) | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
42
|
+
| [Zod Mini](./docs/zod.md#zod-mini) | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
43
|
+
| [Valibot](./docs/valibot.md) | ✅ | ✅ | ✅ | ✅ | ❌ — shows the value before validation |
|
|
44
|
+
| [Sury](./docs/sury.md) | ✅ | ✅ | ❌ — schemas are emitted inline | ✅ | ❌ — shows the value before validation |
|
|
45
|
+
| [VineJS](./docs/vinejs.md) | ✅ | ✅ | ❌ — schemas are emitted inline | ✅ | ❌ — shows the value before validation |
|
|
46
|
+
|
|
47
|
+
`openapi-3.0` documents: can the library generate a `version: '3.0'` document, or only the default
|
|
48
|
+
`version: '3.1'`?
|
|
49
|
+
|
|
50
|
+
Responses show transforms: some schemas change a value during validation — coercing a string to a
|
|
51
|
+
number, applying a default. This says whether the response schema in the generated document
|
|
52
|
+
matches what your handler actually returns (✅), or still describes the value as it looked before
|
|
53
|
+
validation (❌).
|
|
53
54
|
|
|
54
55
|
## Set up a route
|
|
55
56
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kamaalio/hono-standard-openapi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "Generate OpenAPI documents from any Standard Schema library, for Hono.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hono",
|
|
@@ -43,29 +43,29 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@hono/standard-validator": "^0.4.0",
|
|
46
|
-
"openapi3-ts": "^4.
|
|
46
|
+
"openapi3-ts": "^4.6.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@kamaal111/oxlint-plugin-anti-slop": "^0.0.3",
|
|
50
50
|
"@oxlint/plugins": "^1.80.0",
|
|
51
51
|
"@standard-schema/spec": "^1.1.0",
|
|
52
|
-
"@types/node": "^26.
|
|
52
|
+
"@types/node": "^26.4.0",
|
|
53
53
|
"@valibot/to-json-schema": "^1.7.1",
|
|
54
54
|
"@vinejs/vine": "^4.4.0",
|
|
55
55
|
"@vitest/coverage-v8": "^4.1.11",
|
|
56
56
|
"arktype": "^2.2.3",
|
|
57
57
|
"eslint-plugin-import": "^2.32.0",
|
|
58
|
-
"hono": "^4.13.
|
|
58
|
+
"hono": "^4.13.5",
|
|
59
59
|
"husky": "^9.1.7",
|
|
60
|
-
"lint-staged": "^17.
|
|
61
|
-
"oxfmt": "^0.
|
|
60
|
+
"lint-staged": "^17.4.1",
|
|
61
|
+
"oxfmt": "^0.65.0",
|
|
62
62
|
"oxlint": "^1.80.0",
|
|
63
63
|
"oxlint-tsgolint": "^7.0.2001",
|
|
64
64
|
"sury": "11.0.0-rc.2",
|
|
65
65
|
"typescript": "^7.0.2",
|
|
66
66
|
"valibot": "^1.4.2",
|
|
67
67
|
"vitest": "^4.1.11",
|
|
68
|
-
"zod": "^4.4
|
|
68
|
+
"zod": "^4.5.4"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"hono": ">=4.10.0"
|