From 893a03b12f1f53bb4cf8620d68061e6ff5555f8c Mon Sep 17 00:00:00 2001 From: souvik Date: Thu, 12 Oct 2023 17:35:20 +0530 Subject: [PATCH] fix: review suggestions --- src/adapters/mqtt/index.ts | 2 +- src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/adapters/mqtt/index.ts b/src/adapters/mqtt/index.ts index 692a1aef0..50ab402eb 100644 --- a/src/adapters/mqtt/index.ts +++ b/src/adapters/mqtt/index.ts @@ -46,7 +46,7 @@ class MqttAdapter extends Adapter { let userAndPasswordSecurityReq let X509SecurityReq - const securityRequirements = this.AsyncAPIServer.security().map(e => e.map(e => e.scheme())) + const securityRequirements = this.AsyncAPIServer.security().map(e => e.all().map(e => e.scheme())) securityRequirements.forEach(security => { for (const sec of security) { diff --git a/src/index.ts b/src/index.ts index aa161cb87..c2d9e5fd9 100755 --- a/src/index.ts +++ b/src/index.ts @@ -84,7 +84,7 @@ export default async function GleeAppInitializer() { if (operationId) { const schema = { - oneOf: operation.messages().filterByReceive().map(m => m.payload()) + oneOf: operation.messages().filterByReceive().map(m => m.payload().json()) } as any app.use(channelName, validate(schema), (event, next) => { triggerFunction({ @@ -98,7 +98,7 @@ export default async function GleeAppInitializer() { channel.operations().filterBySend().forEach(operation => { const schema = { - oneOf: operation.messages().filterBySend().map(m => m.payload()) + oneOf: operation.messages().filterBySend().map(m => m.payload().json()) } as any app.useOutbound(channelName, validate(schema), json2string) })