operationFetcherFnName naming
Great library!
Is there any way to change the operationFetcherFnName?
Ideally I'd like to export getMyDataType as a fetch component and useGetMyDataType as a react-query component.
hi @mhaagens it is currently hardcoded
https://github.com/fabien0102/openapi-codegen/blob/13ca9b35ab0bbd363946baf4a015b3e6d317f728/plugins/typescript/src/generators/generateReactQueryComponents.ts#L146
but, I think we can expose it to configuration for better DX. Something like fetchFnPrefix
This is also kinda related with https://github.com/fabien0102/openapi-codegen/issues/80
But, I can offer you an ugly trick to do that without waiting for the implementation.
on openapi-codegen.config.ts file after all the generation has done.
You can read the generated file with
let content = fs.readFileSync('___actualPathOfTheSchemas___/xxxSchemas.ts').toString()
do some regex replacement on it. (you have 2 places to replace)
***put some regex magic here***
and write it back.
fs.writeFileSync('___actualPathOfTheSchemas___/xxxSchemas.ts', ___replacedContent___);