zod-openapi 2.18.0 → 2.19.0-beta.1

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.
Files changed (70) hide show
  1. package/dist/extend.cjs +4 -0
  2. package/dist/extend.d.mts +1 -0
  3. package/dist/extend.d.ts +1 -0
  4. package/dist/extend.mjs +3 -0
  5. package/{lib-esm/extend.mjs → dist/extendZod.chunk.cjs} +2 -7
  6. package/{lib-commonjs/extend.js → dist/extendZod.chunk.mjs} +3 -24
  7. package/{lib-commonjs/index.js → dist/index.cjs} +247 -365
  8. package/dist/index.d.mts +938 -0
  9. package/dist/index.d.ts +938 -0
  10. package/{lib-esm → dist}/index.mjs +243 -336
  11. package/extend/index.d.ts +1 -0
  12. package/extend/package.json +5 -0
  13. package/package.json +30 -32
  14. package/lib-types/api.d.ts +0 -3
  15. package/lib-types/create/callbacks.d.ts +0 -5
  16. package/lib-types/create/components.d.ts +0 -125
  17. package/lib-types/create/content.d.ts +0 -6
  18. package/lib-types/create/document.d.ts +0 -73
  19. package/lib-types/create/parameters.d.ts +0 -10
  20. package/lib-types/create/paths.d.ts +0 -6
  21. package/lib-types/create/responses.d.ts +0 -10
  22. package/lib-types/create/schema/index.d.ts +0 -29
  23. package/lib-types/create/schema/metadata.d.ts +0 -3
  24. package/lib-types/create/schema/parsers/array.d.ts +0 -3
  25. package/lib-types/create/schema/parsers/boolean.d.ts +0 -3
  26. package/lib-types/create/schema/parsers/brand.d.ts +0 -3
  27. package/lib-types/create/schema/parsers/catch.d.ts +0 -3
  28. package/lib-types/create/schema/parsers/date.d.ts +0 -3
  29. package/lib-types/create/schema/parsers/default.d.ts +0 -3
  30. package/lib-types/create/schema/parsers/discriminatedUnion.d.ts +0 -5
  31. package/lib-types/create/schema/parsers/enum.d.ts +0 -3
  32. package/lib-types/create/schema/parsers/index.d.ts +0 -3
  33. package/lib-types/create/schema/parsers/intersection.d.ts +0 -3
  34. package/lib-types/create/schema/parsers/lazy.d.ts +0 -3
  35. package/lib-types/create/schema/parsers/literal.d.ts +0 -3
  36. package/lib-types/create/schema/parsers/manual.d.ts +0 -3
  37. package/lib-types/create/schema/parsers/nativeEnum.d.ts +0 -10
  38. package/lib-types/create/schema/parsers/null.d.ts +0 -2
  39. package/lib-types/create/schema/parsers/nullable.d.ts +0 -3
  40. package/lib-types/create/schema/parsers/number.d.ts +0 -13
  41. package/lib-types/create/schema/parsers/object.d.ts +0 -21
  42. package/lib-types/create/schema/parsers/optional.d.ts +0 -10
  43. package/lib-types/create/schema/parsers/pipeline.d.ts +0 -3
  44. package/lib-types/create/schema/parsers/preprocess.d.ts +0 -3
  45. package/lib-types/create/schema/parsers/readonly.d.ts +0 -3
  46. package/lib-types/create/schema/parsers/record.d.ts +0 -3
  47. package/lib-types/create/schema/parsers/refine.d.ts +0 -3
  48. package/lib-types/create/schema/parsers/set.d.ts +0 -3
  49. package/lib-types/create/schema/parsers/string.d.ts +0 -3
  50. package/lib-types/create/schema/parsers/transform.d.ts +0 -10
  51. package/lib-types/create/schema/parsers/tuple.d.ts +0 -3
  52. package/lib-types/create/schema/parsers/union.d.ts +0 -3
  53. package/lib-types/create/schema/parsers/unknown.d.ts +0 -3
  54. package/lib-types/create/specificationExtension.d.ts +0 -1
  55. package/lib-types/extend.d.ts +0 -1
  56. package/lib-types/extendZod.d.ts +0 -3
  57. package/lib-types/extendZodTypes.d.ts +0 -75
  58. package/lib-types/index.d.ts +0 -4
  59. package/lib-types/openapi.d.ts +0 -5
  60. package/lib-types/openapi3-ts/dist/dsl/openapi-builder30.d.ts +0 -31
  61. package/lib-types/openapi3-ts/dist/dsl/openapi-builder31.d.ts +0 -32
  62. package/lib-types/openapi3-ts/dist/index.d.ts +0 -3
  63. package/lib-types/openapi3-ts/dist/model/oas-common.d.ts +0 -15
  64. package/lib-types/openapi3-ts/dist/model/openapi30.d.ts +0 -291
  65. package/lib-types/openapi3-ts/dist/model/openapi31.d.ts +0 -298
  66. package/lib-types/openapi3-ts/dist/model/server.d.ts +0 -19
  67. package/lib-types/openapi3-ts/dist/model/specification-extension.d.ts +0 -12
  68. package/lib-types/openapi3-ts/dist/oas30.d.ts +0 -4
  69. package/lib-types/openapi3-ts/dist/oas31.d.ts +0 -4
  70. package/lib-types/zodType.d.ts +0 -42
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ const zod = require("zod");
3
+ const extendZod = require("./extendZod.chunk.cjs");
4
+ extendZod.extendZodWithOpenApi(zod.z);
@@ -0,0 +1 @@
1
+ import './index.js';
@@ -0,0 +1 @@
1
+ import './index.js';
@@ -0,0 +1,3 @@
1
+ import { z } from "zod";
2
+ import { extendZodWithOpenApi } from "./extendZod.chunk.mjs";
3
+ extendZodWithOpenApi(z);
@@ -1,7 +1,4 @@
1
- // src/extend.ts
2
- import { z } from "zod";
3
-
4
- // src/extendZod.ts
1
+ "use strict";
5
2
  function extendZodWithOpenApi(zod) {
6
3
  if (typeof zod.ZodType.prototype.openapi !== "undefined") {
7
4
  return;
@@ -37,6 +34,4 @@ function extendZodWithOpenApi(zod) {
37
34
  return pickResult;
38
35
  };
39
36
  }
40
-
41
- // src/extend.ts
42
- extendZodWithOpenApi(z);
37
+ exports.extendZodWithOpenApi = extendZodWithOpenApi;
@@ -1,24 +1,3 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/extend.ts
17
- var extend_exports = {};
18
- module.exports = __toCommonJS(extend_exports);
19
- var import_zod = require("zod");
20
-
21
- // src/extendZod.ts
22
1
  function extendZodWithOpenApi(zod) {
23
2
  if (typeof zod.ZodType.prototype.openapi !== "undefined") {
24
3
  return;
@@ -54,6 +33,6 @@ function extendZodWithOpenApi(zod) {
54
33
  return pickResult;
55
34
  };
56
35
  }
57
-
58
- // src/extend.ts
59
- extendZodWithOpenApi(import_zod.z);
36
+ export {
37
+ extendZodWithOpenApi
38
+ };