-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Open
Labels
Description
Is your feature request related to a problem? Please describe.
I want typed requests but I don't need to send them one by one. I have a batch endpoint which accepts requests in following format
export const Method = {
POST: 'POST',
DELETE: 'DELETE',
PUT: 'PUT',
PATCH: 'PATCH',
GET: 'GET',
};
export type Method = (typeof Method)[keyof typeof Method];
export class BatchOperation {
@ApiProperty({ enum: Method })
@IsEnum(Method)
@IsNotEmpty()
method: Method;
@IsString()
@IsNotEmpty()
path: string;
@IsObject()
@IsOptional()
body?: any;
}
export class BatchOperationsDto {
@Allow()
operations: BatchOperation[];
}
Describe the solution you'd like
I would like to be able to create typed requests but send them myself when necessary.
Describe alternatives you've considered
I couldn't really find alternatives