diff --git a/package-lock.json b/package-lock.json index 3bf5a6e..4df6883 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/http", - "version": "5.52.0", + "version": "5.53.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/http", - "version": "5.52.0", + "version": "5.53.0", "license": "MIT", "devDependencies": { "@athenna/artisan": "^5.11.0", diff --git a/package.json b/package.json index 4d2da03..166fd1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/http", - "version": "5.52.0", + "version": "5.53.0", "description": "The Athenna Http server. Built on top of fastify.", "license": "MIT", "author": "João Lenon ", diff --git a/src/providers/HttpServerProvider.ts b/src/providers/HttpServerProvider.ts index 660fb29..9edf91e 100644 --- a/src/providers/HttpServerProvider.ts +++ b/src/providers/HttpServerProvider.ts @@ -7,15 +7,22 @@ * file that was distributed with this source code. */ +import { Options } from '@athenna/common' import { ServiceProvider } from '@athenna/ioc' import { ServerImpl } from '#src/server/ServerImpl' +import type { FastifyServerOptions } from 'fastify' export class HttpServerProvider extends ServiceProvider { public register() { - this.container.instance( - 'Athenna/Core/HttpServer', - new ServerImpl(Config.get('http.fastify')) - ) + const fastifyOptions = Options.create(Config.get('http.fastify'), { + ajv: { + customOptions: { + coerceTypes: false + } + } + }) + + this.container.instance('Athenna/Core/HttpServer', new ServerImpl(fastifyOptions)) } public async shutdown() {