zod-nest 3.2.4 → 3.2.6
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/{chunk-N3VWL7G7.js → chunk-BYRNJLNK.js} +31 -15
- package/dist/chunk-BYRNJLNK.js.map +1 -0
- package/dist/{chunk-KNXYA5ER.js → chunk-Q3SWJZBB.js} +3 -8
- package/dist/chunk-Q3SWJZBB.js.map +1 -0
- package/dist/{chunk-VSI3SF7S.mjs → chunk-T4H5ECKV.mjs} +27 -11
- package/dist/chunk-T4H5ECKV.mjs.map +1 -0
- package/dist/{chunk-2NVNXIOY.mjs → chunk-YRTGPVSJ.mjs} +3 -8
- package/dist/chunk-YRTGPVSJ.mjs.map +1 -0
- package/dist/express/index.js +9 -9
- package/dist/express/index.mjs +3 -3
- package/dist/fastify/index.js +6 -6
- package/dist/fastify/index.mjs +3 -3
- package/dist/index.js +90 -76
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2NVNXIOY.mjs.map +0 -1
- package/dist/chunk-KNXYA5ER.js.map +0 -1
- package/dist/chunk-N3VWL7G7.js.map +0 -1
- package/dist/chunk-VSI3SF7S.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isZodDto, ZodNestError, ZodValidationException, defaultRegistry, ZOD_DTO_SYMBOL, ZOD_NEST_DTO_EXTENSION, flattenObjectIntersection, resolveSchemaRef, isZodObject, registerSchema, expandObjectSchema, paramSchemaBody, COMPONENTS_SCHEMAS_PREFIX, isZodSchema, buildToJsonSchemaOptions, resolveAnonId, ANON_RESPONSE_PREFIX, ZOD_NEST_ERROR_DUPLICATE_ID, ZOD_NEST_ERROR_EXTENSION } from './chunk-
|
|
2
|
-
export { COMPONENTS_SCHEMAS_PREFIX, ZOD_DTO_SYMBOL, ZOD_NEST_DTO_EXTENSION, ZOD_NEST_ERROR_DUPLICATE_ID, ZOD_NEST_ERROR_EXTENSION, ZodNestError, ZodNestUnrepresentableError, ZodValidationException, createRegistry, defaultRegistry, extend, getLineage, isZodDto, isZodSchema, registerSchema, toOpenApi } from './chunk-
|
|
1
|
+
import { isZodDto, ZodNestError, ZodValidationException, defaultRegistry, ZOD_DTO_SYMBOL, ZOD_NEST_DTO_EXTENSION, flattenObjectIntersection, resolveSchemaRef, isZodObject, registerSchema, expandObjectSchema, paramSchemaBody, COMPONENTS_SCHEMAS_PREFIX, isZodSchema, buildToJsonSchemaOptions, resolveAnonId, ANON_RESPONSE_PREFIX, ZOD_NEST_ERROR_DUPLICATE_ID, ZOD_NEST_ERROR_EXTENSION } from './chunk-YRTGPVSJ.mjs';
|
|
2
|
+
export { COMPONENTS_SCHEMAS_PREFIX, ZOD_DTO_SYMBOL, ZOD_NEST_DTO_EXTENSION, ZOD_NEST_ERROR_DUPLICATE_ID, ZOD_NEST_ERROR_EXTENSION, ZodNestError, ZodNestUnrepresentableError, ZodValidationException, createRegistry, defaultRegistry, extend, getLineage, isZodDto, isZodSchema, registerSchema, toOpenApi } from './chunk-YRTGPVSJ.mjs';
|
|
3
3
|
import { singleton, __name } from './chunk-MPNAA53V.mjs';
|
|
4
4
|
export { overrideJSONSchema } from './chunk-MPNAA53V.mjs';
|
|
5
5
|
import { InternalServerErrorException, HttpStatus, Injectable, Optional, Inject, Logger, RequestMethod, applyDecorators } from '@nestjs/common';
|
|
@@ -769,12 +769,17 @@ var ZodBody = /* @__PURE__ */ __name((schema, options) => {
|
|
|
769
769
|
});
|
|
770
770
|
}, "ZodBody");
|
|
771
771
|
var resolveBodySchema = /* @__PURE__ */ __name((schema, options) => {
|
|
772
|
+
const registry = options?.registry ?? defaultRegistry;
|
|
772
773
|
if (options?.flatten === true) {
|
|
773
|
-
|
|
774
|
+
const merged = flattenObjectIntersection(schema, registry, "@ZodBody");
|
|
775
|
+
return resolveSchemaRef(merged, {
|
|
776
|
+
registry,
|
|
777
|
+
deferAnonInline: true
|
|
778
|
+
}).ref;
|
|
774
779
|
}
|
|
775
780
|
return resolveSchemaRef(schema, {
|
|
776
781
|
id: options?.id,
|
|
777
|
-
registry
|
|
782
|
+
registry,
|
|
778
783
|
deferAnonInline: true
|
|
779
784
|
}).ref;
|
|
780
785
|
}, "resolveBodySchema");
|
|
@@ -1080,7 +1085,16 @@ var HTTP_METHODS = [
|
|
|
1080
1085
|
"options",
|
|
1081
1086
|
"head",
|
|
1082
1087
|
"patch",
|
|
1083
|
-
"trace"
|
|
1088
|
+
"trace",
|
|
1089
|
+
"query",
|
|
1090
|
+
"search",
|
|
1091
|
+
"propfind",
|
|
1092
|
+
"proppatch",
|
|
1093
|
+
"mkcol",
|
|
1094
|
+
"copy",
|
|
1095
|
+
"move",
|
|
1096
|
+
"lock",
|
|
1097
|
+
"unlock"
|
|
1084
1098
|
];
|
|
1085
1099
|
var forEachOperation = /* @__PURE__ */ __name((doc, fn) => {
|
|
1086
1100
|
const paths = doc.paths;
|