@hono/zod-openapi 1.0.0 → 1.0.2
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 +13 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @hono/zod-openapi
|
|
2
2
|
|
|
3
|
+
## 1.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1320](https://github.com/honojs/middleware/pull/1320) [`e835cf6183fb4717cfdbe156d9b3d423625a0e15`](https://github.com/honojs/middleware/commit/e835cf6183fb4717cfdbe156d9b3d423625a0e15) Thanks [@yusukebe](https://github.com/yusukebe)! - fix: correct importing `zod`
|
|
8
|
+
|
|
9
|
+
## 1.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`c6a16ab7aa8fba2403d4294e7673f96796020c65`](https://github.com/honojs/middleware/commit/c6a16ab7aa8fba2403d4294e7673f96796020c65)]:
|
|
14
|
+
- @hono/zod-validator@0.7.2
|
|
15
|
+
|
|
3
16
|
## 1.0.0
|
|
4
17
|
|
|
5
18
|
### Major Changes
|
package/dist/index.cjs
CHANGED
|
@@ -23,14 +23,14 @@ __export(index_exports, {
|
|
|
23
23
|
OpenAPIHono: () => OpenAPIHono,
|
|
24
24
|
createRoute: () => createRoute,
|
|
25
25
|
extendZodWithOpenApi: () => import_zod_to_openapi.extendZodWithOpenApi,
|
|
26
|
-
z: () =>
|
|
26
|
+
z: () => import_zod.z
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(index_exports);
|
|
29
29
|
var import_zod_to_openapi = require("@asteasolutions/zod-to-openapi");
|
|
30
30
|
var import_zod_validator = require("@hono/zod-validator");
|
|
31
31
|
var import_hono = require("hono");
|
|
32
32
|
var import_url = require("hono/utils/url");
|
|
33
|
-
var
|
|
33
|
+
var import_zod = require("zod");
|
|
34
34
|
var OpenAPIHono = class _OpenAPIHono extends import_hono.Hono {
|
|
35
35
|
openAPIRegistry;
|
|
36
36
|
defaultHook;
|
|
@@ -98,7 +98,7 @@ var OpenAPIHono = class _OpenAPIHono extends import_hono.Hono {
|
|
|
98
98
|
continue;
|
|
99
99
|
}
|
|
100
100
|
const schema = bodyContent[mediaType]["schema"];
|
|
101
|
-
if (!(schema instanceof
|
|
101
|
+
if (!(schema instanceof import_zod.ZodType)) {
|
|
102
102
|
continue;
|
|
103
103
|
}
|
|
104
104
|
if (isJSONContentType(mediaType)) {
|
|
@@ -244,7 +244,7 @@ var createRoute = (routeConfig) => {
|
|
|
244
244
|
};
|
|
245
245
|
return Object.defineProperty(route, "getRoutingPath", { enumerable: false });
|
|
246
246
|
};
|
|
247
|
-
(0, import_zod_to_openapi.extendZodWithOpenApi)(
|
|
247
|
+
(0, import_zod_to_openapi.extendZodWithOpenApi)(import_zod.z);
|
|
248
248
|
function addBasePathToDocument(document, basePath) {
|
|
249
249
|
const updatedPaths = {};
|
|
250
250
|
Object.keys(document.paths).forEach((path) => {
|
package/dist/index.d.cts
CHANGED
|
@@ -6,8 +6,8 @@ import { InfoStatusCode, SuccessStatusCode, RedirectStatusCode, ClientErrorStatu
|
|
|
6
6
|
import { SimplifyDeepArray, JSONValue, JSONParsed, RemoveBlankRecord } from 'hono/utils/types';
|
|
7
7
|
import { OpenAPIObject } from 'openapi3-ts/oas30';
|
|
8
8
|
import { OpenAPIObject as OpenAPIObject$1 } from 'openapi3-ts/oas31';
|
|
9
|
-
import { ZodType, z, ZodError } from 'zod
|
|
10
|
-
export { z } from 'zod
|
|
9
|
+
import { ZodType, z, ZodError } from 'zod';
|
|
10
|
+
export { z } from 'zod';
|
|
11
11
|
|
|
12
12
|
type MaybePromise<T> = Promise<T> | T;
|
|
13
13
|
type RouteConfig = RouteConfig$1 & {
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import { InfoStatusCode, SuccessStatusCode, RedirectStatusCode, ClientErrorStatu
|
|
|
6
6
|
import { SimplifyDeepArray, JSONValue, JSONParsed, RemoveBlankRecord } from 'hono/utils/types';
|
|
7
7
|
import { OpenAPIObject } from 'openapi3-ts/oas30';
|
|
8
8
|
import { OpenAPIObject as OpenAPIObject$1 } from 'openapi3-ts/oas31';
|
|
9
|
-
import { ZodType, z, ZodError } from 'zod
|
|
10
|
-
export { z } from 'zod
|
|
9
|
+
import { ZodType, z, ZodError } from 'zod';
|
|
10
|
+
export { z } from 'zod';
|
|
11
11
|
|
|
12
12
|
type MaybePromise<T> = Promise<T> | T;
|
|
13
13
|
type RouteConfig = RouteConfig$1 & {
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { zValidator } from "@hono/zod-validator";
|
|
10
10
|
import { Hono } from "hono";
|
|
11
11
|
import { mergePath } from "hono/utils/url";
|
|
12
|
-
import { ZodType, z } from "zod
|
|
12
|
+
import { ZodType, z } from "zod";
|
|
13
13
|
var OpenAPIHono = class _OpenAPIHono extends Hono {
|
|
14
14
|
openAPIRegistry;
|
|
15
15
|
defaultHook;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hono/zod-openapi",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "A wrapper class of Hono which supports OpenAPI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@asteasolutions/zod-to-openapi": "^8.0.0",
|
|
58
|
-
"@hono/zod-validator": "^0.7.
|
|
58
|
+
"@hono/zod-validator": "^0.7.2",
|
|
59
59
|
"openapi3-ts": "^4.5.0"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|