From 7c909a79d25bcd583796b5989a762fd003c3bd64 Mon Sep 17 00:00:00 2001 From: Pavel Bodiachevskii Date: Wed, 24 Jul 2024 18:13:16 +0400 Subject: [PATCH] test(definitions): channel new tests structure https://github.com/asyncapi/spec-json-schemas/issues/551 --- .../models/channel/channel parameter.test.mjs | 59 + .../3.0.0/models/channel/channel.test.mjs | 82 + .../3.0.0/models/channel/channel/empty.json | 1 - .../3.0.0/models/channel/channel/example.json | 1994 ---------------- .../models/channel/channel/extended.json | 1999 ---------------- .../3.0.0/models/channel/channel/index.mjs | 37 - .../channel/only required properties.json | 1 - .../channel/without required properties.json | 1994 ---------------- .../channel/channel/wrongly extended.json | 2000 ----------------- .../3.0.0/models/channel/index.mjs | 7 - .../channel/message correlation id.test.mjs | 52 + .../models/channel/message example.test.mjs | 83 + .../models/channel/message trait.test.mjs | 45 + .../3.0.0/models/channel/message.test.mjs | 97 + .../channel/message/correlationId/empty.json | 1 - .../message/correlationId/example.json | 4 - .../message/correlationId/extended.json | 9 - .../channel/message/correlationId/index.mjs | 39 - .../only required properties.json | 3 - .../without required properties.json | 3 - .../correlationId/wrongly extended.json | 10 - .../3.0.0/models/channel/message/index.mjs | 8 - .../models/channel/message/message/empty.json | 1 - .../channel/message/message/example.json | 607 ----- .../channel/message/message/extended.json | 612 ----- .../models/channel/message/message/index.mjs | 37 - .../message/only required properties.json | 1 - .../message/without required properties.json | 150 -- .../message/message/wrongly extended.json | 613 ----- .../channel/message/messageExample/empty.json | 1 - .../message/messageExample/example.json | 16 - .../message/messageExample/extended.json | 21 - .../channel/message/messageExample/index.mjs | 47 - .../only required properties.json | 14 - .../without required properties.json | 4 - .../messageExample/wrongly extended.json | 22 - .../channel/message/messageTrait/empty.json | 1 - .../channel/message/messageTrait/example.json | 150 -- .../message/messageTrait/extended.json | 155 -- .../channel/message/messageTrait/index.mjs | 37 - .../only required properties.json | 1 - .../without required properties.json | 150 -- .../messageTrait/wrongly extended.json | 156 -- .../3.0.0/models/channel/parameter/empty.json | 1 - .../models/channel/parameter/example.json | 17 - .../models/channel/parameter/extended.json | 22 - .../3.0.0/models/channel/parameter/index.mjs | 37 - .../parameter/only required properties.json | 1 - .../without required properties.json | 17 - .../channel/parameter/wrongly extended.json | 23 - 50 files changed, 418 insertions(+), 11024 deletions(-) create mode 100644 test/definitions/3.0.0/models/channel/channel parameter.test.mjs create mode 100644 test/definitions/3.0.0/models/channel/channel.test.mjs delete mode 100644 test/definitions/3.0.0/models/channel/channel/empty.json delete mode 100644 test/definitions/3.0.0/models/channel/channel/example.json delete mode 100644 test/definitions/3.0.0/models/channel/channel/extended.json delete mode 100644 test/definitions/3.0.0/models/channel/channel/index.mjs delete mode 100644 test/definitions/3.0.0/models/channel/channel/only required properties.json delete mode 100644 test/definitions/3.0.0/models/channel/channel/without required properties.json delete mode 100644 test/definitions/3.0.0/models/channel/channel/wrongly extended.json delete mode 100644 test/definitions/3.0.0/models/channel/index.mjs create mode 100644 test/definitions/3.0.0/models/channel/message correlation id.test.mjs create mode 100644 test/definitions/3.0.0/models/channel/message example.test.mjs create mode 100644 test/definitions/3.0.0/models/channel/message trait.test.mjs create mode 100644 test/definitions/3.0.0/models/channel/message.test.mjs delete mode 100644 test/definitions/3.0.0/models/channel/message/correlationId/empty.json delete mode 100644 test/definitions/3.0.0/models/channel/message/correlationId/example.json delete mode 100644 test/definitions/3.0.0/models/channel/message/correlationId/extended.json delete mode 100644 test/definitions/3.0.0/models/channel/message/correlationId/index.mjs delete mode 100644 test/definitions/3.0.0/models/channel/message/correlationId/only required properties.json delete mode 100644 test/definitions/3.0.0/models/channel/message/correlationId/without required properties.json delete mode 100644 test/definitions/3.0.0/models/channel/message/correlationId/wrongly extended.json delete mode 100644 test/definitions/3.0.0/models/channel/message/index.mjs delete mode 100644 test/definitions/3.0.0/models/channel/message/message/empty.json delete mode 100644 test/definitions/3.0.0/models/channel/message/message/example.json delete mode 100644 test/definitions/3.0.0/models/channel/message/message/extended.json delete mode 100644 test/definitions/3.0.0/models/channel/message/message/index.mjs delete mode 100644 test/definitions/3.0.0/models/channel/message/message/only required properties.json delete mode 100644 test/definitions/3.0.0/models/channel/message/message/without required properties.json delete mode 100644 test/definitions/3.0.0/models/channel/message/message/wrongly extended.json delete mode 100644 test/definitions/3.0.0/models/channel/message/messageExample/empty.json delete mode 100644 test/definitions/3.0.0/models/channel/message/messageExample/example.json delete mode 100644 test/definitions/3.0.0/models/channel/message/messageExample/extended.json delete mode 100644 test/definitions/3.0.0/models/channel/message/messageExample/index.mjs delete mode 100644 test/definitions/3.0.0/models/channel/message/messageExample/only required properties.json delete mode 100644 test/definitions/3.0.0/models/channel/message/messageExample/without required properties.json delete mode 100644 test/definitions/3.0.0/models/channel/message/messageExample/wrongly extended.json delete mode 100644 test/definitions/3.0.0/models/channel/message/messageTrait/empty.json delete mode 100644 test/definitions/3.0.0/models/channel/message/messageTrait/example.json delete mode 100644 test/definitions/3.0.0/models/channel/message/messageTrait/extended.json delete mode 100644 test/definitions/3.0.0/models/channel/message/messageTrait/index.mjs delete mode 100644 test/definitions/3.0.0/models/channel/message/messageTrait/only required properties.json delete mode 100644 test/definitions/3.0.0/models/channel/message/messageTrait/without required properties.json delete mode 100644 test/definitions/3.0.0/models/channel/message/messageTrait/wrongly extended.json delete mode 100644 test/definitions/3.0.0/models/channel/parameter/empty.json delete mode 100644 test/definitions/3.0.0/models/channel/parameter/example.json delete mode 100644 test/definitions/3.0.0/models/channel/parameter/extended.json delete mode 100644 test/definitions/3.0.0/models/channel/parameter/index.mjs delete mode 100644 test/definitions/3.0.0/models/channel/parameter/only required properties.json delete mode 100644 test/definitions/3.0.0/models/channel/parameter/without required properties.json delete mode 100644 test/definitions/3.0.0/models/channel/parameter/wrongly extended.json diff --git a/test/definitions/3.0.0/models/channel/channel parameter.test.mjs b/test/definitions/3.0.0/models/channel/channel parameter.test.mjs new file mode 100644 index 00000000..09491146 --- /dev/null +++ b/test/definitions/3.0.0/models/channel/channel parameter.test.mjs @@ -0,0 +1,59 @@ +import { + JsonSchemaTestSuite, + JsonSchemaTestSuiteConfig, + JsonSchemaTestSuiteData +} from '@test/definitions/base-schema-test.mjs'; +import {describe} from 'vitest'; + +const jsonSchema = require('@definitions/3.0.0/parameter.json'); + +const config = new JsonSchemaTestSuiteConfig( + false, + [], + true, + [] +); + +const data = new JsonSchemaTestSuiteData( + jsonSchema, + [ + { + "description": "Id of the user.", + "default": "0e822ca6-5311-4d4c-b409-993a1820e689", + "enum": [ + "0e822ca6-5311-4d4c-b409-993a1820e689", + "381f5ddc-75c6-4c21-9ec1-3919ed345be9", + "70559d88-31a5-4ef2-8c34-7fbd04057ed5", + "c6dc0047-a90d-4efa-95e3-a272282934e0" + ], + "examples": [ + "0e822ca6-5311-4d4c-b409-993a1820e689", + "381f5ddc-75c6-4c21-9ec1-3919ed345be9", + "70559d88-31a5-4ef2-8c34-7fbd04057ed5", + "c6dc0047-a90d-4efa-95e3-a272282934e0" + ], + "location": "$message.payload#/user/id" + } + ], + {}, + {}, + { + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + } + }, + { + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 + } +); + +describe('Channel Parameter', () => { + new JsonSchemaTestSuite(data, config).testSuite() +}); diff --git a/test/definitions/3.0.0/models/channel/channel.test.mjs b/test/definitions/3.0.0/models/channel/channel.test.mjs new file mode 100644 index 00000000..d121772d --- /dev/null +++ b/test/definitions/3.0.0/models/channel/channel.test.mjs @@ -0,0 +1,82 @@ +import { + JsonSchemaTestSuite, + JsonSchemaTestSuiteConfig, + JsonSchemaTestSuiteData +} from '@test/definitions/base-schema-test.mjs'; +import {describe} from 'vitest'; + +const jsonSchema = require('@definitions/3.0.0/channel.json'); + +const config = new JsonSchemaTestSuiteConfig( + false, + [], + true, + [] +); + +const data = new JsonSchemaTestSuiteData( + jsonSchema, + [ + { + "address": "users.{userId}", + "title": "Users channel", + "description": "This channel is used to exchange messages about user events.", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + }, + "userCompletedOrder": { + "$ref": "#/components/messages/userCompletedOrder" + } + }, + "parameters": { + "userId": { + "$ref": "#/components/parameters/userId" + } + }, + "servers": [ + { "$ref": "#/servers/rabbitmqInProd" }, + { "$ref": "#/servers/rabbitmqInStaging" } + ], + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "exclusive": true + } + } + }, + "tags": [ + { + "name": "user", + "description": "User-related messages" + } + ], + "externalDocs": { + "description": "Find more info here", + "url": "https://example.com" + } + } + ], + {}, + {}, + { + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + } + }, + { + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 + } +); + +describe('Channel', () => { + new JsonSchemaTestSuite(data, config).testSuite() +}); diff --git a/test/definitions/3.0.0/models/channel/channel/empty.json b/test/definitions/3.0.0/models/channel/channel/empty.json deleted file mode 100644 index 0967ef42..00000000 --- a/test/definitions/3.0.0/models/channel/channel/empty.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test/definitions/3.0.0/models/channel/channel/example.json b/test/definitions/3.0.0/models/channel/channel/example.json deleted file mode 100644 index 99e41d24..00000000 --- a/test/definitions/3.0.0/models/channel/channel/example.json +++ /dev/null @@ -1,1994 +0,0 @@ -{ - "address": "users.{userId}", - "title": "Users channel", - "summary": "messages about user events.", - "description": "This channel is used to exchange messages about users signing up", - "servers": [ - { "$ref": "#/components/servers/1"}, - { "$ref": "#/components/servers/2"}, - { "$ref": "#/components/servers/3"} - ], - "parameters": { - "userId": { - "description": "Id of the user.", - "default": "0e822ca6-5311-4d4c-b409-993a1820e689", - "enum": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "examples": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "location": "$message.payload#/user/id" - }, - "userStatus": { "$ref": "#/components/parameters/user-status"} - }, - "messages": { - "changeStatus": { "$ref": "#/components/parameters/user-status"}, - "message": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "payload": { - "type": "object", - "properties": { - "metric": { - "description": "Metric set by application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - }, - "message 2": { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "payload": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "metric": { - "description": "Metric set by application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref" : "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - }, - "message with reference": { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "payload": { - "$ref": "#/components/messages/message-payload" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - } - }, - "bindings": { - "amqp": { - "is": "routingKey", - "queue": { - "name": "my-queue-name", - "durable": true, - "exclusive": true, - "autoDelete": false, - "vhost": "/" - }, - "exchange": { - "name": "myExchange", - "type": "topic", - "durable": true, - "autoDelete": false, - "vhost": "/" - }, - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/channelBindings/amqp1" - }, - "anypointmq": { - "destination": "user-signup-exchg", - "destinationType": "exchange", - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "topic": "projects/your-project/topics/topic-proto-schema", - "messageRetentionDuration": "86400s", - "messageStoragePolicy": { - "allowedPersistenceRegions": [ - "us-central1", - "us-central2", - "us-east1", - "us-east4", - "us-east5", - "us-east7", - "us-south1", - "us-west1", - "us-west2", - "us-west3", - "us-west4" - ] - }, - "schemaSettings": { - "encoding": "binary", - "name": "projects/your-project/schemas/message-proto" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "$ref": "#/components/channelBindings/http" - }, - "ibmmq": { - "destinationType": "topic", - "queue": { - "objectName": "message", - "isPartitioned": false, - "exclusive": true - }, - "topic": { - "string": "messages", - "objectName": "message", - "durablePermitted": true, - "lastMsgRetained": true - }, - "maxMsgLength": 1024, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/channelBindings/jms" - }, - "kafka": { - "topic": "my-specific-topic-name", - "partitions": 20, - "replicas": 3, - "topicConfiguration": { - "cleanup.policy": [ - "delete", - "compact" - ], - "retention.ms": 604800000, - "retention.bytes": 1000000000, - "delete.retention.ms": 86400000, - "max.message.bytes": 1048588 - }, - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/channelBindings/mercure" - }, - "mqtt": { - "$ref": "#/components/channelBindings/mqtt" - }, - "mqtt5": { - "$ref": "#/components/channelBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/channelBindings/nats" - }, - "pulsar": { - "namespace": "staging", - "persistence": "persistent", - "compaction": 1000, - "geo-replication": [ - "us-east1", - "us-west1" - ], - "retention": { - "time": 7, - "size": 1000 - }, - "ttl": 360, - "deduplication": false, - "bindingVersion": "0.1.0" - }, - "redis": { - "$ref": "#/components/channelBindings/redis" - }, - "sns": { - "$ref": "#/components/channelBindings/sns" - }, - "solace": { - "$ref": "#/components/channelBindings/solace" - }, - "sqs": { - "$ref": "#/components/channelBindings/sqs" - }, - "stomp": { - "$ref": "#/components/channelBindings/stomp" - }, - "ws": { - "method": "GET", - "query": { - "type": "object", - "properties": { - "ref": { - "type": "string", - "description": "Referral." - } - } - }, - "headers": { - "type": "object", - "properties": { - "Authentication": { - "type": "string", - "description": "Authentication token" - } - } - } - } - }, - "tags": [ - { - "name": "user", - "description": "User-related messages", - "externalDocs": { - "description" : "Find more info here", - "url" : "https://example.com" - } - }, - { - "name": "user", - "description": "User-related messages", - "externalDocs": { - "$ref": "#/components/external-doc" - } - }, - { - "$ref": "#/components/tag" - } - ], - "externalDocs": { - "description" : "Find more info here", - "url" : "https://example.com" - } -} diff --git a/test/definitions/3.0.0/models/channel/channel/extended.json b/test/definitions/3.0.0/models/channel/channel/extended.json deleted file mode 100644 index 1403f905..00000000 --- a/test/definitions/3.0.0/models/channel/channel/extended.json +++ /dev/null @@ -1,1999 +0,0 @@ -{ - "address": "users.{userId}", - "title": "Users channel", - "summary": "messages about user events.", - "description": "This channel is used to exchange messages about users signing up", - "servers": [ - { "$ref": "#/components/servers/1"}, - { "$ref": "#/components/servers/2"}, - { "$ref": "#/components/servers/3"} - ], - "parameters": { - "userId": { - "description": "Id of the user.", - "default": "0e822ca6-5311-4d4c-b409-993a1820e689", - "enum": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "examples": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "location": "$message.payload#/user/id" - }, - "userStatus": { "$ref": "#/components/parameters/user-status"} - }, - "messages": { - "changeStatus": { "$ref": "#/components/parameters/user-status"}, - "message": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "payload": { - "type": "object", - "properties": { - "metric": { - "description": "Metric set by application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - }, - "message 2": { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "payload": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "metric": { - "description": "Metric set by application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref" : "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - }, - "message with reference": { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "payload": { - "$ref": "#/components/messages/message-payload" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - } - }, - "bindings": { - "amqp": { - "is": "routingKey", - "queue": { - "name": "my-queue-name", - "durable": true, - "exclusive": true, - "autoDelete": false, - "vhost": "/" - }, - "exchange": { - "name": "myExchange", - "type": "topic", - "durable": true, - "autoDelete": false, - "vhost": "/" - }, - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/channelBindings/amqp1" - }, - "anypointmq": { - "destination": "user-signup-exchg", - "destinationType": "exchange", - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "topic": "projects/your-project/topics/topic-proto-schema", - "messageRetentionDuration": "86400s", - "messageStoragePolicy": { - "allowedPersistenceRegions": [ - "us-central1", - "us-central2", - "us-east1", - "us-east4", - "us-east5", - "us-east7", - "us-south1", - "us-west1", - "us-west2", - "us-west3", - "us-west4" - ] - }, - "schemaSettings": { - "encoding": "binary", - "name": "projects/your-project/schemas/message-proto" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "$ref": "#/components/channelBindings/http" - }, - "ibmmq": { - "destinationType": "topic", - "queue": { - "objectName": "message", - "isPartitioned": false, - "exclusive": true - }, - "topic": { - "string": "messages", - "objectName": "message", - "durablePermitted": true, - "lastMsgRetained": true - }, - "maxMsgLength": 1024, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/channelBindings/jms" - }, - "kafka": { - "topic": "my-specific-topic-name", - "partitions": 20, - "replicas": 3, - "topicConfiguration": { - "cleanup.policy": [ - "delete", - "compact" - ], - "retention.ms": 604800000, - "retention.bytes": 1000000000, - "delete.retention.ms": 86400000, - "max.message.bytes": 1048588 - }, - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/channelBindings/mercure" - }, - "mqtt": { - "$ref": "#/components/channelBindings/mqtt" - }, - "mqtt5": { - "$ref": "#/components/channelBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/channelBindings/nats" - }, - "pulsar": { - "namespace": "staging", - "persistence": "persistent", - "compaction": 1000, - "geo-replication": [ - "us-east1", - "us-west1" - ], - "retention": { - "time": 7, - "size": 1000 - }, - "ttl": 360, - "deduplication": false, - "bindingVersion": "0.1.0" - }, - "redis": { - "$ref": "#/components/channelBindings/redis" - }, - "sns": { - "$ref": "#/components/channelBindings/sns" - }, - "solace": { - "$ref": "#/components/channelBindings/solace" - }, - "sqs": { - "$ref": "#/components/channelBindings/sqs" - }, - "stomp": { - "$ref": "#/components/channelBindings/stomp" - }, - "ws": { - "method": "GET", - "query": { - "type": "object", - "properties": { - "ref": { - "type": "string", - "description": "Referral." - } - } - }, - "headers": { - "type": "object", - "properties": { - "Authentication": { - "type": "string", - "description": "Authentication token" - } - } - } - } - }, - "tags": [ - { - "name": "user", - "description": "User-related messages", - "externalDocs": { - "description" : "Find more info here", - "url" : "https://example.com" - } - }, - { - "name": "user", - "description": "User-related messages", - "externalDocs": { - "$ref": "#/components/external-doc" - } - }, - { - "$ref": "#/components/tag" - } - ], - "externalDocs": { - "description" : "Find more info here", - "url" : "https://example.com" - }, - "x-number": 0, - "x-string": "", - "x-object": { - "property": {} - } -} diff --git a/test/definitions/3.0.0/models/channel/channel/index.mjs b/test/definitions/3.0.0/models/channel/channel/index.mjs deleted file mode 100644 index ae17245c..00000000 --- a/test/definitions/3.0.0/models/channel/channel/index.mjs +++ /dev/null @@ -1,37 +0,0 @@ -import {describe, it} from 'vitest'; -import TestHelper from '@test/test-helper'; -import path from 'path'; - -const jsonSchema = require('@definitions/3.0.0/channel.json'); - -describe.skip('Channel. Reason: multiple errors with bindings, externalDoc, ...', () => { - it('example', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './example.json'), - )); - - it('empty', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './empty.json'), - )); - - it('without required properties', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './without required properties.json'), - )); - - it('only required properties', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './only required properties.json'), - )); - - it('extended', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './extended.json'), - )); - - it('wrongly extended', () => TestHelper.wronglyExtended( - jsonSchema, - path.resolve(__dirname, './wrongly extended.json'), - )); -}); diff --git a/test/definitions/3.0.0/models/channel/channel/only required properties.json b/test/definitions/3.0.0/models/channel/channel/only required properties.json deleted file mode 100644 index 0967ef42..00000000 --- a/test/definitions/3.0.0/models/channel/channel/only required properties.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test/definitions/3.0.0/models/channel/channel/without required properties.json b/test/definitions/3.0.0/models/channel/channel/without required properties.json deleted file mode 100644 index 99e41d24..00000000 --- a/test/definitions/3.0.0/models/channel/channel/without required properties.json +++ /dev/null @@ -1,1994 +0,0 @@ -{ - "address": "users.{userId}", - "title": "Users channel", - "summary": "messages about user events.", - "description": "This channel is used to exchange messages about users signing up", - "servers": [ - { "$ref": "#/components/servers/1"}, - { "$ref": "#/components/servers/2"}, - { "$ref": "#/components/servers/3"} - ], - "parameters": { - "userId": { - "description": "Id of the user.", - "default": "0e822ca6-5311-4d4c-b409-993a1820e689", - "enum": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "examples": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "location": "$message.payload#/user/id" - }, - "userStatus": { "$ref": "#/components/parameters/user-status"} - }, - "messages": { - "changeStatus": { "$ref": "#/components/parameters/user-status"}, - "message": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "payload": { - "type": "object", - "properties": { - "metric": { - "description": "Metric set by application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - }, - "message 2": { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "payload": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "metric": { - "description": "Metric set by application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref" : "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - }, - "message with reference": { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "payload": { - "$ref": "#/components/messages/message-payload" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - } - }, - "bindings": { - "amqp": { - "is": "routingKey", - "queue": { - "name": "my-queue-name", - "durable": true, - "exclusive": true, - "autoDelete": false, - "vhost": "/" - }, - "exchange": { - "name": "myExchange", - "type": "topic", - "durable": true, - "autoDelete": false, - "vhost": "/" - }, - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/channelBindings/amqp1" - }, - "anypointmq": { - "destination": "user-signup-exchg", - "destinationType": "exchange", - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "topic": "projects/your-project/topics/topic-proto-schema", - "messageRetentionDuration": "86400s", - "messageStoragePolicy": { - "allowedPersistenceRegions": [ - "us-central1", - "us-central2", - "us-east1", - "us-east4", - "us-east5", - "us-east7", - "us-south1", - "us-west1", - "us-west2", - "us-west3", - "us-west4" - ] - }, - "schemaSettings": { - "encoding": "binary", - "name": "projects/your-project/schemas/message-proto" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "$ref": "#/components/channelBindings/http" - }, - "ibmmq": { - "destinationType": "topic", - "queue": { - "objectName": "message", - "isPartitioned": false, - "exclusive": true - }, - "topic": { - "string": "messages", - "objectName": "message", - "durablePermitted": true, - "lastMsgRetained": true - }, - "maxMsgLength": 1024, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/channelBindings/jms" - }, - "kafka": { - "topic": "my-specific-topic-name", - "partitions": 20, - "replicas": 3, - "topicConfiguration": { - "cleanup.policy": [ - "delete", - "compact" - ], - "retention.ms": 604800000, - "retention.bytes": 1000000000, - "delete.retention.ms": 86400000, - "max.message.bytes": 1048588 - }, - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/channelBindings/mercure" - }, - "mqtt": { - "$ref": "#/components/channelBindings/mqtt" - }, - "mqtt5": { - "$ref": "#/components/channelBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/channelBindings/nats" - }, - "pulsar": { - "namespace": "staging", - "persistence": "persistent", - "compaction": 1000, - "geo-replication": [ - "us-east1", - "us-west1" - ], - "retention": { - "time": 7, - "size": 1000 - }, - "ttl": 360, - "deduplication": false, - "bindingVersion": "0.1.0" - }, - "redis": { - "$ref": "#/components/channelBindings/redis" - }, - "sns": { - "$ref": "#/components/channelBindings/sns" - }, - "solace": { - "$ref": "#/components/channelBindings/solace" - }, - "sqs": { - "$ref": "#/components/channelBindings/sqs" - }, - "stomp": { - "$ref": "#/components/channelBindings/stomp" - }, - "ws": { - "method": "GET", - "query": { - "type": "object", - "properties": { - "ref": { - "type": "string", - "description": "Referral." - } - } - }, - "headers": { - "type": "object", - "properties": { - "Authentication": { - "type": "string", - "description": "Authentication token" - } - } - } - } - }, - "tags": [ - { - "name": "user", - "description": "User-related messages", - "externalDocs": { - "description" : "Find more info here", - "url" : "https://example.com" - } - }, - { - "name": "user", - "description": "User-related messages", - "externalDocs": { - "$ref": "#/components/external-doc" - } - }, - { - "$ref": "#/components/tag" - } - ], - "externalDocs": { - "description" : "Find more info here", - "url" : "https://example.com" - } -} diff --git a/test/definitions/3.0.0/models/channel/channel/wrongly extended.json b/test/definitions/3.0.0/models/channel/channel/wrongly extended.json deleted file mode 100644 index b9b9fc35..00000000 --- a/test/definitions/3.0.0/models/channel/channel/wrongly extended.json +++ /dev/null @@ -1,2000 +0,0 @@ -{ - "address": "users.{userId}", - "title": "Users channel", - "summary": "messages about user events.", - "description": "This channel is used to exchange messages about users signing up", - "servers": [ - { "$ref": "#/components/servers/1"}, - { "$ref": "#/components/servers/2"}, - { "$ref": "#/components/servers/3"} - ], - "parameters": { - "userId": { - "description": "Id of the user.", - "default": "0e822ca6-5311-4d4c-b409-993a1820e689", - "enum": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "examples": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "location": "$message.payload#/user/id" - }, - "userStatus": { "$ref": "#/components/parameters/user-status"} - }, - "messages": { - "changeStatus": { "$ref": "#/components/parameters/user-status"}, - "message": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "payload": { - "type": "object", - "properties": { - "metric": { - "description": "Metric set by application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - }, - "message 2": { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "payload": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "metric": { - "description": "Metric set by application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref" : "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - }, - "message with reference": { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "payload": { - "$ref": "#/components/messages/message-payload" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] - } - }, - "bindings": { - "amqp": { - "is": "routingKey", - "queue": { - "name": "my-queue-name", - "durable": true, - "exclusive": true, - "autoDelete": false, - "vhost": "/" - }, - "exchange": { - "name": "myExchange", - "type": "topic", - "durable": true, - "autoDelete": false, - "vhost": "/" - }, - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/channelBindings/amqp1" - }, - "anypointmq": { - "destination": "user-signup-exchg", - "destinationType": "exchange", - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "topic": "projects/your-project/topics/topic-proto-schema", - "messageRetentionDuration": "86400s", - "messageStoragePolicy": { - "allowedPersistenceRegions": [ - "us-central1", - "us-central2", - "us-east1", - "us-east4", - "us-east5", - "us-east7", - "us-south1", - "us-west1", - "us-west2", - "us-west3", - "us-west4" - ] - }, - "schemaSettings": { - "encoding": "binary", - "name": "projects/your-project/schemas/message-proto" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "$ref": "#/components/channelBindings/http" - }, - "ibmmq": { - "destinationType": "topic", - "queue": { - "objectName": "message", - "isPartitioned": false, - "exclusive": true - }, - "topic": { - "string": "messages", - "objectName": "message", - "durablePermitted": true, - "lastMsgRetained": true - }, - "maxMsgLength": 1024, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/channelBindings/jms" - }, - "kafka": { - "topic": "my-specific-topic-name", - "partitions": 20, - "replicas": 3, - "topicConfiguration": { - "cleanup.policy": [ - "delete", - "compact" - ], - "retention.ms": 604800000, - "retention.bytes": 1000000000, - "delete.retention.ms": 86400000, - "max.message.bytes": 1048588 - }, - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/channelBindings/mercure" - }, - "mqtt": { - "$ref": "#/components/channelBindings/mqtt" - }, - "mqtt5": { - "$ref": "#/components/channelBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/channelBindings/nats" - }, - "pulsar": { - "namespace": "staging", - "persistence": "persistent", - "compaction": 1000, - "geo-replication": [ - "us-east1", - "us-west1" - ], - "retention": { - "time": 7, - "size": 1000 - }, - "ttl": 360, - "deduplication": false, - "bindingVersion": "0.1.0" - }, - "redis": { - "$ref": "#/components/channelBindings/redis" - }, - "sns": { - "$ref": "#/components/channelBindings/sns" - }, - "solace": { - "$ref": "#/components/channelBindings/solace" - }, - "sqs": { - "$ref": "#/components/channelBindings/sqs" - }, - "stomp": { - "$ref": "#/components/channelBindings/stomp" - }, - "ws": { - "method": "GET", - "query": { - "type": "object", - "properties": { - "ref": { - "type": "string", - "description": "Referral." - } - } - }, - "headers": { - "type": "object", - "properties": { - "Authentication": { - "type": "string", - "description": "Authentication token" - } - } - } - } - }, - "tags": [ - { - "name": "user", - "description": "User-related messages", - "externalDocs": { - "description" : "Find more info here", - "url" : "https://example.com" - } - }, - { - "name": "user", - "description": "User-related messages", - "externalDocs": { - "$ref": "#/components/external-doc" - } - }, - { - "$ref": "#/components/tag" - } - ], - "externalDocs": { - "description" : "Find more info here", - "url" : "https://example.com" - }, - "x-number": 0, - "x-string": "", - "x-object": { - "property": {} - }, - "ext-number": 1 -} diff --git a/test/definitions/3.0.0/models/channel/index.mjs b/test/definitions/3.0.0/models/channel/index.mjs deleted file mode 100644 index b2ce3177..00000000 --- a/test/definitions/3.0.0/models/channel/index.mjs +++ /dev/null @@ -1,7 +0,0 @@ -import {describe} from 'vitest'; - -describe('Channel Test Suite', async () => { - await import('./channel'); - await import('./message'); - await import('./parameter'); -}); diff --git a/test/definitions/3.0.0/models/channel/message correlation id.test.mjs b/test/definitions/3.0.0/models/channel/message correlation id.test.mjs new file mode 100644 index 00000000..e983f034 --- /dev/null +++ b/test/definitions/3.0.0/models/channel/message correlation id.test.mjs @@ -0,0 +1,52 @@ +import { + JsonSchemaTestSuite, + JsonSchemaTestSuiteConfig, + JsonSchemaTestSuiteData +} from '@test/definitions/base-schema-test.mjs'; +import {describe} from 'vitest'; + +const jsonSchema = require('@definitions/3.0.0/correlationId.json'); + +const config = new JsonSchemaTestSuiteConfig( + true, + ['must have required property \'location\''], + true, + [] +); + +const data = new JsonSchemaTestSuiteData( + jsonSchema, + [ + { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + ], + { + "location": "$message.header#/correlationId" + }, + { + "description": "Default Correlation ID", + }, + { + "location": "$message.header#/correlationId", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + } + }, + { + "location": "$message.header#/correlationId", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 + } +); + +describe('Channel Correlation ID', () => { + new JsonSchemaTestSuite(data, config).testSuite() +}); diff --git a/test/definitions/3.0.0/models/channel/message example.test.mjs b/test/definitions/3.0.0/models/channel/message example.test.mjs new file mode 100644 index 00000000..5f7db494 --- /dev/null +++ b/test/definitions/3.0.0/models/channel/message example.test.mjs @@ -0,0 +1,83 @@ +import { + JsonSchemaTestSuite, + JsonSchemaTestSuiteConfig, + JsonSchemaTestSuiteData +} from '@test/definitions/base-schema-test.mjs'; +import {describe} from 'vitest'; + +const jsonSchema = require('@definitions/3.0.0/messageExampleObject.json'); + +const config = new JsonSchemaTestSuiteConfig( + true, + [ + 'must have required property \'payload\'', + 'must have required property \'headers\'', + 'must match a schema in anyOf' + ], + true, + [] +); + +const data = new JsonSchemaTestSuiteData( + jsonSchema, + [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } + } + ], + { + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + } + }, + {}, + { + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + }, + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + } + }, + { + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + }, + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 + } +); + +describe('Channel Message Example', () => { + new JsonSchemaTestSuite(data, config).testSuite() +}); diff --git a/test/definitions/3.0.0/models/channel/message trait.test.mjs b/test/definitions/3.0.0/models/channel/message trait.test.mjs new file mode 100644 index 00000000..52078507 --- /dev/null +++ b/test/definitions/3.0.0/models/channel/message trait.test.mjs @@ -0,0 +1,45 @@ +import { + JsonSchemaTestSuite, + JsonSchemaTestSuiteConfig, + JsonSchemaTestSuiteData +} from '@test/definitions/base-schema-test.mjs'; +import {describe} from 'vitest'; + +const jsonSchema = require('@definitions/3.0.0/messageTrait.json'); + +const config = new JsonSchemaTestSuiteConfig( + false, + [], + true, + [] +); + +const data = new JsonSchemaTestSuiteData( + jsonSchema, + [ + { + "contentType": "application/json" + } + ], + {}, + {}, + { + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + } + }, + { + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 + } +); + +describe('Channel Message Trait', () => { + new JsonSchemaTestSuite(data, config).testSuite() +}); diff --git a/test/definitions/3.0.0/models/channel/message.test.mjs b/test/definitions/3.0.0/models/channel/message.test.mjs new file mode 100644 index 00000000..99426546 --- /dev/null +++ b/test/definitions/3.0.0/models/channel/message.test.mjs @@ -0,0 +1,97 @@ +import { + JsonSchemaTestSuite, + JsonSchemaTestSuiteConfig, + JsonSchemaTestSuiteData +} from '@test/definitions/base-schema-test.mjs'; +import {describe} from 'vitest'; + +const jsonSchema = require('@definitions/3.0.0/messageObject.json'); + +const config = new JsonSchemaTestSuiteConfig( + false, + [], + true, + [] +); + +const data = new JsonSchemaTestSuiteData( + jsonSchema, + [ + { + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "contentType": "application/json", + "tags": [{ "name": "user" }, { "name": "signup" }, { "name": "register" }], + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" + }, + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + }, + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [{ "$ref": "#/components/messageTraits/commonHeaders" }], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } + } + ] + } + ], + {}, + {}, + { + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + } + }, + { + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 + } +); + +describe('Channel Message', () => { + new JsonSchemaTestSuite(data, config).testSuite() +}); diff --git a/test/definitions/3.0.0/models/channel/message/correlationId/empty.json b/test/definitions/3.0.0/models/channel/message/correlationId/empty.json deleted file mode 100644 index 0967ef42..00000000 --- a/test/definitions/3.0.0/models/channel/message/correlationId/empty.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test/definitions/3.0.0/models/channel/message/correlationId/example.json b/test/definitions/3.0.0/models/channel/message/correlationId/example.json deleted file mode 100644 index 9cc818d9..00000000 --- a/test/definitions/3.0.0/models/channel/message/correlationId/example.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" -} diff --git a/test/definitions/3.0.0/models/channel/message/correlationId/extended.json b/test/definitions/3.0.0/models/channel/message/correlationId/extended.json deleted file mode 100644 index 2b46e32b..00000000 --- a/test/definitions/3.0.0/models/channel/message/correlationId/extended.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "description": "Default Correlation ID", - "location": "$message.header#/correlationId", - "x-number": 0, - "x-string": "", - "x-object": { - "property": {} - } -} diff --git a/test/definitions/3.0.0/models/channel/message/correlationId/index.mjs b/test/definitions/3.0.0/models/channel/message/correlationId/index.mjs deleted file mode 100644 index ba0f11fc..00000000 --- a/test/definitions/3.0.0/models/channel/message/correlationId/index.mjs +++ /dev/null @@ -1,39 +0,0 @@ -import {describe, it} from 'vitest'; -import TestHelper from '@test/test-helper'; -import path from 'path'; - -const jsonSchema = require('@definitions/3.0.0/correlationId.json'); - -describe('Correlation ID', () => { - it('example', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './example.json'), - )); - - it('empty', () => TestHelper.objectIsNotValid( - jsonSchema, - path.resolve(__dirname, './empty.json'), - ['must have required property \'location\''] - )); - - it('without required properties', () => TestHelper.objectIsNotValid( - jsonSchema, - path.resolve(__dirname, './without required properties.json'), - ['must have required property \'location\''] - )); - - it('only required properties', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './only required properties.json'), - )); - - it('extended', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './extended.json'), - )); - - it('wrongly extended', () => TestHelper.wronglyExtended( - jsonSchema, - path.resolve(__dirname, './wrongly extended.json'), - )); -}); diff --git a/test/definitions/3.0.0/models/channel/message/correlationId/only required properties.json b/test/definitions/3.0.0/models/channel/message/correlationId/only required properties.json deleted file mode 100644 index bb75dcb8..00000000 --- a/test/definitions/3.0.0/models/channel/message/correlationId/only required properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "location": "$message.header#/correlationId" -} diff --git a/test/definitions/3.0.0/models/channel/message/correlationId/without required properties.json b/test/definitions/3.0.0/models/channel/message/correlationId/without required properties.json deleted file mode 100644 index dae25353..00000000 --- a/test/definitions/3.0.0/models/channel/message/correlationId/without required properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Default Correlation ID" -} diff --git a/test/definitions/3.0.0/models/channel/message/correlationId/wrongly extended.json b/test/definitions/3.0.0/models/channel/message/correlationId/wrongly extended.json deleted file mode 100644 index f409af21..00000000 --- a/test/definitions/3.0.0/models/channel/message/correlationId/wrongly extended.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Default Correlation ID", - "location": "$message.header#/correlationId", - "x-number": 0, - "x-string": "", - "x-object": { - "property": {} - }, - "ext-number": 1 -} diff --git a/test/definitions/3.0.0/models/channel/message/index.mjs b/test/definitions/3.0.0/models/channel/message/index.mjs deleted file mode 100644 index 28bee9d9..00000000 --- a/test/definitions/3.0.0/models/channel/message/index.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import {describe} from 'vitest'; - -describe('Message Test Suite', async () => { - await import('./correlationId'); - await import('./message'); - await import('./messageExample'); - await import('./messageTrait'); -}); diff --git a/test/definitions/3.0.0/models/channel/message/message/empty.json b/test/definitions/3.0.0/models/channel/message/message/empty.json deleted file mode 100644 index 0967ef42..00000000 --- a/test/definitions/3.0.0/models/channel/message/message/empty.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test/definitions/3.0.0/models/channel/message/message/example.json b/test/definitions/3.0.0/models/channel/message/message/example.json deleted file mode 100644 index f8cd8169..00000000 --- a/test/definitions/3.0.0/models/channel/message/message/example.json +++ /dev/null @@ -1,607 +0,0 @@ -{ - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "payload": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "metric": { - "description": "Metric set by application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref" : "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ] -} diff --git a/test/definitions/3.0.0/models/channel/message/message/extended.json b/test/definitions/3.0.0/models/channel/message/message/extended.json deleted file mode 100644 index 55a2953e..00000000 --- a/test/definitions/3.0.0/models/channel/message/message/extended.json +++ /dev/null @@ -1,612 +0,0 @@ -{ - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "payload": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "metric": { - "description": "Metric set by application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref" : "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ], - "x-number": 0, - "x-string": "", - "x-object": { - "property": {} - } -} diff --git a/test/definitions/3.0.0/models/channel/message/message/index.mjs b/test/definitions/3.0.0/models/channel/message/message/index.mjs deleted file mode 100644 index 2cbb3c45..00000000 --- a/test/definitions/3.0.0/models/channel/message/message/index.mjs +++ /dev/null @@ -1,37 +0,0 @@ -import {describe, it} from 'vitest'; -import TestHelper from '@test/test-helper'; -import path from 'path'; - -const jsonSchema = require('@definitions/3.0.0/messageObject.json'); - -describe.skip('Message. Issues with bindings', () => { - it('example', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './example.json'), - )); - - it('empty', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './empty.json'), - )); - - it('without required properties', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './without required properties.json'), - )); - - it('only required properties', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './only required properties.json'), - )); - - it.skip('extended. Reason: schema prohibites extendsion. Check', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './extended.json'), - )); - - it.skip('wrongly extended. Reason: schema prohibites extendsion. Check', () => TestHelper.wronglyExtended( - jsonSchema, - path.resolve(__dirname, './wrongly extended.json'), - )); -}); diff --git a/test/definitions/3.0.0/models/channel/message/message/only required properties.json b/test/definitions/3.0.0/models/channel/message/message/only required properties.json deleted file mode 100644 index 0967ef42..00000000 --- a/test/definitions/3.0.0/models/channel/message/message/only required properties.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test/definitions/3.0.0/models/channel/message/message/without required properties.json b/test/definitions/3.0.0/models/channel/message/message/without required properties.json deleted file mode 100644 index 5a6a41bf..00000000 --- a/test/definitions/3.0.0/models/channel/message/message/without required properties.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] -} diff --git a/test/definitions/3.0.0/models/channel/message/message/wrongly extended.json b/test/definitions/3.0.0/models/channel/message/message/wrongly extended.json deleted file mode 100644 index a6cd0763..00000000 --- a/test/definitions/3.0.0/models/channel/message/message/wrongly extended.json +++ /dev/null @@ -1,613 +0,0 @@ -{ - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "payload": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "metric": { - "description": "Metric set by application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref" : "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "traits": [ - { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "$ref": "#/components/messages/message-header" - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - { - "headers": { - "schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0", - "schema": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "correlationId": { - "$ref": "#/components/messages/message-correlation-id" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" }, - { "$ref": "#/components/tags/tag" } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/external-doc" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - } - ], - "x-number": 0, - "x-string": "", - "x-object": { - "property": {} - }, - "ext-number": 1 -} diff --git a/test/definitions/3.0.0/models/channel/message/messageExample/empty.json b/test/definitions/3.0.0/models/channel/message/messageExample/empty.json deleted file mode 100644 index 0967ef42..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageExample/empty.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test/definitions/3.0.0/models/channel/message/messageExample/example.json b/test/definitions/3.0.0/models/channel/message/messageExample/example.json deleted file mode 100644 index cec8a4ae..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageExample/example.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } -} diff --git a/test/definitions/3.0.0/models/channel/message/messageExample/extended.json b/test/definitions/3.0.0/models/channel/message/messageExample/extended.json deleted file mode 100644 index 96d374da..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageExample/extended.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - }, - "x-number": 0, - "x-string": "", - "x-object": { - "property": {} - } -} diff --git a/test/definitions/3.0.0/models/channel/message/messageExample/index.mjs b/test/definitions/3.0.0/models/channel/message/messageExample/index.mjs deleted file mode 100644 index 3ccdb7cd..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageExample/index.mjs +++ /dev/null @@ -1,47 +0,0 @@ -import {describe, it} from 'vitest'; -import TestHelper from '@test/test-helper'; -import path from 'path'; - -const jsonSchema = require('@definitions/3.0.0/messageExampleObject.json'); - -describe('Message example', () => { - it('example', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './example.json'), - )); - - it('empty', () => TestHelper.objectIsNotValid( - jsonSchema, - path.resolve(__dirname, './empty.json'), - [ - 'must have required property \'payload\'', - 'must have required property \'headers\'', - 'must match a schema in anyOf' - ] - )); - - it('without required properties', () => TestHelper.objectIsNotValid( - jsonSchema, - path.resolve(__dirname, './without required properties.json'), - [ - 'must have required property \'payload\'', - 'must have required property \'headers\'', - 'must match a schema in anyOf' - ] - )); - - it('only required properties', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './only required properties.json'), - )); - - it.skip('extended. Reason: schema prohibites extendsion. Check', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './extended.json'), - )); - - it.skip('wrongly extended. Reason: schema prohibites extendsion. Check', () => TestHelper.wronglyExtended( - jsonSchema, - path.resolve(__dirname, './wrongly extended.json'), - )); -}); diff --git a/test/definitions/3.0.0/models/channel/message/messageExample/only required properties.json b/test/definitions/3.0.0/models/channel/message/messageExample/only required properties.json deleted file mode 100644 index 2848ef96..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageExample/only required properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } -} diff --git a/test/definitions/3.0.0/models/channel/message/messageExample/without required properties.json b/test/definitions/3.0.0/models/channel/message/messageExample/without required properties.json deleted file mode 100644 index 65be85b8..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageExample/without required properties.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "SimpleSignup", - "summary": "A simple UserSignup example message" -} diff --git a/test/definitions/3.0.0/models/channel/message/messageExample/wrongly extended.json b/test/definitions/3.0.0/models/channel/message/messageExample/wrongly extended.json deleted file mode 100644 index 876390ff..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageExample/wrongly extended.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - }, - "x-number": 0, - "x-string": "", - "x-object": { - "property": {} - }, - "ext-number": 1 -} diff --git a/test/definitions/3.0.0/models/channel/message/messageTrait/empty.json b/test/definitions/3.0.0/models/channel/message/messageTrait/empty.json deleted file mode 100644 index 0967ef42..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageTrait/empty.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test/definitions/3.0.0/models/channel/message/messageTrait/example.json b/test/definitions/3.0.0/models/channel/message/messageTrait/example.json deleted file mode 100644 index 5a6a41bf..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageTrait/example.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] -} diff --git a/test/definitions/3.0.0/models/channel/message/messageTrait/extended.json b/test/definitions/3.0.0/models/channel/message/messageTrait/extended.json deleted file mode 100644 index 84dbdd14..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageTrait/extended.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "x-number": 0, - "x-string": "", - "x-object": { - "property": {} - } -} diff --git a/test/definitions/3.0.0/models/channel/message/messageTrait/index.mjs b/test/definitions/3.0.0/models/channel/message/messageTrait/index.mjs deleted file mode 100644 index 1c38c401..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageTrait/index.mjs +++ /dev/null @@ -1,37 +0,0 @@ -import {describe, it} from 'vitest'; -import TestHelper from '@test/test-helper'; -import path from 'path'; - -const jsonSchema = require('@definitions/3.0.0/messageTrait.json'); - -describe.skip('Message trait. Issues with bindings', () => { - it('example', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './example.json'), - )); - - it('empty', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './empty.json'), - )); - - it('without required properties', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './without required properties.json'), - )); - - it('only required properties', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './only required properties.json'), - )); - - it.skip('extended. Reason: schema prohibites extendsion. Check', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './extended.json'), - )); - - it.skip('wrongly extended. Reason: schema prohibites extendsion. Check', () => TestHelper.wronglyExtended( - jsonSchema, - path.resolve(__dirname, './wrongly extended.json'), - )); -}); diff --git a/test/definitions/3.0.0/models/channel/message/messageTrait/only required properties.json b/test/definitions/3.0.0/models/channel/message/messageTrait/only required properties.json deleted file mode 100644 index 0967ef42..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageTrait/only required properties.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test/definitions/3.0.0/models/channel/message/messageTrait/without required properties.json b/test/definitions/3.0.0/models/channel/message/messageTrait/without required properties.json deleted file mode 100644 index 5a6a41bf..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageTrait/without required properties.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] -} diff --git a/test/definitions/3.0.0/models/channel/message/messageTrait/wrongly extended.json b/test/definitions/3.0.0/models/channel/message/messageTrait/wrongly extended.json deleted file mode 100644 index 84bffb24..00000000 --- a/test/definitions/3.0.0/models/channel/message/messageTrait/wrongly extended.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "contentType": "application/json", - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "externalDocs": { - "description": "User sign up rules", - "url": "messages/sign-up-rules" - }, - "bindings": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - }, - "amqp1": { - "$ref": "#/components/messageBindings/amqp1" - }, - "anypointmq": { - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - }, - "googlepubsub": { - "schema": { - "name": "projects/your-project/schemas/message-avro", - "type": "avro" - }, - "bindingVersion": "0.1.0" - }, - "http": { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "statusCode" : 200, - "bindingVersion": "0.3.0" - }, - "ibmmq": { - "type": "jms", - "description": "JMS stream message", - "headers": "Content-Type: application/json", - "expiry": 0, - "bindingVersion": "0.1.0" - }, - "jms": { - "$ref": "#/components/messageBindings/jms" - }, - "kafka": { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.5.0" - }, - "mercure": { - "$ref": "#/components/messageBindings/mercure" - }, - "mqtt": { - "bindingVersion": "0.1.0" - }, - "mqtt5": { - "$ref": "#/components/messageBindings/mqtt5" - }, - "nats": { - "$ref": "#/components/messageBindings/nats" - }, - "pulsar": { - "$ref": "#/components/messageBindings/pulsar" - }, - "redis": { - "$ref": "#/components/messageBindings/redis" - }, - "sns": { - "$ref": "#/components/messageBindings/sns" - }, - "solace": { - "$ref": "#/components/messageBindings/solace" - }, - "sqs": { - "$ref": "#/components/messageBindings/sqs" - }, - "stomp": { - "$ref": "#/components/messageBindings/stomp" - }, - "ws": { - "$ref": "#/components/messageBindings/ws" - } - }, - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ], - "x-number": 0, - "x-string": "", - "x-object": { - "property": {} - }, - "ext-number": 1 -} diff --git a/test/definitions/3.0.0/models/channel/parameter/empty.json b/test/definitions/3.0.0/models/channel/parameter/empty.json deleted file mode 100644 index 0967ef42..00000000 --- a/test/definitions/3.0.0/models/channel/parameter/empty.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test/definitions/3.0.0/models/channel/parameter/example.json b/test/definitions/3.0.0/models/channel/parameter/example.json deleted file mode 100644 index b9e4dbc1..00000000 --- a/test/definitions/3.0.0/models/channel/parameter/example.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Id of the user.", - "default": "0e822ca6-5311-4d4c-b409-993a1820e689", - "enum": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "examples": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "location": "$message.payload#/user/id" -} diff --git a/test/definitions/3.0.0/models/channel/parameter/extended.json b/test/definitions/3.0.0/models/channel/parameter/extended.json deleted file mode 100644 index 756158c7..00000000 --- a/test/definitions/3.0.0/models/channel/parameter/extended.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "description": "Id of the user.", - "default": "0e822ca6-5311-4d4c-b409-993a1820e689", - "enum": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "examples": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "location": "$message.payload#/user/id", - "x-number": 0, - "x-string": "", - "x-object": { - "property": {} - } -} diff --git a/test/definitions/3.0.0/models/channel/parameter/index.mjs b/test/definitions/3.0.0/models/channel/parameter/index.mjs deleted file mode 100644 index ff7b57f4..00000000 --- a/test/definitions/3.0.0/models/channel/parameter/index.mjs +++ /dev/null @@ -1,37 +0,0 @@ -import {describe, it} from 'vitest'; -import TestHelper from '@test/test-helper'; -import path from 'path'; - -const jsonSchema = require('@definitions/3.0.0/parameter.json'); - -describe('Parameter', () => { - it('example', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './example.json'), - )); - - it('empty', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './empty.json'), - )); - - it('without required properties', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './without required properties.json'), - )); - - it('only required properties', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './only required properties.json'), - )); - - it('extended', () => TestHelper.objectIsValid( - jsonSchema, - path.resolve(__dirname, './extended.json'), - )); - - it('wrongly extended', () => TestHelper.wronglyExtended( - jsonSchema, - path.resolve(__dirname, './wrongly extended.json'), - )); -}); diff --git a/test/definitions/3.0.0/models/channel/parameter/only required properties.json b/test/definitions/3.0.0/models/channel/parameter/only required properties.json deleted file mode 100644 index 0967ef42..00000000 --- a/test/definitions/3.0.0/models/channel/parameter/only required properties.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test/definitions/3.0.0/models/channel/parameter/without required properties.json b/test/definitions/3.0.0/models/channel/parameter/without required properties.json deleted file mode 100644 index b9e4dbc1..00000000 --- a/test/definitions/3.0.0/models/channel/parameter/without required properties.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Id of the user.", - "default": "0e822ca6-5311-4d4c-b409-993a1820e689", - "enum": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "examples": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "location": "$message.payload#/user/id" -} diff --git a/test/definitions/3.0.0/models/channel/parameter/wrongly extended.json b/test/definitions/3.0.0/models/channel/parameter/wrongly extended.json deleted file mode 100644 index 13e29d1c..00000000 --- a/test/definitions/3.0.0/models/channel/parameter/wrongly extended.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "description": "Id of the user.", - "default": "0e822ca6-5311-4d4c-b409-993a1820e689", - "enum": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "examples": [ - "0e822ca6-5311-4d4c-b409-993a1820e689", - "381f5ddc-75c6-4c21-9ec1-3919ed345be9", - "70559d88-31a5-4ef2-8c34-7fbd04057ed5", - "c6dc0047-a90d-4efa-95e3-a272282934e0" - ], - "location": "$message.payload#/user/id", - "x-number": 0, - "x-string": "", - "x-object": { - "property": {} - }, - "ext-number": 1 -}