@hono/zod-openapi 0.19.0 → 0.19.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/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -195,7 +195,7 @@ var OpenAPIHono = class _OpenAPIHono extends import_hono.Hono {
|
|
|
195
195
|
path: (0, import_url.mergePath)(
|
|
196
196
|
pathForOpenAPI,
|
|
197
197
|
// @ts-expect-error _basePath is private
|
|
198
|
-
app._basePath,
|
|
198
|
+
app._basePath.replaceAll(/:([^\/]+)/g, "{$1}"),
|
|
199
199
|
def.route.path
|
|
200
200
|
)
|
|
201
201
|
});
|
|
@@ -205,7 +205,7 @@ var OpenAPIHono = class _OpenAPIHono extends import_hono.Hono {
|
|
|
205
205
|
path: (0, import_url.mergePath)(
|
|
206
206
|
pathForOpenAPI,
|
|
207
207
|
// @ts-expect-error _basePath is private
|
|
208
|
-
app._basePath,
|
|
208
|
+
app._basePath.replaceAll(/:([^\/]+)/g, "{$1}"),
|
|
209
209
|
def.webhook.path
|
|
210
210
|
)
|
|
211
211
|
});
|
|
@@ -241,7 +241,7 @@ var createRoute = (routeConfig) => {
|
|
|
241
241
|
function addBasePathToDocument(document, basePath) {
|
|
242
242
|
const updatedPaths = {};
|
|
243
243
|
Object.keys(document.paths).forEach((path) => {
|
|
244
|
-
updatedPaths[(0, import_url.mergePath)(basePath, path)] = document.paths[path];
|
|
244
|
+
updatedPaths[(0, import_url.mergePath)(basePath.replaceAll(/:([^\/]+)/g, "{$1}"), path)] = document.paths[path];
|
|
245
245
|
});
|
|
246
246
|
return {
|
|
247
247
|
...document,
|
package/dist/index.mjs
CHANGED
|
@@ -173,7 +173,7 @@ var OpenAPIHono = class _OpenAPIHono extends Hono {
|
|
|
173
173
|
path: mergePath(
|
|
174
174
|
pathForOpenAPI,
|
|
175
175
|
// @ts-expect-error _basePath is private
|
|
176
|
-
app._basePath,
|
|
176
|
+
app._basePath.replaceAll(/:([^\/]+)/g, "{$1}"),
|
|
177
177
|
def.route.path
|
|
178
178
|
)
|
|
179
179
|
});
|
|
@@ -183,7 +183,7 @@ var OpenAPIHono = class _OpenAPIHono extends Hono {
|
|
|
183
183
|
path: mergePath(
|
|
184
184
|
pathForOpenAPI,
|
|
185
185
|
// @ts-expect-error _basePath is private
|
|
186
|
-
app._basePath,
|
|
186
|
+
app._basePath.replaceAll(/:([^\/]+)/g, "{$1}"),
|
|
187
187
|
def.webhook.path
|
|
188
188
|
)
|
|
189
189
|
});
|
|
@@ -219,7 +219,7 @@ extendZodWithOpenApi(z);
|
|
|
219
219
|
function addBasePathToDocument(document, basePath) {
|
|
220
220
|
const updatedPaths = {};
|
|
221
221
|
Object.keys(document.paths).forEach((path) => {
|
|
222
|
-
updatedPaths[mergePath(basePath, path)] = document.paths[path];
|
|
222
|
+
updatedPaths[mergePath(basePath.replaceAll(/:([^\/]+)/g, "{$1}"), path)] = document.paths[path];
|
|
223
223
|
});
|
|
224
224
|
return {
|
|
225
225
|
...document,
|