@hono/zod-openapi 0.8.4 → 0.8.5
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/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ var import_zod_to_openapi = require("@asteasolutions/zod-to-openapi");
|
|
|
29
29
|
var import_zod_to_openapi2 = require("@asteasolutions/zod-to-openapi");
|
|
30
30
|
var import_zod_validator = require("@hono/zod-validator");
|
|
31
31
|
var import_hono = require("hono");
|
|
32
|
+
var import_url = require("hono/utils/url");
|
|
32
33
|
var import_zod = require("zod");
|
|
33
34
|
var OpenAPIHono = class _OpenAPIHono extends import_hono.Hono {
|
|
34
35
|
openAPIRegistry;
|
|
@@ -113,12 +114,12 @@ var OpenAPIHono = class _OpenAPIHono extends import_hono.Hono {
|
|
|
113
114
|
case "route":
|
|
114
115
|
return this.openAPIRegistry.registerPath({
|
|
115
116
|
...def.route,
|
|
116
|
-
path:
|
|
117
|
+
path: (0, import_url.mergePath)(path, def.route.path)
|
|
117
118
|
});
|
|
118
119
|
case "webhook":
|
|
119
120
|
return this.openAPIRegistry.registerWebhook({
|
|
120
121
|
...def.webhook,
|
|
121
|
-
path:
|
|
122
|
+
path: (0, import_url.mergePath)(path, def.webhook.path)
|
|
122
123
|
});
|
|
123
124
|
case "schema":
|
|
124
125
|
return this.openAPIRegistry.register(def.schema._def.openapi._internal.refId, def.schema);
|
package/dist/index.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
import { extendZodWithOpenApi } from "@asteasolutions/zod-to-openapi";
|
|
8
8
|
import { zValidator } from "@hono/zod-validator";
|
|
9
9
|
import { Hono } from "hono";
|
|
10
|
+
import { mergePath } from "hono/utils/url";
|
|
10
11
|
import { z, ZodType } from "zod";
|
|
11
12
|
var OpenAPIHono = class _OpenAPIHono extends Hono {
|
|
12
13
|
openAPIRegistry;
|
|
@@ -91,12 +92,12 @@ var OpenAPIHono = class _OpenAPIHono extends Hono {
|
|
|
91
92
|
case "route":
|
|
92
93
|
return this.openAPIRegistry.registerPath({
|
|
93
94
|
...def.route,
|
|
94
|
-
path:
|
|
95
|
+
path: mergePath(path, def.route.path)
|
|
95
96
|
});
|
|
96
97
|
case "webhook":
|
|
97
98
|
return this.openAPIRegistry.registerWebhook({
|
|
98
99
|
...def.webhook,
|
|
99
|
-
path:
|
|
100
|
+
path: mergePath(path, def.webhook.path)
|
|
100
101
|
});
|
|
101
102
|
case "schema":
|
|
102
103
|
return this.openAPIRegistry.register(def.schema._def.openapi._internal.refId, def.schema);
|