From e0fe6eaad0bfad0ec5197b90522feb76b9167730 Mon Sep 17 00:00:00 2001 From: Yesha Mavani Date: Fri, 14 Nov 2025 11:29:17 +0530 Subject: [PATCH] fix(provider): remove metadata check before authorization authorization should work even if no method metadata is present GH-155 --- src/decorators/authorize.decorator.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/decorators/authorize.decorator.ts b/src/decorators/authorize.decorator.ts index f4a2808..93364bb 100644 --- a/src/decorators/authorize.decorator.ts +++ b/src/decorators/authorize.decorator.ts @@ -40,8 +40,9 @@ export function authorize(metadata: AuthorizationMetadata) { meta.spec = specPreprocessor(target, propertyKey, metadata, meta.spec); Reflector.deleteMetadata(OAI3KEY_METHODS, target, propertyKey); Reflector.defineMetadata(OAI3KEY_METHODS, meta, target, propertyKey); - authorizedecorator(target, propertyKey, descriptor); } + // authorization should work even if no method metadata is present + authorizedecorator(target, propertyKey, descriptor); }; return authorizationWithMetadata;