From 7f66c460fa07c6f747ef08fd75e19c2157905eda Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Sun, 18 Apr 2021 15:23:18 +0530 Subject: [PATCH 01/31] Schema for amqp added. --- amqp/schema_channel.json | 61 ++++++++++++++++++++++++++++++++++++++ amqp/schema_message.json | 19 ++++++++++++ amqp/schema_operation.json | 50 +++++++++++++++++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 amqp/schema_channel.json create mode 100644 amqp/schema_message.json create mode 100644 amqp/schema_operation.json diff --git a/amqp/schema_channel.json b/amqp/schema_channel.json new file mode 100644 index 00000000..35a248a5 --- /dev/null +++ b/amqp/schema_channel.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Channel Schema", + "type": "object", + "properties": { + "is": { + "type": "string", + "enum": ["queue", "routingKey"] + }, + "exchange": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255 + }, + "type": { + "type": "string", + "enum": ["topic", "direct", "fanout", "default", "headers"] + }, + "durable": { + "type": "boolean" + }, + "autoDelete": { + "type": "boolean" + }, + "vhost": { + "type": "string", + "default": "/" + } + } + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255 + }, + "durable": { + "type": "boolean" + }, + "exclusive": { + "type": "boolean" + }, + "autoDelete": { + "type": "boolean" + }, + "vhost": { + "type": "string", + "default": "/" + } + } + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + + } +} \ No newline at end of file diff --git a/amqp/schema_message.json b/amqp/schema_message.json new file mode 100644 index 00000000..8ddaa1f1 --- /dev/null +++ b/amqp/schema_message.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Message Schema", + "type": "object", + "properties": { + "contentEncoding": { + "type": "string" + }, + "messageType": { + "type": "string", + "default": "latest" + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + + } +} \ No newline at end of file diff --git a/amqp/schema_operation.json b/amqp/schema_operation.json new file mode 100644 index 00000000..bd339eb4 --- /dev/null +++ b/amqp/schema_operation.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Operation Schema", + "type": "object", + "properties": { + "expiration": { + "type": "integer", + "minimum": 0 + }, + "userId": { + "type": "string" + }, + "cc": { + "type": "array", + "items": { + "type": "string" + } + }, + "priority": { + "type": "integer" + }, + "deliveryMode": { + "type": "integer", + "enum": [1,2] + }, + "mandatory": { + "type": "boolean" + }, + "bcc": { + "type": "array", + "items": { + "type": "string" + } + }, + "replyTo": { + "type": "string" + }, + "timestamp": { + "type": "boolean" + }, + "ack": { + "type": "boolean" + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + + } +} \ No newline at end of file From a2f98bed49c7ad428173e9883bf879c764cd481e Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Tue, 20 Apr 2021 10:05:19 +0530 Subject: [PATCH 02/31] moved schemas inside the folder. --- amqp/{ => json_schemas}/schema_channel.json | 2 +- amqp/{ => json_schemas}/schema_message.json | 2 +- amqp/{ => json_schemas}/schema_operation.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename amqp/{ => json_schemas}/schema_channel.json (94%) rename amqp/{ => json_schemas}/schema_message.json (82%) rename amqp/{ => json_schemas}/schema_operation.json (92%) diff --git a/amqp/schema_channel.json b/amqp/json_schemas/schema_channel.json similarity index 94% rename from amqp/schema_channel.json rename to amqp/json_schemas/schema_channel.json index 35a248a5..7c186f7f 100644 --- a/amqp/schema_channel.json +++ b/amqp/json_schemas/schema_channel.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "http://json-schema.org/draft-04/schema#", "title": "Channel Schema", "type": "object", "properties": { diff --git a/amqp/schema_message.json b/amqp/json_schemas/schema_message.json similarity index 82% rename from amqp/schema_message.json rename to amqp/json_schemas/schema_message.json index 8ddaa1f1..9574e28d 100644 --- a/amqp/schema_message.json +++ b/amqp/json_schemas/schema_message.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "http://json-schema.org/draft-04/schema#", "title": "Message Schema", "type": "object", "properties": { diff --git a/amqp/schema_operation.json b/amqp/json_schemas/schema_operation.json similarity index 92% rename from amqp/schema_operation.json rename to amqp/json_schemas/schema_operation.json index bd339eb4..69d3fbd0 100644 --- a/amqp/schema_operation.json +++ b/amqp/json_schemas/schema_operation.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "http://json-schema.org/draft-04/schema#", "title": "Operation Schema", "type": "object", "properties": { From a32f639ea91cb4e05853947c913e62b3f49626ef Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Tue, 20 Apr 2021 10:07:07 +0530 Subject: [PATCH 03/31] schema names changed. --- amqp/json_schemas/{schema_channel.json => channel.json} | 0 amqp/json_schemas/{schema_message.json => message.json} | 0 amqp/json_schemas/{schema_operation.json => operation.json} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename amqp/json_schemas/{schema_channel.json => channel.json} (100%) rename amqp/json_schemas/{schema_message.json => message.json} (100%) rename amqp/json_schemas/{schema_operation.json => operation.json} (100%) diff --git a/amqp/json_schemas/schema_channel.json b/amqp/json_schemas/channel.json similarity index 100% rename from amqp/json_schemas/schema_channel.json rename to amqp/json_schemas/channel.json diff --git a/amqp/json_schemas/schema_message.json b/amqp/json_schemas/message.json similarity index 100% rename from amqp/json_schemas/schema_message.json rename to amqp/json_schemas/message.json diff --git a/amqp/json_schemas/schema_operation.json b/amqp/json_schemas/operation.json similarity index 100% rename from amqp/json_schemas/schema_operation.json rename to amqp/json_schemas/operation.json From c00b43a226db867489e7217b7efe4f29ba376ede Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Tue, 20 Apr 2021 10:38:04 +0530 Subject: [PATCH 04/31] http json schema added. --- http/json_schemas/message.json | 20 ++++++++++++++++++++ http/json_schemas/operation.json | 29 +++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 http/json_schemas/message.json create mode 100644 http/json_schemas/operation.json diff --git a/http/json_schemas/message.json b/http/json_schemas/message.json new file mode 100644 index 00000000..7b3b0139 --- /dev/null +++ b/http/json_schemas/message.json @@ -0,0 +1,20 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Message Schema", + "type": "object", + "properties": { + "headers": { + "type": "object", + "properties": { + "properties": { + "type": "object" + } + }, + "required": ["properties"] + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + } +} \ No newline at end of file diff --git a/http/json_schemas/operation.json b/http/json_schemas/operation.json new file mode 100644 index 00000000..ea675031 --- /dev/null +++ b/http/json_schemas/operation.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Operation Schema", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["request","response"] + }, + "method": { + "type": "string", + "enum": ["GET", "PUT", "POST", "PATCH", "DELETE", "HEAD", "OPTIONS", "CONNECT", "TRACE"] + }, + "query": { + "type": "object", + "properties": { + "properties": { + "type": "object" + } + }, + "required": ["properties"] + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + }, + "required": ["type"] +} \ No newline at end of file From d7f34f8cb612d83bb7e86e3d9fafa229c676c8a3 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Tue, 20 Apr 2021 14:40:58 +0530 Subject: [PATCH 05/31] schema object reference added. specificationExtension support added. --- amqp/json_schemas/channel.json | 13 +++++++++++++ amqp/json_schemas/message.json | 13 +++++++++++++ amqp/json_schemas/operation.json | 6 ++++++ http/json_schemas/message.json | 23 +++++++++++++++-------- http/json_schemas/operation.json | 32 ++++++++++++++++++++++---------- 5 files changed, 69 insertions(+), 18 deletions(-) diff --git a/amqp/json_schemas/channel.json b/amqp/json_schemas/channel.json index 7c186f7f..fd3be989 100644 --- a/amqp/json_schemas/channel.json +++ b/amqp/json_schemas/channel.json @@ -2,6 +2,12 @@ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Channel Schema", "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, "properties": { "is": { "type": "string", @@ -57,5 +63,12 @@ "default": "latest" } + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } } } \ No newline at end of file diff --git a/amqp/json_schemas/message.json b/amqp/json_schemas/message.json index 9574e28d..68b06903 100644 --- a/amqp/json_schemas/message.json +++ b/amqp/json_schemas/message.json @@ -2,6 +2,12 @@ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Message Schema", "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, "properties": { "contentEncoding": { "type": "string" @@ -15,5 +21,12 @@ "default": "latest" } + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } } } \ No newline at end of file diff --git a/amqp/json_schemas/operation.json b/amqp/json_schemas/operation.json index 69d3fbd0..b3166bd3 100644 --- a/amqp/json_schemas/operation.json +++ b/amqp/json_schemas/operation.json @@ -2,6 +2,12 @@ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Operation Schema", "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, "properties": { "expiration": { "type": "integer", diff --git a/http/json_schemas/message.json b/http/json_schemas/message.json index 7b3b0139..63cf1be8 100644 --- a/http/json_schemas/message.json +++ b/http/json_schemas/message.json @@ -1,20 +1,27 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "Message Schema", "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, "properties": { "headers": { - "type": "object", - "properties": { - "properties": { - "type": "object" - } - }, - "required": ["properties"] + "$ref": "http://json-schema.org/draft-07/schema#" }, "bindingVersion": { "type": "string", "default": "latest" } + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } } } \ No newline at end of file diff --git a/http/json_schemas/operation.json b/http/json_schemas/operation.json index ea675031..bae61181 100644 --- a/http/json_schemas/operation.json +++ b/http/json_schemas/operation.json @@ -1,7 +1,13 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "Operation Schema", "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, "properties": { "type": { "type": "string", @@ -12,18 +18,24 @@ "enum": ["GET", "PUT", "POST", "PATCH", "DELETE", "HEAD", "OPTIONS", "CONNECT", "TRACE"] }, "query": { - "type": "object", - "properties": { - "properties": { - "type": "object" - } - }, - "required": ["properties"] + "$ref": "http://json-schema.org/draft-07/schema#" }, "bindingVersion": { "type": "string", "default": "latest" } }, - "required": ["type"] -} \ No newline at end of file + "required": ["type"], + + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } + } +} + + + + From f434741947ae95166c346ce7e0c4238033fcc07a Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Wed, 21 Apr 2021 11:08:17 +0530 Subject: [PATCH 06/31] ibmmq json schema added. --- ibmmq/json_schemas/channel.json | 67 +++++++++++++++++++++++++++++++++ ibmmq/json_schemas/message.json | 39 +++++++++++++++++++ ibmmq/json_schemas/server.json | 41 ++++++++++++++++++++ 3 files changed, 147 insertions(+) create mode 100644 ibmmq/json_schemas/channel.json create mode 100644 ibmmq/json_schemas/message.json create mode 100644 ibmmq/json_schemas/server.json diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json new file mode 100644 index 00000000..ebd7e555 --- /dev/null +++ b/ibmmq/json_schemas/channel.json @@ -0,0 +1,67 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Channel Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "destinationType": { + "type": "string", + "enum": ["topic", "queue"] + }, + "queue": { + "type": "object", + "properties": { + "objectName": { + "type": "string", + "maxLength": 48 + }, + "isPartitioned": { + "type": "boolean" + }, + "exclusive": { + "type": "boolean" + } + } + }, + "topic": { + "type": "object", + "properties": { + "string": { + "type": "string", + "maxLength": 10240 + }, + "objectName": { + "type": "string", + "maxLength": 48 + }, + "durablePermitted": { + "type": "boolean" + }, + "lastMsgRetained": { + "type": "boolean" + } + } + }, + "maxMsgLength": { + "type": "integer", + "minimum": 0, + "maximum":104857600 + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } + } +} \ No newline at end of file diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json new file mode 100644 index 00000000..4459c8dc --- /dev/null +++ b/ibmmq/json_schemas/message.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "type": { + "type": "string", + "enum": ["string", "jms", "binary"] + }, + "headers": { + "type": "string" + }, + "description": { + "type": "string" + }, + "expiry": { + "type": "integer", + "minimum": 0 + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } + } +} \ No newline at end of file diff --git a/ibmmq/json_schemas/server.json b/ibmmq/json_schemas/server.json new file mode 100644 index 00000000..8a1e7447 --- /dev/null +++ b/ibmmq/json_schemas/server.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Server Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "type": "string" + }, + "ccdtQueueManagerName": { + "type": "string" + }, + "cipherSpec": { + "type": "string" + }, + "multiEndpointServer": { + "type": "boolean" + }, + "heartBeatInterval": { + "type": "integer", + "minimum": 0, + "maximum": 999999 + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } + } +} \ No newline at end of file From 3031e71f414730faba2b0572d45f68c55f97d0c6 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Wed, 21 Apr 2021 11:24:39 +0530 Subject: [PATCH 07/31] kafka json schema added. --- kafka/json_schemas/message.json | 27 +++++++++++++++++++++++++++ kafka/json_schemas/operation.json | 31 +++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 kafka/json_schemas/message.json create mode 100644 kafka/json_schemas/operation.json diff --git a/kafka/json_schemas/message.json b/kafka/json_schemas/message.json new file mode 100644 index 00000000..4c82441e --- /dev/null +++ b/kafka/json_schemas/message.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "key": { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } + } +} \ No newline at end of file diff --git a/kafka/json_schemas/operation.json b/kafka/json_schemas/operation.json new file mode 100644 index 00000000..94755098 --- /dev/null +++ b/kafka/json_schemas/operation.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Operation Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + "clientId": { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } + } +} \ No newline at end of file From 51255e6e7ba690997324652fd561ab692995e046 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Fri, 23 Apr 2021 12:08:16 +0530 Subject: [PATCH 08/31] mqtt json schema added. --- mqtt/json_schemas/message.json | 24 +++++++++++++++ mqtt/json_schemas/operation.json | 30 ++++++++++++++++++ mqtt/json_schemas/server.json | 52 ++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 mqtt/json_schemas/message.json create mode 100644 mqtt/json_schemas/operation.json create mode 100644 mqtt/json_schemas/server.json diff --git a/mqtt/json_schemas/message.json b/mqtt/json_schemas/message.json new file mode 100644 index 00000000..4370cc13 --- /dev/null +++ b/mqtt/json_schemas/message.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Operation Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "default": "latest" + } + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } + } +} \ No newline at end of file diff --git a/mqtt/json_schemas/operation.json b/mqtt/json_schemas/operation.json new file mode 100644 index 00000000..7ae02382 --- /dev/null +++ b/mqtt/json_schemas/operation.json @@ -0,0 +1,30 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Operation Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "qos": { + "type": "integer" + }, + "retain": { + "type": "boolean" + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } + } +} \ No newline at end of file diff --git a/mqtt/json_schemas/server.json b/mqtt/json_schemas/server.json new file mode 100644 index 00000000..81e7af62 --- /dev/null +++ b/mqtt/json_schemas/server.json @@ -0,0 +1,52 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Server Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + + "clientId": { + "type": "string" + }, + "cleanSession": { + "type": "boolean" + }, + "lastWill": { + "type": "object", + "properties": { + "topic": { + "type": "string" + }, + "qos": { + "type": "integer", + "enum": [0,1,2] + }, + "message": { + "type": "string" + }, + "retain": { + "type": "boolean" + } + } + }, + "keepAlive": { + "type": "integer" + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } + } +} \ No newline at end of file From a39c4a9eafb3e7565306cd695ba1c8d149a37cbe Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Fri, 23 Apr 2021 12:18:46 +0530 Subject: [PATCH 09/31] websockets json schema added. --- websockets/json_schemas/channel.json | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 websockets/json_schemas/channel.json diff --git a/websockets/json_schemas/channel.json b/websockets/json_schemas/channel.json new file mode 100644 index 00000000..a3bfdae2 --- /dev/null +++ b/websockets/json_schemas/channel.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Channel Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "method": { + "type": "string", + "enum": [ + "GET", + "POST" + ] + }, + "query": { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + "headers": { + "$ref": "http://json-schema.org/draft-07/schema#" + }, + "bindingVersion": { + "type": "string", + "default": "latest" + } + }, + "definitions": { + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + } + } +} \ No newline at end of file From 7249f57e47106355f3f6049c57417ea5b258e9a5 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Wed, 28 Apr 2021 14:07:29 +0530 Subject: [PATCH 10/31] changed to draft-7 --- amqp/json_schemas/channel.json | 2 +- amqp/json_schemas/message.json | 2 +- amqp/json_schemas/operation.json | 2 +- ibmmq/json_schemas/message.json | 2 +- kafka/json_schemas/operation.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/amqp/json_schemas/channel.json b/amqp/json_schemas/channel.json index fd3be989..0e5d9b2d 100644 --- a/amqp/json_schemas/channel.json +++ b/amqp/json_schemas/channel.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "Channel Schema", "type": "object", "additionalProperties": false, diff --git a/amqp/json_schemas/message.json b/amqp/json_schemas/message.json index 68b06903..a82d259d 100644 --- a/amqp/json_schemas/message.json +++ b/amqp/json_schemas/message.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "Message Schema", "type": "object", "additionalProperties": false, diff --git a/amqp/json_schemas/operation.json b/amqp/json_schemas/operation.json index b3166bd3..9083f769 100644 --- a/amqp/json_schemas/operation.json +++ b/amqp/json_schemas/operation.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "Operation Schema", "type": "object", "additionalProperties": false, diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json index 4459c8dc..0db266d3 100644 --- a/ibmmq/json_schemas/message.json +++ b/ibmmq/json_schemas/message.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "Message Schema", "type": "object", "additionalProperties": false, diff --git a/kafka/json_schemas/operation.json b/kafka/json_schemas/operation.json index 94755098..8b490ee4 100644 --- a/kafka/json_schemas/operation.json +++ b/kafka/json_schemas/operation.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "Operation Schema", "type": "object", "additionalProperties": false, From 4dd8b87abef4f35fc38c6a168efc35443418556d Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Wed, 28 Apr 2021 14:15:10 +0530 Subject: [PATCH 11/31] ids added --- amqp/json_schemas/channel.json | 1 + amqp/json_schemas/message.json | 1 + amqp/json_schemas/operation.json | 1 + http/json_schemas/message.json | 1 + http/json_schemas/operation.json | 1 + ibmmq/json_schemas/channel.json | 1 + ibmmq/json_schemas/message.json | 1 + ibmmq/json_schemas/server.json | 1 + kafka/json_schemas/message.json | 1 + kafka/json_schemas/operation.json | 1 + mqtt/json_schemas/message.json | 1 + mqtt/json_schemas/operation.json | 1 + mqtt/json_schemas/server.json | 1 + websockets/json_schemas/channel.json | 1 + 14 files changed, 14 insertions(+) diff --git a/amqp/json_schemas/channel.json b/amqp/json_schemas/channel.json index 0e5d9b2d..f426ebc5 100644 --- a/amqp/json_schemas/channel.json +++ b/amqp/json_schemas/channel.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/amqp/bindings/channel.json", "title": "Channel Schema", "type": "object", "additionalProperties": false, diff --git a/amqp/json_schemas/message.json b/amqp/json_schemas/message.json index a82d259d..37eb3902 100644 --- a/amqp/json_schemas/message.json +++ b/amqp/json_schemas/message.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/amqp/bindings/message.json", "title": "Message Schema", "type": "object", "additionalProperties": false, diff --git a/amqp/json_schemas/operation.json b/amqp/json_schemas/operation.json index 9083f769..3bd648fe 100644 --- a/amqp/json_schemas/operation.json +++ b/amqp/json_schemas/operation.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/amqp/bindings/operation.json", "title": "Operation Schema", "type": "object", "additionalProperties": false, diff --git a/http/json_schemas/message.json b/http/json_schemas/message.json index 63cf1be8..883ee0e0 100644 --- a/http/json_schemas/message.json +++ b/http/json_schemas/message.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/http/bindings/message.json", "title": "Message Schema", "type": "object", "additionalProperties": false, diff --git a/http/json_schemas/operation.json b/http/json_schemas/operation.json index bae61181..0431f6d7 100644 --- a/http/json_schemas/operation.json +++ b/http/json_schemas/operation.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/http/bindings/operation.json", "title": "Operation Schema", "type": "object", "additionalProperties": false, diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json index ebd7e555..ff070137 100644 --- a/ibmmq/json_schemas/channel.json +++ b/ibmmq/json_schemas/channel.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/ibmmq/bindings/channel.json", "title": "Channel Schema", "type": "object", "additionalProperties": false, diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json index 0db266d3..7f596d7b 100644 --- a/ibmmq/json_schemas/message.json +++ b/ibmmq/json_schemas/message.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/ibmmq/bindings/message.json", "title": "Message Schema", "type": "object", "additionalProperties": false, diff --git a/ibmmq/json_schemas/server.json b/ibmmq/json_schemas/server.json index 8a1e7447..6230752d 100644 --- a/ibmmq/json_schemas/server.json +++ b/ibmmq/json_schemas/server.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/ibmmq/bindings/server.json", "title": "Server Schema", "type": "object", "additionalProperties": false, diff --git a/kafka/json_schemas/message.json b/kafka/json_schemas/message.json index 4c82441e..91d0583b 100644 --- a/kafka/json_schemas/message.json +++ b/kafka/json_schemas/message.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/kafka/bindings/message.json", "title": "Message Schema", "type": "object", "additionalProperties": false, diff --git a/kafka/json_schemas/operation.json b/kafka/json_schemas/operation.json index 8b490ee4..fcfbfd80 100644 --- a/kafka/json_schemas/operation.json +++ b/kafka/json_schemas/operation.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/kafka/bindings/operation.json", "title": "Operation Schema", "type": "object", "additionalProperties": false, diff --git a/mqtt/json_schemas/message.json b/mqtt/json_schemas/message.json index 4370cc13..939d2230 100644 --- a/mqtt/json_schemas/message.json +++ b/mqtt/json_schemas/message.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/mqtt/bindings/message.json", "title": "Operation Schema", "type": "object", "additionalProperties": false, diff --git a/mqtt/json_schemas/operation.json b/mqtt/json_schemas/operation.json index 7ae02382..f21fcc17 100644 --- a/mqtt/json_schemas/operation.json +++ b/mqtt/json_schemas/operation.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/mqtt/bindings/operation.json", "title": "Operation Schema", "type": "object", "additionalProperties": false, diff --git a/mqtt/json_schemas/server.json b/mqtt/json_schemas/server.json index 81e7af62..bb090daa 100644 --- a/mqtt/json_schemas/server.json +++ b/mqtt/json_schemas/server.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/mqtt/bindings/server.json", "title": "Server Schema", "type": "object", "additionalProperties": false, diff --git a/websockets/json_schemas/channel.json b/websockets/json_schemas/channel.json index a3bfdae2..80876141 100644 --- a/websockets/json_schemas/channel.json +++ b/websockets/json_schemas/channel.json @@ -1,5 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/websockets/bindings/channel.json", "title": "Channel Schema", "type": "object", "additionalProperties": false, From 221a3028709fceae045edb539bbff755f524fbd1 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Wed, 28 Apr 2021 14:36:01 +0530 Subject: [PATCH 12/31] used asyncapi specification instead of local definitions and draft-07 schema --- http/json_schemas/operation.json | 14 +++----------- ibmmq/json_schemas/channel.json | 9 +-------- ibmmq/json_schemas/message.json | 9 +-------- ibmmq/json_schemas/server.json | 9 +-------- kafka/json_schemas/message.json | 11 ++--------- kafka/json_schemas/operation.json | 13 +++---------- mqtt/json_schemas/message.json | 9 +-------- mqtt/json_schemas/operation.json | 9 +-------- mqtt/json_schemas/server.json | 9 +-------- websockets/json_schemas/channel.json | 13 +++---------- 10 files changed, 17 insertions(+), 88 deletions(-) diff --git a/http/json_schemas/operation.json b/http/json_schemas/operation.json index 0431f6d7..12ecc55f 100644 --- a/http/json_schemas/operation.json +++ b/http/json_schemas/operation.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -19,22 +19,14 @@ "enum": ["GET", "PUT", "POST", "PATCH", "DELETE", "HEAD", "OPTIONS", "CONNECT", "TRACE"] }, "query": { - "$ref": "http://json-schema.org/draft-07/schema#" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { "type": "string", "default": "latest" } }, - "required": ["type"], - - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } - } + "required": ["type"] } diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json index ff070137..43f0aa34 100644 --- a/ibmmq/json_schemas/channel.json +++ b/ibmmq/json_schemas/channel.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -57,12 +57,5 @@ "type": "string", "default": "latest" } - }, - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } } } \ No newline at end of file diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json index 7f596d7b..d67fe902 100644 --- a/ibmmq/json_schemas/message.json +++ b/ibmmq/json_schemas/message.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -29,12 +29,5 @@ "default": "latest" } - }, - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } } } \ No newline at end of file diff --git a/ibmmq/json_schemas/server.json b/ibmmq/json_schemas/server.json index 6230752d..d1b442f5 100644 --- a/ibmmq/json_schemas/server.json +++ b/ibmmq/json_schemas/server.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -31,12 +31,5 @@ "type": "string", "default": "latest" } - }, - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } } } \ No newline at end of file diff --git a/kafka/json_schemas/message.json b/kafka/json_schemas/message.json index 91d0583b..b7a6d42a 100644 --- a/kafka/json_schemas/message.json +++ b/kafka/json_schemas/message.json @@ -6,23 +6,16 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { "key": { - "$ref": "http://json-schema.org/draft-07/schema#" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { "type": "string", "default": "latest" } - }, - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } } } \ No newline at end of file diff --git a/kafka/json_schemas/operation.json b/kafka/json_schemas/operation.json index fcfbfd80..259f4426 100644 --- a/kafka/json_schemas/operation.json +++ b/kafka/json_schemas/operation.json @@ -6,27 +6,20 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { "groupId": { - "$ref": "http://json-schema.org/draft-07/schema#" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" }, "clientId": { - "$ref": "http://json-schema.org/draft-07/schema#" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { "type": "string", "default": "latest" } - }, - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } } } \ No newline at end of file diff --git a/mqtt/json_schemas/message.json b/mqtt/json_schemas/message.json index 939d2230..65d1e360 100644 --- a/mqtt/json_schemas/message.json +++ b/mqtt/json_schemas/message.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -14,12 +14,5 @@ "type": "string", "default": "latest" } - }, - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } } } \ No newline at end of file diff --git a/mqtt/json_schemas/operation.json b/mqtt/json_schemas/operation.json index f21fcc17..c27f8b95 100644 --- a/mqtt/json_schemas/operation.json +++ b/mqtt/json_schemas/operation.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -20,12 +20,5 @@ "type": "string", "default": "latest" } - }, - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } } } \ No newline at end of file diff --git a/mqtt/json_schemas/server.json b/mqtt/json_schemas/server.json index bb090daa..e57bf356 100644 --- a/mqtt/json_schemas/server.json +++ b/mqtt/json_schemas/server.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -42,12 +42,5 @@ "type": "string", "default": "latest" } - }, - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } } } \ No newline at end of file diff --git a/websockets/json_schemas/channel.json b/websockets/json_schemas/channel.json index 80876141..a6a222c6 100644 --- a/websockets/json_schemas/channel.json +++ b/websockets/json_schemas/channel.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -18,21 +18,14 @@ ] }, "query": { - "$ref": "http://json-schema.org/draft-07/schema#" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" }, "headers": { - "$ref": "http://json-schema.org/draft-07/schema#" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { "type": "string", "default": "latest" } - }, - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } } } \ No newline at end of file From e4cf8e87d90642d55bd4bdca7f5697d9097f07fa Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Wed, 28 Apr 2021 14:44:39 +0530 Subject: [PATCH 13/31] final touches --- amqp/json_schemas/channel.json | 11 ++--------- amqp/json_schemas/message.json | 11 ++--------- amqp/json_schemas/operation.json | 4 ++-- http/json_schemas/message.json | 13 +++---------- ibmmq/json_schemas/channel.json | 2 +- ibmmq/json_schemas/message.json | 2 +- ibmmq/json_schemas/server.json | 2 +- kafka/json_schemas/message.json | 2 +- kafka/json_schemas/operation.json | 2 +- mqtt/json_schemas/message.json | 2 +- mqtt/json_schemas/operation.json | 2 +- mqtt/json_schemas/server.json | 2 +- websockets/json_schemas/channel.json | 2 +- 13 files changed, 18 insertions(+), 39 deletions(-) diff --git a/amqp/json_schemas/channel.json b/amqp/json_schemas/channel.json index f426ebc5..3424a926 100644 --- a/amqp/json_schemas/channel.json +++ b/amqp/json_schemas/channel.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -64,12 +64,5 @@ "default": "latest" } - }, - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } } -} \ No newline at end of file +} diff --git a/amqp/json_schemas/message.json b/amqp/json_schemas/message.json index 37eb3902..8147047a 100644 --- a/amqp/json_schemas/message.json +++ b/amqp/json_schemas/message.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -22,12 +22,5 @@ "default": "latest" } - }, - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } } -} \ No newline at end of file +} diff --git a/amqp/json_schemas/operation.json b/amqp/json_schemas/operation.json index 3bd648fe..d0a9a5c4 100644 --- a/amqp/json_schemas/operation.json +++ b/amqp/json_schemas/operation.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -54,4 +54,4 @@ } } -} \ No newline at end of file +} diff --git a/http/json_schemas/message.json b/http/json_schemas/message.json index 883ee0e0..bf72a407 100644 --- a/http/json_schemas/message.json +++ b/http/json_schemas/message.json @@ -6,23 +6,16 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "#/definitions/specificationExtension" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { "headers": { - "$ref": "http://json-schema.org/draft-07/schema#" + "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { "type": "string", "default": "latest" } - }, - "definitions": { - "specificationExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - } } -} \ No newline at end of file +} diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json index 43f0aa34..8b55f5e2 100644 --- a/ibmmq/json_schemas/channel.json +++ b/ibmmq/json_schemas/channel.json @@ -58,4 +58,4 @@ "default": "latest" } } -} \ No newline at end of file +} diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json index d67fe902..037e18d1 100644 --- a/ibmmq/json_schemas/message.json +++ b/ibmmq/json_schemas/message.json @@ -30,4 +30,4 @@ } } -} \ No newline at end of file +} diff --git a/ibmmq/json_schemas/server.json b/ibmmq/json_schemas/server.json index d1b442f5..736ccc3a 100644 --- a/ibmmq/json_schemas/server.json +++ b/ibmmq/json_schemas/server.json @@ -32,4 +32,4 @@ "default": "latest" } } -} \ No newline at end of file +} diff --git a/kafka/json_schemas/message.json b/kafka/json_schemas/message.json index b7a6d42a..0da43fb1 100644 --- a/kafka/json_schemas/message.json +++ b/kafka/json_schemas/message.json @@ -18,4 +18,4 @@ "default": "latest" } } -} \ No newline at end of file +} diff --git a/kafka/json_schemas/operation.json b/kafka/json_schemas/operation.json index 259f4426..fc51802c 100644 --- a/kafka/json_schemas/operation.json +++ b/kafka/json_schemas/operation.json @@ -22,4 +22,4 @@ } } -} \ No newline at end of file +} diff --git a/mqtt/json_schemas/message.json b/mqtt/json_schemas/message.json index 65d1e360..36b7c008 100644 --- a/mqtt/json_schemas/message.json +++ b/mqtt/json_schemas/message.json @@ -15,4 +15,4 @@ "default": "latest" } } -} \ No newline at end of file +} diff --git a/mqtt/json_schemas/operation.json b/mqtt/json_schemas/operation.json index c27f8b95..99a92fca 100644 --- a/mqtt/json_schemas/operation.json +++ b/mqtt/json_schemas/operation.json @@ -21,4 +21,4 @@ "default": "latest" } } -} \ No newline at end of file +} diff --git a/mqtt/json_schemas/server.json b/mqtt/json_schemas/server.json index e57bf356..9e61ac78 100644 --- a/mqtt/json_schemas/server.json +++ b/mqtt/json_schemas/server.json @@ -43,4 +43,4 @@ "default": "latest" } } -} \ No newline at end of file +} diff --git a/websockets/json_schemas/channel.json b/websockets/json_schemas/channel.json index a6a222c6..808d5ae9 100644 --- a/websockets/json_schemas/channel.json +++ b/websockets/json_schemas/channel.json @@ -28,4 +28,4 @@ "default": "latest" } } -} \ No newline at end of file +} From 5c187d7905dd3af6782a7793d85d0f43ead1d016 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Thu, 6 May 2021 14:58:41 +0530 Subject: [PATCH 14/31] conditional checks added --- amqp/json_schemas/channel.json | 30 ++++++++++++++++++++- http/json_schemas/operation.json | 45 +++++++++++++++++++++++++++++--- ibmmq/json_schemas/channel.json | 30 ++++++++++++++++++++- ibmmq/json_schemas/message.json | 29 +++++++++++++++++++- 4 files changed, 128 insertions(+), 6 deletions(-) diff --git a/amqp/json_schemas/channel.json b/amqp/json_schemas/channel.json index 3424a926..425845ea 100644 --- a/amqp/json_schemas/channel.json +++ b/amqp/json_schemas/channel.json @@ -64,5 +64,33 @@ "default": "latest" } - } + }, + "oneOf": [ + { + "properties": { + "is": { "const": "routingKey" } + }, + "required": [ + "exchange" + ], + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "is": { "const": "queue" } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "exchange" + ] + } + } + ] } diff --git a/http/json_schemas/operation.json b/http/json_schemas/operation.json index 12ecc55f..5ea38d5e 100644 --- a/http/json_schemas/operation.json +++ b/http/json_schemas/operation.json @@ -12,11 +12,24 @@ "properties": { "type": { "type": "string", - "enum": ["request","response"] + "enum": [ + "request", + "response" + ] }, "method": { "type": "string", - "enum": ["GET", "PUT", "POST", "PATCH", "DELETE", "HEAD", "OPTIONS", "CONNECT", "TRACE"] + "enum": [ + "GET", + "PUT", + "POST", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "CONNECT", + "TRACE" + ] }, "query": { "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" @@ -26,7 +39,33 @@ "default": "latest" } }, - "required": ["type"] + "required": [ + "type" + ], + "oneOf": [ + { + "properties": { + "type": { + "const": "request" + } + }, + "required": [ + "method" + ] + }, + { + "properties": { + "is": { + "const": "response" + } + }, + "not": { + "required": [ + "method" + ] + } + } + ] } diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json index 8b55f5e2..d628636e 100644 --- a/ibmmq/json_schemas/channel.json +++ b/ibmmq/json_schemas/channel.json @@ -57,5 +57,33 @@ "type": "string", "default": "latest" } - } + }, + "oneOf": [ + { + "properties": { + "destinationType": { "const": "topic" } + }, + "required": [ + "topic" + ], + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "destinationType": { "const": "queue" } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "topic" + ] + } + } + ] } diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json index 037e18d1..f21b4d5c 100644 --- a/ibmmq/json_schemas/message.json +++ b/ibmmq/json_schemas/message.json @@ -29,5 +29,32 @@ "default": "latest" } - } + }, + "oneOf": [ + { + "properties": { + "type": { "const": "binary" } + } + }, + { + "properties": { + "type": { "const": "jms" } + }, + "not": { + "required": [ + "headers" + ] + } + }, + { + "properties": { + "type": { "const": "string" } + }, + "not": { + "required": [ + "headers" + ] + } + } + ] } From 069854df1f59d3ac9c4cc524f7e899fe62b6658e Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Sat, 8 May 2021 14:11:50 +0530 Subject: [PATCH 15/31] removed default from bindingVersion --- amqp/json_schemas/channel.json | 3 +-- amqp/json_schemas/message.json | 3 +-- amqp/json_schemas/operation.json | 3 +-- http/json_schemas/message.json | 3 +-- http/json_schemas/operation.json | 3 +-- ibmmq/json_schemas/channel.json | 3 +-- ibmmq/json_schemas/message.json | 3 +-- ibmmq/json_schemas/server.json | 3 +-- kafka/json_schemas/message.json | 3 +-- kafka/json_schemas/operation.json | 3 +-- mqtt/json_schemas/message.json | 3 +-- mqtt/json_schemas/operation.json | 3 +-- mqtt/json_schemas/server.json | 3 +-- websockets/json_schemas/channel.json | 3 +-- 14 files changed, 14 insertions(+), 28 deletions(-) diff --git a/amqp/json_schemas/channel.json b/amqp/json_schemas/channel.json index 425845ea..4bf64b39 100644 --- a/amqp/json_schemas/channel.json +++ b/amqp/json_schemas/channel.json @@ -60,8 +60,7 @@ } }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } }, diff --git a/amqp/json_schemas/message.json b/amqp/json_schemas/message.json index 8147047a..95d3ece1 100644 --- a/amqp/json_schemas/message.json +++ b/amqp/json_schemas/message.json @@ -18,8 +18,7 @@ "default": "latest" }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } } diff --git a/amqp/json_schemas/operation.json b/amqp/json_schemas/operation.json index d0a9a5c4..7eaba33a 100644 --- a/amqp/json_schemas/operation.json +++ b/amqp/json_schemas/operation.json @@ -49,8 +49,7 @@ "type": "boolean" }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } } diff --git a/http/json_schemas/message.json b/http/json_schemas/message.json index bf72a407..1a5e0ef3 100644 --- a/http/json_schemas/message.json +++ b/http/json_schemas/message.json @@ -14,8 +14,7 @@ "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } } } diff --git a/http/json_schemas/operation.json b/http/json_schemas/operation.json index 5ea38d5e..b93866bd 100644 --- a/http/json_schemas/operation.json +++ b/http/json_schemas/operation.json @@ -35,8 +35,7 @@ "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } }, "required": [ diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json index d628636e..8cf50ec6 100644 --- a/ibmmq/json_schemas/channel.json +++ b/ibmmq/json_schemas/channel.json @@ -54,8 +54,7 @@ "maximum":104857600 }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } }, "oneOf": [ diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json index f21b4d5c..d83b0f5c 100644 --- a/ibmmq/json_schemas/message.json +++ b/ibmmq/json_schemas/message.json @@ -25,8 +25,7 @@ "minimum": 0 }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } }, diff --git a/ibmmq/json_schemas/server.json b/ibmmq/json_schemas/server.json index 736ccc3a..0d31df8b 100644 --- a/ibmmq/json_schemas/server.json +++ b/ibmmq/json_schemas/server.json @@ -28,8 +28,7 @@ "maximum": 999999 }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } } } diff --git a/kafka/json_schemas/message.json b/kafka/json_schemas/message.json index 0da43fb1..b5bb2a2f 100644 --- a/kafka/json_schemas/message.json +++ b/kafka/json_schemas/message.json @@ -14,8 +14,7 @@ "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } } } diff --git a/kafka/json_schemas/operation.json b/kafka/json_schemas/operation.json index fc51802c..0eed3bfe 100644 --- a/kafka/json_schemas/operation.json +++ b/kafka/json_schemas/operation.json @@ -17,8 +17,7 @@ "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } } diff --git a/mqtt/json_schemas/message.json b/mqtt/json_schemas/message.json index 36b7c008..64e42a69 100644 --- a/mqtt/json_schemas/message.json +++ b/mqtt/json_schemas/message.json @@ -11,8 +11,7 @@ }, "properties": { "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } } } diff --git a/mqtt/json_schemas/operation.json b/mqtt/json_schemas/operation.json index 99a92fca..08d66481 100644 --- a/mqtt/json_schemas/operation.json +++ b/mqtt/json_schemas/operation.json @@ -17,8 +17,7 @@ "type": "boolean" }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } } } diff --git a/mqtt/json_schemas/server.json b/mqtt/json_schemas/server.json index 9e61ac78..74997bd0 100644 --- a/mqtt/json_schemas/server.json +++ b/mqtt/json_schemas/server.json @@ -39,8 +39,7 @@ "type": "integer" }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } } } diff --git a/websockets/json_schemas/channel.json b/websockets/json_schemas/channel.json index 808d5ae9..5cbf5cb4 100644 --- a/websockets/json_schemas/channel.json +++ b/websockets/json_schemas/channel.json @@ -24,8 +24,7 @@ "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { - "type": "string", - "default": "latest" + "type": "string" } } } From 5905fd43433471072c192c78e26642ce13035ac6 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Sat, 8 May 2021 14:27:52 +0530 Subject: [PATCH 16/31] defaults added --- ibmmq/json_schemas/channel.json | 15 ++++++++++----- ibmmq/json_schemas/message.json | 6 ++++-- ibmmq/json_schemas/server.json | 9 ++++++--- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json index 8cf50ec6..4f805a53 100644 --- a/ibmmq/json_schemas/channel.json +++ b/ibmmq/json_schemas/channel.json @@ -12,7 +12,8 @@ "properties": { "destinationType": { "type": "string", - "enum": ["topic", "queue"] + "enum": ["topic", "queue"], + "default": "topic" }, "queue": { "type": "object", @@ -22,10 +23,12 @@ "maxLength": 48 }, "isPartitioned": { - "type": "boolean" + "type": "boolean", + "default": false }, "exclusive": { - "type": "boolean" + "type": "boolean", + "default": false } } }, @@ -41,10 +44,12 @@ "maxLength": 48 }, "durablePermitted": { - "type": "boolean" + "type": "boolean", + "default": true }, "lastMsgRetained": { - "type": "boolean" + "type": "boolean", + "default": false } } }, diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json index d83b0f5c..722ab02b 100644 --- a/ibmmq/json_schemas/message.json +++ b/ibmmq/json_schemas/message.json @@ -12,7 +12,8 @@ "properties": { "type": { "type": "string", - "enum": ["string", "jms", "binary"] + "enum": ["string", "jms", "binary"], + "default": "string" }, "headers": { "type": "string" @@ -22,7 +23,8 @@ }, "expiry": { "type": "integer", - "minimum": 0 + "minimum": 0, + "default": 0 }, "bindingVersion": { "type": "string" diff --git a/ibmmq/json_schemas/server.json b/ibmmq/json_schemas/server.json index 0d31df8b..f06c2ae2 100644 --- a/ibmmq/json_schemas/server.json +++ b/ibmmq/json_schemas/server.json @@ -14,18 +14,21 @@ "type": "string" }, "ccdtQueueManagerName": { - "type": "string" + "type": "string", + "default": "*" }, "cipherSpec": { "type": "string" }, "multiEndpointServer": { - "type": "boolean" + "type": "boolean", + "default": false }, "heartBeatInterval": { "type": "integer", "minimum": 0, - "maximum": 999999 + "maximum": 999999, + "default": 300 }, "bindingVersion": { "type": "string" From dc460c1e196b113f0b97acc7002a67336237306b Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Sat, 8 May 2021 14:33:30 +0530 Subject: [PATCH 17/31] $ids corrected --- amqp/json_schemas/channel.json | 2 +- amqp/json_schemas/message.json | 2 +- amqp/json_schemas/operation.json | 2 +- http/json_schemas/message.json | 2 +- http/json_schemas/operation.json | 2 +- ibmmq/json_schemas/channel.json | 2 +- ibmmq/json_schemas/message.json | 2 +- ibmmq/json_schemas/server.json | 2 +- kafka/json_schemas/message.json | 2 +- kafka/json_schemas/operation.json | 2 +- mqtt/json_schemas/message.json | 2 +- mqtt/json_schemas/operation.json | 2 +- mqtt/json_schemas/server.json | 2 +- websockets/json_schemas/channel.json | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/amqp/json_schemas/channel.json b/amqp/json_schemas/channel.json index 4bf64b39..e48bc364 100644 --- a/amqp/json_schemas/channel.json +++ b/amqp/json_schemas/channel.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/amqp/bindings/channel.json", + "$id": "http://asyncapi.com/bindings/amqp/channel.json", "title": "Channel Schema", "type": "object", "additionalProperties": false, diff --git a/amqp/json_schemas/message.json b/amqp/json_schemas/message.json index 95d3ece1..7646ff87 100644 --- a/amqp/json_schemas/message.json +++ b/amqp/json_schemas/message.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/amqp/bindings/message.json", + "$id": "http://asyncapi.com/bindings/amqp/message.json", "title": "Message Schema", "type": "object", "additionalProperties": false, diff --git a/amqp/json_schemas/operation.json b/amqp/json_schemas/operation.json index 7eaba33a..1424dce6 100644 --- a/amqp/json_schemas/operation.json +++ b/amqp/json_schemas/operation.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/amqp/bindings/operation.json", + "$id": "http://asyncapi.com/bindings/amqp/operation.json", "title": "Operation Schema", "type": "object", "additionalProperties": false, diff --git a/http/json_schemas/message.json b/http/json_schemas/message.json index 1a5e0ef3..130be08e 100644 --- a/http/json_schemas/message.json +++ b/http/json_schemas/message.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/http/bindings/message.json", + "$id": "http://asyncapi.com/bindings/http/message.json", "title": "Message Schema", "type": "object", "additionalProperties": false, diff --git a/http/json_schemas/operation.json b/http/json_schemas/operation.json index b93866bd..4ffbe8f8 100644 --- a/http/json_schemas/operation.json +++ b/http/json_schemas/operation.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/http/bindings/operation.json", + "$id": "http://asyncapi.com/bindings/http/operation.json", "title": "Operation Schema", "type": "object", "additionalProperties": false, diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json index 4f805a53..a2e260cf 100644 --- a/ibmmq/json_schemas/channel.json +++ b/ibmmq/json_schemas/channel.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/ibmmq/bindings/channel.json", + "$id": "http://asyncapi.com/bindings/ibmmq/channel.json", "title": "Channel Schema", "type": "object", "additionalProperties": false, diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json index 722ab02b..2b351e0a 100644 --- a/ibmmq/json_schemas/message.json +++ b/ibmmq/json_schemas/message.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/ibmmq/bindings/message.json", + "$id": "http://asyncapi.com/bindings/ibmmq/message.json", "title": "Message Schema", "type": "object", "additionalProperties": false, diff --git a/ibmmq/json_schemas/server.json b/ibmmq/json_schemas/server.json index f06c2ae2..95afa133 100644 --- a/ibmmq/json_schemas/server.json +++ b/ibmmq/json_schemas/server.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/ibmmq/bindings/server.json", + "$id": "http://asyncapi.com/bindings/ibmmq/server.json", "title": "Server Schema", "type": "object", "additionalProperties": false, diff --git a/kafka/json_schemas/message.json b/kafka/json_schemas/message.json index b5bb2a2f..883b780c 100644 --- a/kafka/json_schemas/message.json +++ b/kafka/json_schemas/message.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/kafka/bindings/message.json", + "$id": "http://asyncapi.com/bindings/kafka/message.json", "title": "Message Schema", "type": "object", "additionalProperties": false, diff --git a/kafka/json_schemas/operation.json b/kafka/json_schemas/operation.json index 0eed3bfe..aa740bc0 100644 --- a/kafka/json_schemas/operation.json +++ b/kafka/json_schemas/operation.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/kafka/bindings/operation.json", + "$id": "http://asyncapi.com/bindings/kafka/operation.json", "title": "Operation Schema", "type": "object", "additionalProperties": false, diff --git a/mqtt/json_schemas/message.json b/mqtt/json_schemas/message.json index 64e42a69..4a291f1c 100644 --- a/mqtt/json_schemas/message.json +++ b/mqtt/json_schemas/message.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/mqtt/bindings/message.json", + "$id": "http://asyncapi.com/bindings/mqtt/message.json", "title": "Operation Schema", "type": "object", "additionalProperties": false, diff --git a/mqtt/json_schemas/operation.json b/mqtt/json_schemas/operation.json index 08d66481..46a52847 100644 --- a/mqtt/json_schemas/operation.json +++ b/mqtt/json_schemas/operation.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/mqtt/bindings/operation.json", + "$id": "http://asyncapi.com/bindings/mqtt/operation.json", "title": "Operation Schema", "type": "object", "additionalProperties": false, diff --git a/mqtt/json_schemas/server.json b/mqtt/json_schemas/server.json index 74997bd0..b003f3b1 100644 --- a/mqtt/json_schemas/server.json +++ b/mqtt/json_schemas/server.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/mqtt/bindings/server.json", + "$id": "http://asyncapi.com/bindings/mqtt/server.json", "title": "Server Schema", "type": "object", "additionalProperties": false, diff --git a/websockets/json_schemas/channel.json b/websockets/json_schemas/channel.json index 5cbf5cb4..fe7a5786 100644 --- a/websockets/json_schemas/channel.json +++ b/websockets/json_schemas/channel.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/websockets/bindings/channel.json", + "$id": "http://asyncapi.com/bindings/websockets/channel.json", "title": "Channel Schema", "type": "object", "additionalProperties": false, From 58d3a0a0bc3a0bc53b97fc3f816cef6c9bccd4c6 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Sat, 8 May 2021 14:36:52 +0530 Subject: [PATCH 18/31] used correct file in $refs --- amqp/json_schemas/channel.json | 2 +- amqp/json_schemas/message.json | 2 +- amqp/json_schemas/operation.json | 2 +- http/json_schemas/message.json | 4 ++-- http/json_schemas/operation.json | 4 ++-- ibmmq/json_schemas/channel.json | 2 +- ibmmq/json_schemas/message.json | 2 +- ibmmq/json_schemas/server.json | 2 +- kafka/json_schemas/message.json | 4 ++-- kafka/json_schemas/operation.json | 6 +++--- mqtt/json_schemas/message.json | 2 +- mqtt/json_schemas/operation.json | 2 +- mqtt/json_schemas/server.json | 2 +- websockets/json_schemas/channel.json | 6 +++--- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/amqp/json_schemas/channel.json b/amqp/json_schemas/channel.json index e48bc364..2ec5b283 100644 --- a/amqp/json_schemas/channel.json +++ b/amqp/json_schemas/channel.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { diff --git a/amqp/json_schemas/message.json b/amqp/json_schemas/message.json index 7646ff87..53454195 100644 --- a/amqp/json_schemas/message.json +++ b/amqp/json_schemas/message.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { diff --git a/amqp/json_schemas/operation.json b/amqp/json_schemas/operation.json index 1424dce6..773e4410 100644 --- a/amqp/json_schemas/operation.json +++ b/amqp/json_schemas/operation.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { diff --git a/http/json_schemas/message.json b/http/json_schemas/message.json index 130be08e..cd894d59 100644 --- a/http/json_schemas/message.json +++ b/http/json_schemas/message.json @@ -6,12 +6,12 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { "headers": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { "type": "string" diff --git a/http/json_schemas/operation.json b/http/json_schemas/operation.json index 4ffbe8f8..d7e8867b 100644 --- a/http/json_schemas/operation.json +++ b/http/json_schemas/operation.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -32,7 +32,7 @@ ] }, "query": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { "type": "string" diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json index a2e260cf..67cfe419 100644 --- a/ibmmq/json_schemas/channel.json +++ b/ibmmq/json_schemas/channel.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json index 2b351e0a..790b7fbd 100644 --- a/ibmmq/json_schemas/message.json +++ b/ibmmq/json_schemas/message.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { diff --git a/ibmmq/json_schemas/server.json b/ibmmq/json_schemas/server.json index 95afa133..18433c2e 100644 --- a/ibmmq/json_schemas/server.json +++ b/ibmmq/json_schemas/server.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { diff --git a/kafka/json_schemas/message.json b/kafka/json_schemas/message.json index 883b780c..3507756c 100644 --- a/kafka/json_schemas/message.json +++ b/kafka/json_schemas/message.json @@ -6,12 +6,12 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { "key": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { "type": "string" diff --git a/kafka/json_schemas/operation.json b/kafka/json_schemas/operation.json index aa740bc0..69e18693 100644 --- a/kafka/json_schemas/operation.json +++ b/kafka/json_schemas/operation.json @@ -6,15 +6,15 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { "groupId": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" }, "clientId": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { "type": "string" diff --git a/mqtt/json_schemas/message.json b/mqtt/json_schemas/message.json index 4a291f1c..9d5b7a75 100644 --- a/mqtt/json_schemas/message.json +++ b/mqtt/json_schemas/message.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { diff --git a/mqtt/json_schemas/operation.json b/mqtt/json_schemas/operation.json index 46a52847..41fa5b2a 100644 --- a/mqtt/json_schemas/operation.json +++ b/mqtt/json_schemas/operation.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { diff --git a/mqtt/json_schemas/server.json b/mqtt/json_schemas/server.json index b003f3b1..fe9f7af8 100644 --- a/mqtt/json_schemas/server.json +++ b/mqtt/json_schemas/server.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { diff --git a/websockets/json_schemas/channel.json b/websockets/json_schemas/channel.json index fe7a5786..5dc1ca7c 100644 --- a/websockets/json_schemas/channel.json +++ b/websockets/json_schemas/channel.json @@ -6,7 +6,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, "properties": { @@ -18,10 +18,10 @@ ] }, "query": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" }, "headers": { - "$ref": "https://github.com/asyncapi/asyncapi-node/blob/master/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" }, "bindingVersion": { "type": "string" From d75caeb5b307932eb775c6e744809d93c901036f Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Tue, 18 May 2021 15:10:25 +0530 Subject: [PATCH 19/31] added description for amqp, ibmmq, kafka and http --- amqp/json_schemas/channel.json | 40 +++++++++++++++++++++---------- amqp/json_schemas/message.json | 9 ++++--- amqp/json_schemas/operation.json | 34 +++++++++++++++++--------- http/json_schemas/message.json | 7 ++++-- http/json_schemas/operation.json | 13 ++++++---- ibmmq/json_schemas/channel.json | 33 +++++++++++++++++-------- ibmmq/json_schemas/message.json | 16 +++++++++---- ibmmq/json_schemas/server.json | 19 ++++++++++----- kafka/json_schemas/message.json | 6 +++-- kafka/json_schemas/operation.json | 10 +++++--- 10 files changed, 128 insertions(+), 59 deletions(-) diff --git a/amqp/json_schemas/channel.json b/amqp/json_schemas/channel.json index 2ec5b283..a3fffa0a 100644 --- a/amqp/json_schemas/channel.json +++ b/amqp/json_schemas/channel.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/amqp/channel.json", "title": "Channel Schema", + "description": "This object contains information about the channel representation in AMQP.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -12,52 +13,65 @@ "properties": { "is": { "type": "string", - "enum": ["queue", "routingKey"] + "enum": ["queue", "routingKey"], + "description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)." }, "exchange": { "type": "object", "properties": { "name": { "type": "string", - "maxLength": 255 + "maxLength": 255, + "description": "The name of the exchange. It MUST NOT exceed 255 characters long." }, "type": { "type": "string", - "enum": ["topic", "direct", "fanout", "default", "headers"] + "enum": ["topic", "direct", "fanout", "default", "headers"], + "description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'." }, "durable": { - "type": "boolean" + "type": "boolean", + "description": "Whether the exchange should survive broker restarts or not." }, "autoDelete": { - "type": "boolean" + "type": "boolean", + "description": "Whether the exchange should be deleted when the last queue is unbound from it." }, "vhost": { "type": "string", - "default": "/" + "default": "/", + "description": "The virtual host of the exchange. Defaults to '/'." } - } + }, + "description": "When is=routingKey, this object defines the exchange properties." }, "queue": { "type": "object", "properties": { "name": { "type": "string", - "maxLength": 255 + "maxLength": 255, + "description": "The name of the queue. It MUST NOT exceed 255 characters long." }, "durable": { - "type": "boolean" + "type": "boolean", + "description": "Whether the queue should survive broker restarts or not." }, "exclusive": { - "type": "boolean" + "type": "boolean", + "description": "Whether the queue should be used only by one connection or not." }, "autoDelete": { - "type": "boolean" + "type": "boolean", + "description": "Whether the queue should be deleted when the last consumer unsubscribes." }, "vhost": { "type": "string", - "default": "/" + "default": "/", + "description": "The virtual host of the queue. Defaults to '/'." } - } + }, + "description": "When is=queue, this object defines the queue properties." }, "bindingVersion": { "type": "string" diff --git a/amqp/json_schemas/message.json b/amqp/json_schemas/message.json index 53454195..4cb17b78 100644 --- a/amqp/json_schemas/message.json +++ b/amqp/json_schemas/message.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/amqp/message.json", "title": "Message Schema", + "description": "This object contains information about the message representation in AMQP.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -11,14 +12,16 @@ }, "properties": { "contentEncoding": { - "type": "string" + "type": "string", + "description": "A MIME encoding for the message content." }, "messageType": { "type": "string", - "default": "latest" + "description": "Application-specific message type." }, "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } } diff --git a/amqp/json_schemas/operation.json b/amqp/json_schemas/operation.json index 773e4410..a06b2f85 100644 --- a/amqp/json_schemas/operation.json +++ b/amqp/json_schemas/operation.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/amqp/operation.json", "title": "Operation Schema", + "description": "This object contains information about the operation representation in AMQP.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -12,44 +13,55 @@ "properties": { "expiration": { "type": "integer", - "minimum": 0 + "minimum": 0, + "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." }, "userId": { - "type": "string" + "type": "string", + "description": "Identifies the user who has sent the message." }, "cc": { "type": "array", "items": { "type": "string" - } + }, + "description": "The routing keys the message should be routed to at the time of publishing." }, "priority": { - "type": "integer" + "type": "integer", + "description": "A priority for the message." }, "deliveryMode": { "type": "integer", - "enum": [1,2] + "enum": [1,2], + "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." }, "mandatory": { - "type": "boolean" + "type": "boolean", + "description": "Whether the message is mandatory or not." }, "bcc": { "type": "array", "items": { "type": "string" - } + }, + "description": "Like cc but consumers will not receive this information." }, "replyTo": { - "type": "string" + "type": "string", + "description": "Name of the queue where the consumer should send the response." }, "timestamp": { - "type": "boolean" + "type": "boolean", + "description": "Whether the message should include a timestamp or not." }, "ack": { - "type": "boolean" + "type": "boolean", + "description": "Whether the consumer should ack the message or not." }, "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } } diff --git a/http/json_schemas/message.json b/http/json_schemas/message.json index cd894d59..7076d1b3 100644 --- a/http/json_schemas/message.json +++ b/http/json_schemas/message.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/http/message.json", "title": "Message Schema", + "description": "This object contains information about the message representation in HTTP.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -11,10 +12,12 @@ }, "properties": { "headers": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." }, "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } } } diff --git a/http/json_schemas/operation.json b/http/json_schemas/operation.json index d7e8867b..a2211261 100644 --- a/http/json_schemas/operation.json +++ b/http/json_schemas/operation.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/http/operation.json", "title": "Operation Schema", + "description": "This object contains information about the operation representation in HTTP.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -15,7 +16,8 @@ "enum": [ "request", "response" - ] + ], + "description": "Required. Type of operation. Its value MUST be either 'request' or 'response'." }, "method": { "type": "string", @@ -29,13 +31,16 @@ "OPTIONS", "CONNECT", "TRACE" - ] + ], + "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." }, "query": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." }, "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } }, "required": [ diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json index 67cfe419..6f12d1f0 100644 --- a/ibmmq/json_schemas/channel.json +++ b/ibmmq/json_schemas/channel.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/ibmmq/channel.json", "title": "Channel Schema", + "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -13,53 +14,65 @@ "destinationType": { "type": "string", "enum": ["topic", "queue"], - "default": "topic" + "default": "topic", + "description": "Defines the type of AsyncAPI channel." }, "queue": { "type": "object", + "description": "Defines the properties of a queue.", "properties": { "objectName": { "type": "string", - "maxLength": 48 + "maxLength": 48, + "description": "Defines the name of the IBM MQ queue associated with the channel." }, "isPartitioned": { "type": "boolean", - "default": false + "default": false, + "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." }, "exclusive": { "type": "boolean", - "default": false + "default": false, + "description": "Specifies if it is recommended to open the queue exclusively." } } }, "topic": { "type": "object", + "description": "Defines the properties of a topic.", "properties": { "string": { "type": "string", - "maxLength": 10240 + "maxLength": 10240, + "description": "The value of the IBM MQ topic string to be used." }, "objectName": { "type": "string", - "maxLength": 48 + "maxLength": 48, + "description": "The name of the IBM MQ topic object." }, "durablePermitted": { "type": "boolean", - "default": true + "default": true, + "description": "Defines if the subscription may be durable." }, "lastMsgRetained": { "type": "boolean", - "default": false + "default": false, + "description": "Defines if the last message published will be made available to new subscriptions." } } }, "maxMsgLength": { "type": "integer", "minimum": 0, - "maximum":104857600 + "maximum":104857600, + "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." }, "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding." } }, "oneOf": [ diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json index 790b7fbd..65448085 100644 --- a/ibmmq/json_schemas/message.json +++ b/ibmmq/json_schemas/message.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/ibmmq/message.json", "title": "Message Schema", + "description": "This object contains information about the message representation in IBM MQ.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -13,21 +14,26 @@ "type": { "type": "string", "enum": ["string", "jms", "binary"], - "default": "string" + "default": "string", + "description": "The type of the message." }, "headers": { - "type": "string" + "type": "string", + "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." }, "description": { - "type": "string" + "type": "string", + "description": "Provides additional information for application developers: describes the message type or format." }, "expiry": { "type": "integer", "minimum": 0, - "default": 0 + "default": 0, + "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." }, "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding." } }, diff --git a/ibmmq/json_schemas/server.json b/ibmmq/json_schemas/server.json index 18433c2e..58ba41d0 100644 --- a/ibmmq/json_schemas/server.json +++ b/ibmmq/json_schemas/server.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/ibmmq/server.json", "title": "Server Schema", + "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -11,27 +12,33 @@ }, "properties": { "groupId": { - "type": "string" + "type": "string", + "description": "Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group." }, "ccdtQueueManagerName": { "type": "string", - "default": "*" + "default": "*", + "description": "The name of the IBM MQ queue manager to bind to in the CCDT file." }, "cipherSpec": { - "type": "string" + "type": "string", + "description": "The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center." }, "multiEndpointServer": { "type": "boolean", - "default": false + "default": false, + "description": "If 'multiEndpointServer' is 'true' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint ('multiEndpointServer' = 'false') may be required." }, "heartBeatInterval": { "type": "integer", "minimum": 0, "maximum": 999999, - "default": 300 + "default": 300, + "description": "The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center." }, "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding." } } } diff --git a/kafka/json_schemas/message.json b/kafka/json_schemas/message.json index 3507756c..1a3e590b 100644 --- a/kafka/json_schemas/message.json +++ b/kafka/json_schemas/message.json @@ -11,10 +11,12 @@ }, "properties": { "key": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "The message key." }, "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } } } diff --git a/kafka/json_schemas/operation.json b/kafka/json_schemas/operation.json index 69e18693..ea2cd037 100644 --- a/kafka/json_schemas/operation.json +++ b/kafka/json_schemas/operation.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/kafka/operation.json", "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -11,13 +12,16 @@ }, "properties": { "groupId": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "Id of the consumer group." }, "clientId": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "Id of the consumer inside a consumer group." }, "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } } From b9acfb66c50e83ed56d43622983ca6433286f820 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Wed, 19 May 2021 10:23:43 +0530 Subject: [PATCH 20/31] added description for mqtt --- mqtt/json_schemas/message.json | 4 +++- mqtt/json_schemas/operation.json | 10 +++++++--- mqtt/json_schemas/server.json | 26 ++++++++++++++++++-------- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/mqtt/json_schemas/message.json b/mqtt/json_schemas/message.json index 9d5b7a75..cae5d25a 100644 --- a/mqtt/json_schemas/message.json +++ b/mqtt/json_schemas/message.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/mqtt/message.json", "title": "Operation Schema", + "description": "This object contains information about the message representation in MQTT.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -11,7 +12,8 @@ }, "properties": { "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } } } diff --git a/mqtt/json_schemas/operation.json b/mqtt/json_schemas/operation.json index 41fa5b2a..92a44fe8 100644 --- a/mqtt/json_schemas/operation.json +++ b/mqtt/json_schemas/operation.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/mqtt/operation.json", "title": "Operation Schema", + "description": "This object contains information about the operation representation in MQTT.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -11,13 +12,16 @@ }, "properties": { "qos": { - "type": "integer" + "type": "integer", + "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." }, "retain": { - "type": "boolean" + "type": "boolean", + "description": "Whether the broker should retain the message or not." }, "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } } } diff --git a/mqtt/json_schemas/server.json b/mqtt/json_schemas/server.json index fe9f7af8..563edf1c 100644 --- a/mqtt/json_schemas/server.json +++ b/mqtt/json_schemas/server.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/mqtt/server.json", "title": "Server Schema", + "description": "This object contains information about the server representation in MQTT.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -12,34 +13,43 @@ "properties": { "clientId": { - "type": "string" + "type": "string", + "description": "The client identifier." }, "cleanSession": { - "type": "boolean" + "type": "boolean", + "description": "Whether to create a persistent connection or not. When 'false', the connection will be persistent." }, "lastWill": { "type": "object", + "description": "Last Will and Testament configuration.", "properties": { "topic": { - "type": "string" + "type": "string", + "description": "The topic where the Last Will and Testament message will be sent." }, "qos": { "type": "integer", - "enum": [0,1,2] + "enum": [0,1,2], + "description": "Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2." }, "message": { - "type": "string" + "type": "string", + "description": "Last Will message." }, "retain": { - "type": "boolean" + "type": "boolean", + "description": "Whether the broker should retain the Last Will and Testament message or not." } } }, "keepAlive": { - "type": "integer" + "type": "integer", + "description": "Interval in seconds of the longest period of time the broker and the client can endure without sending a message." }, "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } } } From 5d9be8e8bd527f567fc019220bb8642660db30c5 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Wed, 19 May 2021 10:27:04 +0530 Subject: [PATCH 21/31] added description for Websockets --- websockets/json_schemas/channel.json | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/websockets/json_schemas/channel.json b/websockets/json_schemas/channel.json index 5dc1ca7c..fbf8e531 100644 --- a/websockets/json_schemas/channel.json +++ b/websockets/json_schemas/channel.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/bindings/websockets/channel.json", "title": "Channel Schema", + "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -15,16 +16,20 @@ "enum": [ "GET", "POST" - ] + ], + "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." }, "query": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." }, "headers": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema" + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." }, "bindingVersion": { - "type": "string" + "type": "string", + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } } } From d2f26d8db5b096943b625e4187d6cb8c299b8ef2 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Wed, 19 May 2021 10:40:20 +0530 Subject: [PATCH 22/31] added bindingVersion value --- amqp/json_schemas/channel.json | 6 +++++- amqp/json_schemas/message.json | 3 +++ amqp/json_schemas/operation.json | 3 +++ http/json_schemas/message.json | 3 +++ http/json_schemas/operation.json | 5 ++++- ibmmq/json_schemas/channel.json | 3 +++ ibmmq/json_schemas/message.json | 3 +++ ibmmq/json_schemas/server.json | 3 +++ kafka/json_schemas/message.json | 3 +++ kafka/json_schemas/operation.json | 3 +++ mqtt/json_schemas/message.json | 3 +++ mqtt/json_schemas/operation.json | 3 +++ mqtt/json_schemas/server.json | 3 +++ websockets/json_schemas/channel.json | 3 +++ 14 files changed, 45 insertions(+), 2 deletions(-) diff --git a/amqp/json_schemas/channel.json b/amqp/json_schemas/channel.json index a3fffa0a..76652600 100644 --- a/amqp/json_schemas/channel.json +++ b/amqp/json_schemas/channel.json @@ -74,7 +74,11 @@ "description": "When is=queue, this object defines the queue properties." }, "bindingVersion": { - "type": "string" + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, diff --git a/amqp/json_schemas/message.json b/amqp/json_schemas/message.json index 4cb17b78..ec1dae2d 100644 --- a/amqp/json_schemas/message.json +++ b/amqp/json_schemas/message.json @@ -21,6 +21,9 @@ }, "bindingVersion": { "type": "string", + "enum": [ + "0.2.0" + ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } diff --git a/amqp/json_schemas/operation.json b/amqp/json_schemas/operation.json index a06b2f85..46e952d4 100644 --- a/amqp/json_schemas/operation.json +++ b/amqp/json_schemas/operation.json @@ -61,6 +61,9 @@ }, "bindingVersion": { "type": "string", + "enum": [ + "0.2.0" + ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } diff --git a/http/json_schemas/message.json b/http/json_schemas/message.json index 7076d1b3..9cba82cd 100644 --- a/http/json_schemas/message.json +++ b/http/json_schemas/message.json @@ -17,6 +17,9 @@ }, "bindingVersion": { "type": "string", + "enum": [ + "0.1.0" + ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } } diff --git a/http/json_schemas/operation.json b/http/json_schemas/operation.json index a2211261..31cead2b 100644 --- a/http/json_schemas/operation.json +++ b/http/json_schemas/operation.json @@ -40,7 +40,10 @@ }, "bindingVersion": { "type": "string", - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "required": [ diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json index 6f12d1f0..c7b55520 100644 --- a/ibmmq/json_schemas/channel.json +++ b/ibmmq/json_schemas/channel.json @@ -72,6 +72,9 @@ }, "bindingVersion": { "type": "string", + "enum": [ + "0.1.0" + ], "description": "The version of this binding." } }, diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json index 65448085..eca87e57 100644 --- a/ibmmq/json_schemas/message.json +++ b/ibmmq/json_schemas/message.json @@ -33,6 +33,9 @@ }, "bindingVersion": { "type": "string", + "enum": [ + "0.1.0" + ], "description": "The version of this binding." } diff --git a/ibmmq/json_schemas/server.json b/ibmmq/json_schemas/server.json index 58ba41d0..3e5fbbf7 100644 --- a/ibmmq/json_schemas/server.json +++ b/ibmmq/json_schemas/server.json @@ -38,6 +38,9 @@ }, "bindingVersion": { "type": "string", + "enum": [ + "0.1.0" + ], "description": "The version of this binding." } } diff --git a/kafka/json_schemas/message.json b/kafka/json_schemas/message.json index 1a3e590b..7903bd55 100644 --- a/kafka/json_schemas/message.json +++ b/kafka/json_schemas/message.json @@ -16,6 +16,9 @@ }, "bindingVersion": { "type": "string", + "enum": [ + "0.1.0" + ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } } diff --git a/kafka/json_schemas/operation.json b/kafka/json_schemas/operation.json index ea2cd037..fa03799a 100644 --- a/kafka/json_schemas/operation.json +++ b/kafka/json_schemas/operation.json @@ -21,6 +21,9 @@ }, "bindingVersion": { "type": "string", + "enum": [ + "0.1.0" + ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } diff --git a/mqtt/json_schemas/message.json b/mqtt/json_schemas/message.json index cae5d25a..e3ad4a4d 100644 --- a/mqtt/json_schemas/message.json +++ b/mqtt/json_schemas/message.json @@ -13,6 +13,9 @@ "properties": { "bindingVersion": { "type": "string", + "enum": [ + "0.1.0" + ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } } diff --git a/mqtt/json_schemas/operation.json b/mqtt/json_schemas/operation.json index 92a44fe8..3f11f687 100644 --- a/mqtt/json_schemas/operation.json +++ b/mqtt/json_schemas/operation.json @@ -21,6 +21,9 @@ }, "bindingVersion": { "type": "string", + "enum": [ + "0.1.0" + ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } } diff --git a/mqtt/json_schemas/server.json b/mqtt/json_schemas/server.json index 563edf1c..dae1c005 100644 --- a/mqtt/json_schemas/server.json +++ b/mqtt/json_schemas/server.json @@ -49,6 +49,9 @@ }, "bindingVersion": { "type": "string", + "enum": [ + "0.1.0" + ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } } diff --git a/websockets/json_schemas/channel.json b/websockets/json_schemas/channel.json index fbf8e531..059ae94b 100644 --- a/websockets/json_schemas/channel.json +++ b/websockets/json_schemas/channel.json @@ -29,6 +29,9 @@ }, "bindingVersion": { "type": "string", + "enum": [ + "0.1.0" + ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } } From 8977a5d6924df818f65cf1bc4f234ece763e0510 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Wed, 19 May 2021 20:28:29 +0530 Subject: [PATCH 23/31] updated amqp schema version in README.md --- amqp/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/amqp/README.md b/amqp/README.md index f34f9cf1..547fa25e 100644 --- a/amqp/README.md +++ b/amqp/README.md @@ -65,7 +65,7 @@ channels: durable: true autoDelete: false vhost: / - bindingVersion: 0.1.0 + bindingVersion: 0.2.0 ``` @@ -111,7 +111,7 @@ channels: replyTo: user.signedup timestamp: true ack: false - bindingVersion: 0.1.0 + bindingVersion: 0.2.0 ``` @@ -140,5 +140,5 @@ channels: amqp: contentEncoding: gzip messageType: 'user.signup' - bindingVersion: 0.1.0 + bindingVersion: 0.2.0 ``` From 908b2667ab7d14b12b029139f0bac93673a18fbf Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Wed, 19 May 2021 20:35:43 +0530 Subject: [PATCH 24/31] added examples for amqp schemas --- amqp/json_schemas/channel.json | 24 ++++++++++++++++++++++++ amqp/json_schemas/message.json | 10 ++++++++-- amqp/json_schemas/operation.json | 22 ++++++++++++++++++++-- 3 files changed, 52 insertions(+), 4 deletions(-) diff --git a/amqp/json_schemas/channel.json b/amqp/json_schemas/channel.json index 76652600..bce8f58e 100644 --- a/amqp/json_schemas/channel.json +++ b/amqp/json_schemas/channel.json @@ -109,5 +109,29 @@ ] } } + ], + "examples": [ + { + "is": "routingKey", + "exchange": { + "name": "myExchange", + "type": "topic", + "durable": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.2.0" + }, + { + "is": "queue", + "queue": { + "name": "my-queue-name", + "durable": true, + "exclusive": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.2.0" + } ] } diff --git a/amqp/json_schemas/message.json b/amqp/json_schemas/message.json index ec1dae2d..cf739534 100644 --- a/amqp/json_schemas/message.json +++ b/amqp/json_schemas/message.json @@ -26,6 +26,12 @@ ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } - - } + }, + "examples": [ + { + "contentEncoding": "gzip", + "messageType": "user.signup", + "bindingVersion": "0.2.0" + } + ] } diff --git a/amqp/json_schemas/operation.json b/amqp/json_schemas/operation.json index 46e952d4..30f20d8b 100644 --- a/amqp/json_schemas/operation.json +++ b/amqp/json_schemas/operation.json @@ -66,6 +66,24 @@ ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } - - } + }, + "examples": [ + { + "expiration": 100000, + "userId": "guest", + "cc": [ + "user.logs" + ], + "priority": 10, + "deliveryMode": 2, + "mandatory": false, + "bcc": [ + "external.audit" + ], + "replyTo": "user.signedup", + "timestamp": true, + "ack": false, + "bindingVersion": "0.2.0" + } + ] } From 08c69b0fc077cf564c334d038c8e78c64acacc64 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Thu, 20 May 2021 09:19:36 +0530 Subject: [PATCH 25/31] added examples for http schemas --- http/json_schemas/message.json | 18 ++++++++++++++- http/json_schemas/operation.json | 39 ++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/http/json_schemas/message.json b/http/json_schemas/message.json index 9cba82cd..2437d2cc 100644 --- a/http/json_schemas/message.json +++ b/http/json_schemas/message.json @@ -22,5 +22,21 @@ ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } - } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "Content-Type": { + "type": "string", + "enum": [ + "application/json" + ] + } + } + }, + "bindingVersion": "0.1.0" + } + ] } diff --git a/http/json_schemas/operation.json b/http/json_schemas/operation.json index 31cead2b..67483a4c 100644 --- a/http/json_schemas/operation.json +++ b/http/json_schemas/operation.json @@ -72,6 +72,45 @@ ] } } + ], + "examples": [ + { + "type": "response", + "query": { + "type": "object", + "required": [ + "companyId" + ], + "properties": { + "companyId": { + "type": "number", + "minimum": 1, + "description": "The Id of the company." + } + }, + "additionalProperties": false + }, + "bindingVersion": "0.1.0" + }, + { + "type": "request", + "method": "GET", + "query": { + "type": "object", + "required": [ + "companyId" + ], + "properties": { + "companyId": { + "type": "number", + "minimum": 1, + "description": "The Id of the company." + } + }, + "additionalProperties": false + }, + "bindingVersion": "0.1.0" + } ] } From f489a861995ac91f5ce27ef2e16b3646bcf38593 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Thu, 20 May 2021 09:44:15 +0530 Subject: [PATCH 26/31] message binding example for ibmmq corrected --- ibmmq/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibmmq/README.md b/ibmmq/README.md index 9d7cb8ba..57cc75e5 100644 --- a/ibmmq/README.md +++ b/ibmmq/README.md @@ -234,7 +234,7 @@ channels: message: bindings: ibmmq: - type: text + type: string bindingVersion: 0.1.0 ``` From 4bbb4a63431dcb8170d6fcf40fab8e1359c395b2 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Thu, 20 May 2021 09:48:45 +0530 Subject: [PATCH 27/31] added examples for ibmmq schemas --- ibmmq/json_schemas/channel.json | 17 +++++++++++++++++ ibmmq/json_schemas/message.json | 11 +++++++++++ ibmmq/json_schemas/server.json | 13 ++++++++++++- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json index c7b55520..994e45a6 100644 --- a/ibmmq/json_schemas/channel.json +++ b/ibmmq/json_schemas/channel.json @@ -105,5 +105,22 @@ ] } } + ], + "examples": [ + { + "destinationType": "topic", + "topic": { + "objectName": "myTopicName" + }, + "bindingVersion": "0.1.0" + }, + { + "destinationType": "queue", + "queue": { + "objectName": "myQueueName", + "exclusive": true + }, + "bindingVersion": "0.1.0" + } ] } diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json index eca87e57..e207be83 100644 --- a/ibmmq/json_schemas/message.json +++ b/ibmmq/json_schemas/message.json @@ -66,5 +66,16 @@ ] } } + ], + "examples": [ + { + "type": "string", + "bindingVersion": "0.1.0" + }, + { + "type": "jms", + "description": "JMS stream message", + "bindingVersion": "0.1.0" + } ] } diff --git a/ibmmq/json_schemas/server.json b/ibmmq/json_schemas/server.json index 3e5fbbf7..208018bb 100644 --- a/ibmmq/json_schemas/server.json +++ b/ibmmq/json_schemas/server.json @@ -43,5 +43,16 @@ ], "description": "The version of this binding." } - } + }, + "examples": [ + { + "groupId": "PRODCLSTR1", + "cipherSpec": "ANY_TLS12_OR_HIGHER", + "bindingVersion": "0.1.0" + }, + { + "groupId": "PRODCLSTR1", + "bindingVersion": "0.1.0" + } + ] } From 472ca60387edd9d4bfae0d7f906b44151dda6136 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Thu, 20 May 2021 18:17:51 +0530 Subject: [PATCH 28/31] added examples for kafka bindings --- kafka/json_schemas/message.json | 13 ++++++++++++- kafka/json_schemas/operation.json | 19 ++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/kafka/json_schemas/message.json b/kafka/json_schemas/message.json index 7903bd55..8509ebb7 100644 --- a/kafka/json_schemas/message.json +++ b/kafka/json_schemas/message.json @@ -21,5 +21,16 @@ ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } - } + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "bindingVersion": "0.1.0" + } + ] } diff --git a/kafka/json_schemas/operation.json b/kafka/json_schemas/operation.json index fa03799a..500744ca 100644 --- a/kafka/json_schemas/operation.json +++ b/kafka/json_schemas/operation.json @@ -27,5 +27,22 @@ "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } - } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.1.0" + } + ] } From 32bdcc6da3dfbb5ef73b359f7c831ec851815b3a Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Sat, 22 May 2021 17:27:54 +0530 Subject: [PATCH 29/31] added examples for mqtt bindings --- mqtt/json_schemas/message.json | 7 ++++++- mqtt/json_schemas/operation.json | 9 ++++++++- mqtt/json_schemas/server.json | 16 +++++++++++++++- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/mqtt/json_schemas/message.json b/mqtt/json_schemas/message.json index e3ad4a4d..7f9b1057 100644 --- a/mqtt/json_schemas/message.json +++ b/mqtt/json_schemas/message.json @@ -18,5 +18,10 @@ ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } - } + }, + "examples": [ + { + "bindingVersion": "0.1.0" + } + ] } diff --git a/mqtt/json_schemas/operation.json b/mqtt/json_schemas/operation.json index 3f11f687..eb2f6aa5 100644 --- a/mqtt/json_schemas/operation.json +++ b/mqtt/json_schemas/operation.json @@ -26,5 +26,12 @@ ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } - } + }, + "examples": [ + { + "qos": 2, + "retain": true, + "bindingVersion": "0.1.0" + } + ] } diff --git a/mqtt/json_schemas/server.json b/mqtt/json_schemas/server.json index dae1c005..31247ac1 100644 --- a/mqtt/json_schemas/server.json +++ b/mqtt/json_schemas/server.json @@ -54,5 +54,19 @@ ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } - } + }, + "examples": [ + { + "clientId": "guest", + "cleanSession": true, + "lastWill": { + "topic": "/last-wills", + "qos": 2, + "message": "Guest gone offline.", + "retain": false + }, + "keepAlive": 60, + "bindingVersion": "0.1.0" + } + ] } From 8bf0a38d893631b59bb8198a1351d922baf65506 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Sat, 22 May 2021 18:04:04 +0530 Subject: [PATCH 30/31] added examples for websockets bindings --- websockets/json_schemas/channel.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/websockets/json_schemas/channel.json b/websockets/json_schemas/channel.json index 059ae94b..ebb51eea 100644 --- a/websockets/json_schemas/channel.json +++ b/websockets/json_schemas/channel.json @@ -34,5 +34,11 @@ ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } - } + }, + "examples": [ + { + "method": "POST", + "bindingVersion": "0.1.0" + } + ] } From 080769de81ef543a15a2799090c60d9fee0440a2 Mon Sep 17 00:00:00 2001 From: khudadad414 Date: Sat, 22 May 2021 19:46:17 +0530 Subject: [PATCH 31/31] added required to queue.objectName --- ibmmq/json_schemas/channel.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json index 994e45a6..5075486c 100644 --- a/ibmmq/json_schemas/channel.json +++ b/ibmmq/json_schemas/channel.json @@ -36,7 +36,8 @@ "default": false, "description": "Specifies if it is recommended to open the queue exclusively." } - } + }, + "required": ["objectName"] }, "topic": { "type": "object",