redux-toolkit
redux-toolkit copied to clipboard
Codegen: Multiple output files not writing to file system in programmatic usage
Should do parseConfig first before calling generateEndpoints, this might worth mentioning in docs.
import { parseConfig } from '@rtk-query/codegen-openapi'
for (const c of parseConfig(config)) {
await generateEndpoints(c)
}
also, the bin name in package.json is rtk-query-codegen-openapi, the doc uses npx:

is it possible to make it consistent so you don't have download the package again when run npx command in terminal?