Skip to content

Commit

Permalink
Remove Ajv configuration from TypeBox Type Provider examples (#4249)
Browse files Browse the repository at this point in the history
  • Loading branch information
msmolens committed Sep 3, 2022
1 parent 65899b1 commit 8971520
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions docs/Reference/Type-Providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<TypeBoxTypeProvider>()
const server = Fastify().withTypeProvider<TypeBoxTypeProvider>()

server.register(plugin1) // wrong
server.register(plugin2) // correct
Expand Down Expand Up @@ -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<TypeBoxTypeProvider>()
const server = Fastify().withTypeProvider<TypeBoxTypeProvider>()

registerRoutes(server)

Expand Down

0 comments on commit 8971520

Please sign in to comment.