While using @rtk-query/codegen-openapi for API query generation, I've encountered a specific requirement for file upload endpoints. To accommodate file uploads using formData, it's necessary to include the formData: true flag within the query. is there any configuration option exists to automatically integrate this flag into the generated endpoints?
endpoints: (build) => ({
uploadFile: build.mutation<
UploadFileResponse,
UploadFileArg
>({
query: (queryArg) => ({
url: `/files/upload`,
method: "POST",
body: queryArg,
formData: true // need to add this flag on selected endpoints
}),
}),
}),
overrideExisting: false,
});