@sebspark/openapi-client
v1.5.1
Published
A typed REST client for the definitions from openapi-typegen
Downloads
2,122
Keywords
Readme
@sebspark/openapi-client
A typed REST client for the definitions from openapi-typegen
Usage
Install
yarn add @sebspark/openapi-client`
or
npm install @sebspark/openapi-client`
Generate client type
Code
import { TypedClient } from '@sebspark/openapi-client'
import { MarketdataClient } from './schemas/marketdata'
const client = TypedClient<MarketdataClient>(`https://example.com/api`)
const {data} = await client.get('/markets')
Example
Example can be found in @sebspark/openapi-e2e