From 454e2124668fea1f3ced233e77c4b36f3f56c4aa Mon Sep 17 00:00:00 2001 From: Matan Yadaev Date: Tue, 30 Jul 2024 15:35:43 +0300 Subject: [PATCH] ignore example keyword --- package.json | 2 +- src/decorators.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 96f0510..28e5dac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ballerine-nestjs-typebox", - "version": "3.0.2-next.9", + "version": "3.0.2-next.10", "description": "", "author": "Andrew Smiley ", "license": "MIT", diff --git a/src/decorators.ts b/src/decorators.ts index 367f785..f52acbe 100644 --- a/src/decorators.ts +++ b/src/decorators.ts @@ -6,7 +6,9 @@ import { ApiBody, ApiOperation, ApiParam, ApiQuery } from '@nestjs/swagger'; import { DECORATORS } from '@nestjs/swagger/dist/constants.js'; import { Static, TSchema, Type, TypeGuard } from '@sinclair/typebox'; import Ajv from 'ajv'; +import AjvFormats from 'ajv-formats'; import fastUri from 'fast-uri'; + import { AjvValidationException } from './exceptions.js'; import { TypeboxTransformInterceptor } from './interceptors.js'; import type { @@ -22,8 +24,6 @@ import type { } from './types.js'; import { capitalize, coerceType, isObj } from './util.js'; -import AjvFormats from 'ajv-formats'; - const ajv = new Ajv({ coerceTypes: 'array', useDefaults: true, @@ -35,7 +35,7 @@ const ajv = new Ajv({ allErrors: false, // Our custom options: - keywords: ['transform'], + keywords: ['transform', 'example'], }); AjvFormats.default(ajv);