Redux Action Generator
This tool can generate redux request actions and related interface from swagger.
it can avoid duplicate of template code for redux request actions.
Configuration
create a new json file named ts-codegen.config.json
in your project root directory
{
"output": ".output",
"actionCreatorImport": "import { createRequestAction } from 'examples/requestActionCreators';\n\n",
"clients": ["https://app.swaggerhub.com/apiproxy/registry/teobler/integration-example/1.0.0"],
"data": ["./examples/openAPI.json"]
}
- output: your output directory
- actionCreatorImport: import your own requestActionCreator
- clients: your project swagger online address
- data: swagger offline file path
Start
npm install
- Configure your own ts-codegen.config.json
- Run cli
ts-codegen
Note
- This repo is forked from ts-codegen by @reeli
- This tool only for swagger v3 now