@openapi-fetch/cli
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

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);
});

Readme

Keywords

none

Package Sidebar

Install

npm i @openapi-fetch/cli

Weekly Downloads

1

Version

0.2.4

License

MIT

Unpacked Size

122 kB

Total Files

34

Last publish

Collaborators

  • romehong