From f8e6e49a7d2e49491f53bbc32648a02096223ce9 Mon Sep 17 00:00:00 2001 From: Max Smolens Date: Fri, 2 Sep 2022 15:38:23 -0400 Subject: [PATCH] Remove Ajv configuration from TypeBox Type Provider examples Remove Ajv configuration from example code in the Type Providers documentation. As described in https://github.com/fastify/fastify/pull/4095, TypeBox no longer requires explicitly configuring Ajv to recognize the `kind` and `modifier` keywords. --- docs/Reference/Type-Providers.md | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/docs/Reference/Type-Providers.md b/docs/Reference/Type-Providers.md index 3ec4215686..4cfe8dcd32 100644 --- a/docs/Reference/Type-Providers.md +++ b/docs/Reference/Type-Providers.md @@ -155,14 +155,7 @@ import Fastify from 'fastify' import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox' import { Type } from '@sinclair/typebox' -const server = Fastify({ - ajv: { - customOptions: { - strict: 'log', - keywords: ['kind', 'modifier'], - }, - }, -}).withTypeProvider() +const server = Fastify().withTypeProvider() server.register(plugin1) // wrong server.register(plugin2) // correct @@ -213,14 +206,7 @@ import Fastify from 'fastify' import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox' import { registerRoutes } from './routes' -const server = Fastify({ - ajv: { - customOptions: { - strict: 'log', - keywords: ['kind', 'modifier'], - }, - }, -}).withTypeProvider() +const server = Fastify().withTypeProvider() registerRoutes(server)