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
{
// your output directory
"output": ".output",
// import your own requestActionCreator
"actionCreatorImport": "import { createRequestAction } from 'examples/requestActionCreators';\n\n",
// your project swagger online address
"clients": ["https://app.swaggerhub.com/apiproxy/registry/teobler/integration-example/1.0.0"],
// swagger offline file path
"data": ["./examples/swagger.json"]
}
Start
npm install
- Configure your own ts-codegen.config.json
- Run cli
ts-codegen