hono-problem-details 0.12.3 → 0.12.4
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 +11 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -421,6 +421,17 @@ app.post("/users", sValidator("json", schema, standardSchemaProblemHook()), (c)
|
|
|
421
421
|
> `zod@^3.25.0` and `zod@^4.0.0` — the version constraint above only applies when you import
|
|
422
422
|
> from `hono-problem-details/openapi`.
|
|
423
423
|
|
|
424
|
+
> **Keep one copy of `@asteasolutions/zod-to-openapi`**: `@hono/zod-openapi` depends on it, and
|
|
425
|
+
> each installed copy keeps its own `.openapi()` metadata registry. If a schema is built against
|
|
426
|
+
> one copy (for example, in a pnpm monorepo package that pins a different `zod` version) and the
|
|
427
|
+
> document is generated by an `OpenAPIHono` that uses another, the metadata that schema got from
|
|
428
|
+
> `.openapi()` (`title`, `description`, `example`) is missing from the generated document. In the
|
|
429
|
+
> layouts we tested this raised no error; descriptions set with `.describe()` were kept. This
|
|
430
|
+
> applies to any schema built against the other copy, not only the ones from this package. Align
|
|
431
|
+
> the `zod` and `@hono/zod-openapi` versions across packages, and any direct dependency on
|
|
432
|
+
> `@asteasolutions/zod-to-openapi`, so that one copy is installed (check with
|
|
433
|
+
> `npm ls @asteasolutions/zod-to-openapi` or `pnpm why @asteasolutions/zod-to-openapi`).
|
|
434
|
+
|
|
424
435
|
Use with `@hono/zod-openapi` to document Problem Details error responses in your OpenAPI spec:
|
|
425
436
|
|
|
426
437
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hono-problem-details",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4",
|
|
4
4
|
"description": "RFC 9457 Problem Details middleware for Hono",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -112,10 +112,10 @@
|
|
|
112
112
|
"author": "Ryota Ikezawa",
|
|
113
113
|
"funding": "https://github.com/sponsors/paveg",
|
|
114
114
|
"peerDependencies": {
|
|
115
|
-
"@hono/standard-validator": "^0.2.0",
|
|
115
|
+
"@hono/standard-validator": "^0.2.0 || ^0.3.0 || ^0.4.0",
|
|
116
116
|
"@hono/valibot-validator": "^0.6.0",
|
|
117
117
|
"@hono/zod-openapi": "^1.0.0",
|
|
118
|
-
"@hono/zod-validator": "^0.7.5",
|
|
118
|
+
"@hono/zod-validator": "^0.7.5 || ^0.8.0 || ^0.9.0",
|
|
119
119
|
"@opentelemetry/api": "^1.0.0",
|
|
120
120
|
"@standard-schema/spec": "^1.0.0",
|
|
121
121
|
"hono": ">=4.13.7",
|