diff --git a/src/index.ts b/src/index.ts index f13b51b..e43a42f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -54,7 +54,13 @@ export function validationMetadataArrayToSchemas( const target = ownMetas[0].target as Function const metas = ownMetas .concat(getInheritedMetadatas(target, metadatas)) - .filter((propMeta) => !isExcluded(propMeta, options)) + .filter( + (propMeta) => + !( + isExcluded(propMeta, options) || + isExcluded({ ...propMeta, target }, options) + ) + ) const properties: { [name: string]: SchemaObject } = {}