@hono/zod-openapi
Advanced tools
Comparing version 0.14.6 to 0.14.7
@@ -124,3 +124,3 @@ "use strict"; | ||
const document = generator.generateDocument(config); | ||
return document; | ||
return this._basePath ? addBasePathToDocument(document, this._basePath) : document; | ||
}; | ||
@@ -130,3 +130,3 @@ getOpenAPI31Document = (config) => { | ||
const document = generator.generateDocument(config); | ||
return document; | ||
return this._basePath ? addBasePathToDocument(document, this._basePath) : document; | ||
}; | ||
@@ -204,2 +204,12 @@ doc = (path, configure) => { | ||
(0, import_zod_to_openapi.extendZodWithOpenApi)(import_zod.z); | ||
function addBasePathToDocument(document, basePath) { | ||
const updatedPaths = {}; | ||
Object.keys(document.paths).forEach((path) => { | ||
updatedPaths[(0, import_url.mergePath)(basePath, path)] = document.paths[path]; | ||
}); | ||
return { | ||
...document, | ||
paths: updatedPaths | ||
}; | ||
} | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -206,0 +216,0 @@ 0 && (module.exports = { |
{ | ||
"name": "@hono/zod-openapi", | ||
"version": "0.14.6", | ||
"version": "0.14.7", | ||
"description": "A wrapper class of Hono which supports OpenAPI.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43271
573