@hono/zod-openapi 0.9.1 → 0.9.3

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 CHANGED
@@ -341,7 +341,7 @@ app.doc('/doc', c => ({
341
341
  },
342
342
  servers: [
343
343
  {
344
- url: new URL(c.req.url).hostname,
344
+ url: new URL(c.req.url).origin,
345
345
  description: 'Current environment',
346
346
  },
347
347
  ],
package/dist/index.d.mts CHANGED
@@ -20,7 +20,7 @@ type IsForm<T> = T extends string ? T extends `multipart/form-data${infer _Rest}
20
20
  type RequestPart<R extends RouteConfig, Part extends string> = Part extends keyof R['request'] ? R['request'][Part] : {};
21
21
  type InputTypeBase<R extends RouteConfig, Part extends string, Type extends string> = R['request'] extends RequestTypes ? RequestPart<R, Part> extends AnyZodObject ? {
22
22
  in: {
23
- [K in Type]: z.infer<RequestPart<R, Part>>;
23
+ [K in Type]: z.input<RequestPart<R, Part>>;
24
24
  };
25
25
  out: {
26
26
  [K in Type]: z.output<RequestPart<R, Part>>;
@@ -28,7 +28,7 @@ type InputTypeBase<R extends RouteConfig, Part extends string, Type extends stri
28
28
  } : {} : {};
29
29
  type InputTypeJson<R extends RouteConfig> = R['request'] extends RequestTypes ? R['request']['body'] extends ZodRequestBody ? R['request']['body']['content'] extends ZodContentObject ? IsJson<keyof R['request']['body']['content']> extends never ? {} : R['request']['body']['content'][keyof R['request']['body']['content']]['schema'] extends ZodSchema<any> ? {
30
30
  in: {
31
- json: z.infer<R['request']['body']['content'][keyof R['request']['body']['content']]['schema']>;
31
+ json: z.input<R['request']['body']['content'][keyof R['request']['body']['content']]['schema']>;
32
32
  };
33
33
  out: {
34
34
  json: z.output<R['request']['body']['content'][keyof R['request']['body']['content']]['schema']>;
@@ -36,7 +36,7 @@ type InputTypeJson<R extends RouteConfig> = R['request'] extends RequestTypes ?
36
36
  } : {} : {} : {} : {};
37
37
  type InputTypeForm<R extends RouteConfig> = R['request'] extends RequestTypes ? R['request']['body'] extends ZodRequestBody ? R['request']['body']['content'] extends ZodContentObject ? IsForm<keyof R['request']['body']['content']> extends never ? {} : R['request']['body']['content'][keyof R['request']['body']['content']]['schema'] extends ZodSchema<any> ? {
38
38
  in: {
39
- form: z.infer<R['request']['body']['content'][keyof R['request']['body']['content']]['schema']>;
39
+ form: z.input<R['request']['body']['content'][keyof R['request']['body']['content']]['schema']>;
40
40
  };
41
41
  out: {
42
42
  form: z.output<R['request']['body']['content'][keyof R['request']['body']['content']]['schema']>;
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ type IsForm<T> = T extends string ? T extends `multipart/form-data${infer _Rest}
20
20
  type RequestPart<R extends RouteConfig, Part extends string> = Part extends keyof R['request'] ? R['request'][Part] : {};
21
21
  type InputTypeBase<R extends RouteConfig, Part extends string, Type extends string> = R['request'] extends RequestTypes ? RequestPart<R, Part> extends AnyZodObject ? {
22
22
  in: {
23
- [K in Type]: z.infer<RequestPart<R, Part>>;
23
+ [K in Type]: z.input<RequestPart<R, Part>>;
24
24
  };
25
25
  out: {
26
26
  [K in Type]: z.output<RequestPart<R, Part>>;
@@ -28,7 +28,7 @@ type InputTypeBase<R extends RouteConfig, Part extends string, Type extends stri
28
28
  } : {} : {};
29
29
  type InputTypeJson<R extends RouteConfig> = R['request'] extends RequestTypes ? R['request']['body'] extends ZodRequestBody ? R['request']['body']['content'] extends ZodContentObject ? IsJson<keyof R['request']['body']['content']> extends never ? {} : R['request']['body']['content'][keyof R['request']['body']['content']]['schema'] extends ZodSchema<any> ? {
30
30
  in: {
31
- json: z.infer<R['request']['body']['content'][keyof R['request']['body']['content']]['schema']>;
31
+ json: z.input<R['request']['body']['content'][keyof R['request']['body']['content']]['schema']>;
32
32
  };
33
33
  out: {
34
34
  json: z.output<R['request']['body']['content'][keyof R['request']['body']['content']]['schema']>;
@@ -36,7 +36,7 @@ type InputTypeJson<R extends RouteConfig> = R['request'] extends RequestTypes ?
36
36
  } : {} : {} : {} : {};
37
37
  type InputTypeForm<R extends RouteConfig> = R['request'] extends RequestTypes ? R['request']['body'] extends ZodRequestBody ? R['request']['body']['content'] extends ZodContentObject ? IsForm<keyof R['request']['body']['content']> extends never ? {} : R['request']['body']['content'][keyof R['request']['body']['content']]['schema'] extends ZodSchema<any> ? {
38
38
  in: {
39
- form: z.infer<R['request']['body']['content'][keyof R['request']['body']['content']]['schema']>;
39
+ form: z.input<R['request']['body']['content'][keyof R['request']['body']['content']]['schema']>;
40
40
  };
41
41
  out: {
42
42
  form: z.output<R['request']['body']['content'][keyof R['request']['body']['content']]['schema']>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hono/zod-openapi",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "description": "A wrapper class of Hono which supports OpenAPI.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -9,7 +9,7 @@
9
9
  "dist"
10
10
  ],
11
11
  "scripts": {
12
- "test": "vitest run",
12
+ "test": "vitest run && vitest --typecheck --run --passWithNoTests",
13
13
  "build": "tsup ./src/index.ts --format esm,cjs --dts",
14
14
  "publint": "publint",
15
15
  "release": "yarn build && yarn test && yarn publint && yarn publish"
@@ -38,12 +38,13 @@
38
38
  },
39
39
  "homepage": "https://github.com/honojs/middleware",
40
40
  "peerDependencies": {
41
- "hono": ">=3.11.1",
41
+ "hono": ">=3.11.3",
42
42
  "zod": "3.*"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@hono/zod-validator": "^0.1.11",
46
- "hono": "^3.11.1",
46
+ "hono": "^3.11.3",
47
+ "vitest": "^1.0.1",
47
48
  "zod": "^3.22.1"
48
49
  },
49
50
  "dependencies": {