From 89031b44e43263d49931b31e5581ea1e939cccbd Mon Sep 17 00:00:00 2001 From: Yesha Mavani Date: Tue, 18 Nov 2025 13:00:31 +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;