From dfd288fd97d71caf23577f8f87707fa1506572e0 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Tue, 14 Mar 2023 09:27:06 +0100 Subject: [PATCH] fix: oneOf should not be allowed in message components (#345) --- definitions/3.0.0/components.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index f7c7a7d1..b4af5e44 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -21,7 +21,19 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" }, "messages": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messages.json" + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json" + } + ] + } + } }, "securitySchemes": { "type": "object",