zod-openapi 2.15.0 → 2.15.2
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.
|
@@ -11,7 +11,7 @@ interface AdditionalPropertyOptions {
|
|
|
11
11
|
export declare const createObjectSchemaFromShape: (shape: ZodRawShape, { unknownKeys, catchAll }: AdditionalPropertyOptions, state: SchemaState) => Schema;
|
|
12
12
|
export declare const mapRequired: (shape: ZodRawShape, state: SchemaState) => {
|
|
13
13
|
required: string[];
|
|
14
|
-
effects?: Effect[]
|
|
14
|
+
effects?: Effect[];
|
|
15
15
|
} | undefined;
|
|
16
16
|
interface PropertyMap {
|
|
17
17
|
properties: NonNullable<oas31.SchemaObject['properties']>;
|
package/lib-types/extendZod.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ZodDate, ZodObject, ZodTypeAny, z } from 'zod';
|
|
2
2
|
import type { CreationType } from './create/components';
|
|
3
3
|
import type { oas30, oas31 } from './openapi3-ts/dist';
|
|
4
4
|
type SchemaObject = oas30.SchemaObject & oas31.SchemaObject;
|
|
@@ -56,7 +56,7 @@ interface ZodOpenApiExtendMetadata {
|
|
|
56
56
|
extends: ZodObject<any, any, any, any, any>;
|
|
57
57
|
}
|
|
58
58
|
declare module 'zod' {
|
|
59
|
-
interface ZodType
|
|
59
|
+
interface ZodType {
|
|
60
60
|
/**
|
|
61
61
|
* Add OpenAPI metadata to a Zod Type
|
|
62
62
|
*/
|
|
@@ -68,7 +68,7 @@ declare module 'zod' {
|
|
|
68
68
|
*/
|
|
69
69
|
openapi?: ZodOpenApiMetadata<ZodTypeAny>;
|
|
70
70
|
}
|
|
71
|
-
interface ZodObjectDef
|
|
71
|
+
interface ZodObjectDef {
|
|
72
72
|
extendMetadata?: ZodOpenApiExtendMetadata;
|
|
73
73
|
}
|
|
74
74
|
}
|
package/lib-types/zodType.d.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
type ZodTypeMap
|
|
1
|
+
import type { EnumLike, UnknownKeysParam, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodFunction, ZodIntersection, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodPipeline, ZodPromise, ZodRawShape, ZodReadonly, ZodRecord, ZodSet, ZodString, ZodSymbol, ZodTuple, ZodType, ZodTypeAny, ZodTypeDef, ZodUndefined, ZodUnion, ZodUnionOptions, ZodUnknown, ZodVoid } from 'zod';
|
|
2
|
+
type ZodTypeMap = {
|
|
3
3
|
ZodAny: ZodAny;
|
|
4
|
-
ZodArray: ZodArray<
|
|
4
|
+
ZodArray: ZodArray<ZodTypeAny>;
|
|
5
5
|
ZodBigInt: ZodBigInt;
|
|
6
6
|
ZodBoolean: ZodBoolean;
|
|
7
|
-
ZodBranded: ZodBranded<
|
|
8
|
-
ZodCatch: ZodCatch<
|
|
7
|
+
ZodBranded: ZodBranded<ZodTypeAny, string | number | symbol>;
|
|
8
|
+
ZodCatch: ZodCatch<ZodTypeAny>;
|
|
9
9
|
ZodDate: ZodDate;
|
|
10
|
-
ZodDefault: ZodDefault<
|
|
11
|
-
ZodDiscriminatedUnion: ZodDiscriminatedUnion<
|
|
12
|
-
ZodEffects: ZodEffects<
|
|
13
|
-
ZodEnum: ZodEnum<
|
|
14
|
-
ZodFunction: ZodFunction<
|
|
15
|
-
ZodIntersection: ZodIntersection<
|
|
16
|
-
ZodLazy: ZodLazy<
|
|
17
|
-
ZodLiteral: ZodLiteral<
|
|
10
|
+
ZodDefault: ZodDefault<ZodTypeAny>;
|
|
11
|
+
ZodDiscriminatedUnion: ZodDiscriminatedUnion<string, any>;
|
|
12
|
+
ZodEffects: ZodEffects<ZodTypeAny>;
|
|
13
|
+
ZodEnum: ZodEnum<[string, ...string[]]>;
|
|
14
|
+
ZodFunction: ZodFunction<ZodTuple<any, any>, ZodTypeAny>;
|
|
15
|
+
ZodIntersection: ZodIntersection<ZodTypeAny, ZodTypeAny>;
|
|
16
|
+
ZodLazy: ZodLazy<ZodTypeAny>;
|
|
17
|
+
ZodLiteral: ZodLiteral<ZodTypeAny>;
|
|
18
18
|
ZodMap: ZodMap;
|
|
19
19
|
ZodNaN: ZodNaN;
|
|
20
|
-
ZodNativeEnum: ZodNativeEnum<
|
|
20
|
+
ZodNativeEnum: ZodNativeEnum<EnumLike>;
|
|
21
21
|
ZodNever: ZodNever;
|
|
22
22
|
ZodNull: ZodNull;
|
|
23
|
-
ZodNullable: ZodNullable<
|
|
23
|
+
ZodNullable: ZodNullable<ZodTypeAny>;
|
|
24
24
|
ZodNumber: ZodNumber;
|
|
25
|
-
ZodObject: ZodObject<
|
|
26
|
-
ZodOptional: ZodOptional<
|
|
27
|
-
ZodPipeline: ZodPipeline<
|
|
28
|
-
ZodPromise: ZodPromise<
|
|
29
|
-
ZodReadonly: ZodReadonly<
|
|
25
|
+
ZodObject: ZodObject<ZodRawShape, UnknownKeysParam, ZodTypeAny>;
|
|
26
|
+
ZodOptional: ZodOptional<ZodTypeAny>;
|
|
27
|
+
ZodPipeline: ZodPipeline<ZodTypeAny, ZodTypeAny>;
|
|
28
|
+
ZodPromise: ZodPromise<ZodTypeAny>;
|
|
29
|
+
ZodReadonly: ZodReadonly<ZodTypeAny>;
|
|
30
30
|
ZodRecord: ZodRecord;
|
|
31
31
|
ZodSet: ZodSet;
|
|
32
32
|
ZodString: ZodString;
|
|
33
33
|
ZodSymbol: ZodSymbol;
|
|
34
34
|
ZodTuple: ZodTuple;
|
|
35
35
|
ZodUndefined: ZodUndefined;
|
|
36
|
-
ZodUnion: ZodUnion<
|
|
36
|
+
ZodUnion: ZodUnion<ZodUnionOptions>;
|
|
37
37
|
ZodUnknown: ZodUnknown;
|
|
38
38
|
ZodVoid: ZodVoid;
|
|
39
39
|
};
|
|
40
|
-
export declare const isZodType: <
|
|
40
|
+
export declare const isZodType: <K extends keyof ZodTypeMap>(zodType: unknown, typeName: K) => zodType is ZodTypeMap[K];
|
|
41
41
|
export declare const isAnyZodType: (zodType: unknown) => zodType is ZodType<any, ZodTypeDef, any>;
|
|
42
42
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zod-openapi",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.2",
|
|
4
4
|
"description": "Convert Zod Schemas to OpenAPI v3.x documentation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"test:watch": "skuba test --watch"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@redocly/cli": "1.
|
|
51
|
+
"@redocly/cli": "1.11.0",
|
|
52
52
|
"@types/node": "^20.3.0",
|
|
53
53
|
"eslint-plugin-zod-openapi": "^0.1.0",
|
|
54
54
|
"openapi3-ts": "4.3.1",
|
|
55
|
-
"skuba": "
|
|
55
|
+
"skuba": "8.0.0",
|
|
56
56
|
"yaml": "2.4.1",
|
|
57
57
|
"zod": "3.22.4"
|
|
58
58
|
},
|