redux-toolkit icon indicating copy to clipboard operation
redux-toolkit copied to clipboard

Codegen: Multiple output files not writing to file system in programmatic usage

Open zoubingwu opened this issue 3 years ago • 1 comments

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)
}

zoubingwu avatar Dec 02 '21 08:12 zoubingwu

also, the bin name in package.json is rtk-query-codegen-openapi, the doc uses npx:

image

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

zoubingwu avatar Dec 02 '21 08:12 zoubingwu