Skip to content

benrozsa/my-openapi-project

Repository files navigation

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Running the app

# development
$ npm run start

Generate schema

# run in another terminal window
$ npx openapi-typescript http://localhost:3000/api-json  --output generated/schema.ts    
import { ApiType } from './api-lib';

// create typed api call
type ApiCall = ApiType<'/post/{id}', 'delete'>;
const apiCall: ApiCall = {
  path: '/post/{id}',
  method: 'delete',
  params: { id: 1234 },
};

About

Generate type-safe API Client

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published