Gathering detailed insights and metrics for @waiin/openapi-tools
Gathering detailed insights and metrics for @waiin/openapi-tools
Gathering detailed insights and metrics for @waiin/openapi-tools
Gathering detailed insights and metrics for @waiin/openapi-tools
npm install @waiin/openapi-tools
Typescript
Module System
Node Version
NPM Version
31.9
Supply Chain
88.4
Quality
84.1
Maintenance
100
Vulnerability
100
License
Total Downloads
523
Last Day
3
Last Week
21
Last Month
91
Last Year
523
Minified
Minified + Gzipped
Latest Version
1.0.4
Package Id
@waiin/openapi-tools@1.0.4
Unpacked Size
38.06 kB
Size
12.34 kB
File Count
4
NPM Version
10.8.2
Node Version
18.20.7
Published on
Mar 28, 2025
Cumulative downloads
Total Downloads
Last Day
0%
3
Compared to previous day
Last Week
75%
21
Compared to previous week
Last Month
-55.2%
91
Compared to previous month
Last Year
0%
523
Compared to previous year
1
🔧 @waiin/openapi-tools is a powerful tool and library designed to streamline API development by generating proxy services and Redux integrations for React applications based on OpenAPI specifications. It supports any JSON from Swagger, allowing seamless API consumption with minimal effort.
✅ Automatically creates API service layers from OpenAPI specs.
✅ Supports RESTful API requests with built-in configurations.
✅ Reduces boilerplate code for API calls.
✅ Generates Redux slices and hooks for API state management.
✅ Provides seamless state management for API responses.
✅ Enables easy caching and refetching of data.
✅ Works with any JSON format from Swagger/OpenAPI.
✅ Parses OpenAPI definitions to generate type-safe API services.
✅ Allows modifications to generated services.
✅ Configurable templates for service generation.
✅ Simple CLI commands for API generation.
✅ Minimal configuration required for setup.
Install using npm:
1npm install @waiin/openapi-tools
package.json
1"scripts": { 2 "generate": "npx openapi-tools --source <local_path_or_url> --output <output_directory>" 3}
1"scripts": { 2 "generate": "npx openapi-tools --source D:/Waiin/controller-api/gen/http/openapi3.json --output src/middleware" 3}
1"scripts": { 2 "generate": "npx openapi-tools --source https://petstore3.swagger.io/api/v3/openapi.json --output src/middleware" 3}
1npm run generate
Generated API hooks and Redux slices allow easy integration:
1import { useEffect } from "react"; 2import { useDispatch, useSelector } from "react-redux"; 3import { listFindPetsByStatus, StatusEnum } from "./api/petService"; 4 5const App = () => { 6 const dispatch = useDispatch(); 7 const pets = useSelector((state: any) => state.petReducer); 8 9 useEffect(() => { 10 dispatch(listFindPetsByStatus(StatusEnum.Sold)); 11 }, [dispatch]); 12 13 return <div>{JSON.stringify(pets)}</div>; 14};
1 2const axiosInstance = axios.create({ baseURL: 'https://petstore3.swagger.io/api/v3' }); 3 4axiosInstance.interceptors.response.use( 5 (response) => response, 6 (error) => Promise.reject((error.response && error.response.data) || 'Something went wrong!') 7); 8export const store = configureStore({ 9 reducer: CombineReducers, 10 middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(thunk, axiosMiddleware(axiosInstance)), 11}); 12export type RootStateType = ReturnType<typeof store.getState>; 13
🚀 Boost Productivity – Save time on writing API calls manually.
⚡ Seamless Redux Integration – Get auto-generated slices & hooks.
📖 Type-Safe Code – Ensures strong typing with OpenAPI.
🔧 Customizable & Scalable – Modify templates as per project needs.
🔥 Supercharge your API workflow today! Install and start using @waiin/openapi-tools
now. 🚀
No vulnerabilities found.
No security vulnerabilities found.