From 1557135344e55b08828d4fca5bc8a250f2f3fb89 Mon Sep 17 00:00:00 2001 From: James Sumners <321201+jsumners@users.noreply.github.com> Date: Tue, 2 Jul 2024 06:39:23 -0400 Subject: [PATCH] Update for v5 (#86) (#100) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: fastify 5 with separated type-providers * update fastify dep --------- Signed-off-by: Gürgün Dayıoğlu Co-authored-by: Bram-dc Co-authored-by: Gürgün Dayıoğlu --- index.ts | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index b8c7530..69dd1d0 100644 --- a/index.ts +++ b/index.ts @@ -11,7 +11,8 @@ import { import { FromSchema, FromSchemaDefaultOptions, FromSchemaOptions, JSONSchema } from 'json-schema-to-ts' export interface JsonSchemaToTsProvider extends FastifyTypeProvider { - output: this['input'] extends JSONSchema ? FromSchema : unknown; + validator: this['schema'] extends JSONSchema ? FromSchema : unknown; + serializer: this['schema'] extends JSONSchema ? FromSchema : unknown; } /** diff --git a/package.json b/package.json index 7161faa..6cd18ae 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-n": "^16.6.2", "eslint-plugin-promise": "^6.2.0", - "fastify": "^4.27.0", + "fastify": "^5.0.0-alpha.3", "fastify-tsconfig": "^2.0.0", "json-schema-to-ts": "^3.1.0", "rimraf": "^5.0.7",