hono-openapi 1.0.5 → 1.0.7

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.cjs CHANGED
@@ -273,10 +273,7 @@ async function generatePaths(hono, ctx) {
273
273
  }
274
274
  }
275
275
  const defaultOptionsForThisMethod = ctx.options.defaultOptions?.[routeMethod];
276
- const { schema: routeSpecs, components = {} } = await getSpec(
277
- middlewareHandler,
278
- defaultOptionsForThisMethod
279
- );
276
+ const { schema: routeSpecs, components = {} } = await getSpec(middlewareHandler, defaultOptionsForThisMethod);
280
277
  ctx.components = mergeComponentsObjects(ctx.components, components);
281
278
  registerSchemaPath({
282
279
  route,
@@ -320,7 +317,10 @@ async function getSpec(middlewareHandler, defaultOptions) {
320
317
  const result2 = await raw.schema.toOpenAPISchema();
321
318
  raw.schema = result2.schema;
322
319
  if (result2.components) {
323
- components = mergeComponentsObjects(components, result2.components);
320
+ components = mergeComponentsObjects(
321
+ components,
322
+ result2.components
323
+ );
324
324
  }
325
325
  }
326
326
  }
package/dist/index.d.cts CHANGED
@@ -191,7 +191,7 @@ type GenerateSpecOptions = {
191
191
  defaultOptions: Partial<Record<AllowedMethods | "ALL", DescribeRouteOptions>>;
192
192
  };
193
193
  type OperationId = string | ((route: RouterRoute) => string);
194
- type DescribeRouteOptions = Omit<OpenAPIV3_1.OperationObject, "responses" | "parameters" | "operationId"> & {
194
+ type DescribeRouteOptions = Omit<OpenAPIV3_1.OperationObject, "responses" | "operationId"> & {
195
195
  operationId?: OperationId;
196
196
  /**
197
197
  * Pass `true` to hide route from OpenAPI/swagger document
package/dist/index.d.ts CHANGED
@@ -191,7 +191,7 @@ type GenerateSpecOptions = {
191
191
  defaultOptions: Partial<Record<AllowedMethods | "ALL", DescribeRouteOptions>>;
192
192
  };
193
193
  type OperationId = string | ((route: RouterRoute) => string);
194
- type DescribeRouteOptions = Omit<OpenAPIV3_1.OperationObject, "responses" | "parameters" | "operationId"> & {
194
+ type DescribeRouteOptions = Omit<OpenAPIV3_1.OperationObject, "responses" | "operationId"> & {
195
195
  operationId?: OperationId;
196
196
  /**
197
197
  * Pass `true` to hide route from OpenAPI/swagger document
package/dist/index.js CHANGED
@@ -271,10 +271,7 @@ async function generatePaths(hono, ctx) {
271
271
  }
272
272
  }
273
273
  const defaultOptionsForThisMethod = ctx.options.defaultOptions?.[routeMethod];
274
- const { schema: routeSpecs, components = {} } = await getSpec(
275
- middlewareHandler,
276
- defaultOptionsForThisMethod
277
- );
274
+ const { schema: routeSpecs, components = {} } = await getSpec(middlewareHandler, defaultOptionsForThisMethod);
278
275
  ctx.components = mergeComponentsObjects(ctx.components, components);
279
276
  registerSchemaPath({
280
277
  route,
@@ -318,7 +315,10 @@ async function getSpec(middlewareHandler, defaultOptions) {
318
315
  const result2 = await raw.schema.toOpenAPISchema();
319
316
  raw.schema = result2.schema;
320
317
  if (result2.components) {
321
- components = mergeComponentsObjects(components, result2.components);
318
+ components = mergeComponentsObjects(
319
+ components,
320
+ result2.components
321
+ );
322
322
  }
323
323
  }
324
324
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hono-openapi",
3
3
  "description": "OpenAPI schema generator for Hono",
4
- "version": "1.0.5",
4
+ "version": "1.0.7",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.js",
@@ -44,7 +44,7 @@
44
44
  "peerDependencies": {
45
45
  "@hono/standard-validator": "^0.1.2",
46
46
  "@standard-community/standard-json": "^0.3.1",
47
- "@standard-community/standard-openapi": "^0.2.3",
47
+ "@standard-community/standard-openapi": "^0.2.4",
48
48
  "@types/json-schema": "^7.0.15",
49
49
  "hono": "^4.8.3",
50
50
  "openapi-types": "^12.1.3"
@@ -63,6 +63,9 @@
63
63
  "@valibot/to-json-schema": "^1.3.0",
64
64
  "arktype": "^2.1.22",
65
65
  "effect": "^3.17.13",
66
+ "husky": "^9.1.7",
67
+ "is-ci": "^4.1.0",
68
+ "nano-staged": "^0.8.0",
66
69
  "pkgroll": "^2.13.1",
67
70
  "typescript": "^5.8.3",
68
71
  "valibot": "^1.1.0",