0.2.4 • Published 9 months ago
@openapi-fetch/cli v0.2.4
openapi-fetch
About
Generate TypeScript client with OpenAPI spec.
Usage
Step 1
npm install @openapi-fetch/client
Step 2
add .openapi-fetch.json file to project root dir.
{
"items": [
{
"name": "petstore3",
"spec": "https://petstore3.swagger.io/api/v3/openapi.json"
}
]
}
Step 3
run
npx @openapi-fetch/cli
Step 4
import { petstore3 } from "@openapi-fetch/client";
petstore3.findPetsByStatus().then((res) => {
console.log(res);
});