api-gen-package
v1.0.120
Published
A package that generates TypeScript APIs and interfaces from Swagger YAML files.
Downloads
12
Maintainers
Readme
API Gen Package
A CLI tool to automatically generate TypeScript APIs, interfaces, and React Query hooks from Swagger/OpenAPI YAML files. The package also generates CRUD dashboards for React with Ant Design components.
Features
- API Functions: Generates API methods (GET, POST, PUT, DELETE) from a Swagger schema.
- TypeScript Interfaces: Automatically converts Swagger models into TypeScript interfaces.
- React Query Hooks: Provides ready-to-use hooks for data fetching and mutation with React Query.
- CRUD Dashboards: Generates React dashboard pages with Ant Design forms and tables.
Installation
Install the package globally:
npm install -g api-gen-package
Usage
how to use it
api-gen [schema.yaml] [output-directory]