Skip to content

Create rapidly fully type-safe services that consume REST APIs through a Swagger/OpenAPI 2.0 file.

Notifications You must be signed in to change notification settings

mr-smith-org/typescript-rest-services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

Swagger-Based Code Generator (TypeScript)

Create rapidly fully type-safe services that consume REST APIs through a Swagger/OpenAPI 2.0 file.

mr exec module -m typescript-rest-services -r create-services 

out

Usage

With axios

const services = buildServices(new AxiosHttpProvider("https://petstore.swagger.io/v2/"));
services.pet.getPetById({ params: { petId: 1 } }).then(result => console.log(result.data));

With fetch API

const services = buildServices(new FetchHttpProvider("https://petstore.swagger.io/v2/"));
services.pet.getPetById({ params: { petId: 1 } }).then(result => console.log(result.data));

Mr. Smith docs

https://mr-smith.site

About

Create rapidly fully type-safe services that consume REST APIs through a Swagger/OpenAPI 2.0 file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages