Skip to content

Commit

Permalink
fix: review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Souvikns committed Oct 12, 2023
1 parent 4f48945 commit 893a03b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/adapters/mqtt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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)
})
Expand Down

0 comments on commit 893a03b

Please sign in to comment.