Skip to content

Commit 83fb686

Browse files
committed
chore: replace deprecated ZodTypeAny with ZodType
- ZodTypeAny is deprecated; using ZodType (without generics) instead
1 parent ee4a038 commit 83fb686

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/api-docs/openAPIResponseBuilders.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { z } from "zod";
33

44
import { ServiceResponseSchema } from "@/common/models/serviceResponse";
55

6-
export function createApiResponse(schema: z.ZodTypeAny, description: string, statusCode = StatusCodes.OK) {
6+
export function createApiResponse(schema: z.ZodType, description: string, statusCode = StatusCodes.OK) {
77
return {
88
[statusCode]: {
99
description,
@@ -21,7 +21,7 @@ export function createApiResponse(schema: z.ZodTypeAny, description: string, sta
2121
// import { ResponseConfig } from '@asteasolutions/zod-to-openapi';
2222
// import { ApiResponseConfig } from '@common/models/openAPIResponseConfig';
2323
// export type ApiResponseConfig = {
24-
// schema: z.ZodTypeAny;
24+
// schema: z.ZodType;
2525
// description: string;
2626
// statusCode: StatusCodes;
2727
// };

src/common/models/serviceResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class ServiceResponse<T = null> {
2323
}
2424
}
2525

26-
export const ServiceResponseSchema = <T extends z.ZodTypeAny>(dataSchema: T) =>
26+
export const ServiceResponseSchema = <T extends z.ZodType>(dataSchema: T) =>
2727
z.object({
2828
success: z.boolean(),
2929
message: z.string(),

0 commit comments

Comments
 (0)