3.2.2 • Published 5 years ago

@salecycle/fastify-typescript-request-schema v3.2.2

Weekly downloads
24
License
MIT
Repository
github
Last release
5 years ago

fastify-typescript-request-schema

Automatically generated typescript types from json response/request schemas written for fastify

Installation

npm install --save @salecycle/fastify-typescript-request-schema

Usage

The package currently takes one command, which is a glob that locates the schema files to be transformed.

This package acts as a command, as such it's easiest just to add the call to the scripts section of your package json.

So, given that all my fastify json schema files are called schema.json I can add the following to the scripts section of my package.json to allow me to generate the typescript files:

"generateTypes": "fastify-typescript-request-schema \"src/**/schema.json\""

then running npm run generateTypes will result in schema.ts files being created in the same directory as the associated schema.json file.

3.2.2

5 years ago

3.2.1

5 years ago

3.2.0

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago