1.48.0 • Published 27 days ago

openapi-ts-sdk v1.48.0

Weekly downloads
37
License
MIT
Repository
github
Last release
27 days ago

OpenAPI TypeScript SDK Generator

This tool allows generating a TypeScript SDK from OpenAPI specification files. This will provide you with fully typed API library to use in a client-side application.

Install

npm install -D openapi-ts-sdk

You will also need some dependencies used by the generated code:

npm install -S axios qs
npm install -D @types/qs

Usage sample

openapi-ts-sdk /path/to/service1/openapi.json /path/to/service2/openapi.json --outDir /path/to/client/sdk

This command will take your openapi.json files and generate a TypeScript SDK within your client-side project. You will then be able to import it in your code:

import { createSdkClient } from '../sdk';

const sdk = createSdkClient({
  baseUrl: process.env.API_URL,
});

const { company } = await sdk.companies.id(9526).get();
console.log(company);
1.48.0

27 days ago

1.47.0

27 days ago

1.46.0

1 month ago

1.45.0

1 month ago

1.44.0

7 months ago

1.36.0

1 year ago

1.38.0

1 year ago

1.39.0

1 year ago

1.40.0

1 year ago

1.42.0

1 year ago

1.41.0

1 year ago

1.43.0

1 year ago

1.33.0

1 year ago

1.29.0

2 years ago

1.27.0

2 years ago

1.32.0

2 years ago

1.31.0

2 years ago

1.25.0

2 years ago

1.24.0

2 years ago

1.17.0

3 years ago

1.16.0

3 years ago

1.15.0

3 years ago

1.13.0

4 years ago

1.11.0

4 years ago

1.9.2

4 years ago

1.9.1

4 years ago

1.9.0

4 years ago

1.8.0

4 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.0.0

4 years ago

0.1.0

4 years ago