@omer-x/next-openapi-json-generator 2.1.0-rc.2 → 2.1.0-rc.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/dist/index.cjs CHANGED
@@ -318,6 +318,10 @@ function fixSchema(schema) {
318
318
  return alterSchema(schema, fixSchema(schema.unwrap()).optional());
319
319
  case "readonly":
320
320
  return alterSchema(schema, fixSchema(schema.unwrap()).readonly());
321
+ case "default": {
322
+ const defaultValue = schema._zod.def.defaultValue;
323
+ return alterSchema(schema, fixSchema(schema.unwrap()).default(defaultValue));
324
+ }
321
325
  case "array":
322
326
  return alterSchema(schema, fixSchema(schema.unwrap()).array());
323
327
  default:
package/dist/index.js CHANGED
@@ -289,6 +289,10 @@ function fixSchema(schema) {
289
289
  return alterSchema(schema, fixSchema(schema.unwrap()).optional());
290
290
  case "readonly":
291
291
  return alterSchema(schema, fixSchema(schema.unwrap()).readonly());
292
+ case "default": {
293
+ const defaultValue = schema._zod.def.defaultValue;
294
+ return alterSchema(schema, fixSchema(schema.unwrap()).default(defaultValue));
295
+ }
292
296
  case "array":
293
297
  return alterSchema(schema, fixSchema(schema.unwrap()).array());
294
298
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omer-x/next-openapi-json-generator",
3
- "version": "2.1.0-rc.2",
3
+ "version": "2.1.0-rc.3",
4
4
  "description": "a Next.js plugin to generate OpenAPI documentation from route handlers",
5
5
  "keywords": [
6
6
  "next.js",