diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/ChannelBindingsDeserializer.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/ChannelBindingsDeserializer.java index f1b2351d..7f089304 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/ChannelBindingsDeserializer.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/ChannelBindingsDeserializer.java @@ -7,7 +7,7 @@ import com.asyncapi.bindings.http.HTTPChannelBinding; import com.asyncapi.bindings.ibmmq.IBMMQChannelBinding; import com.asyncapi.bindings.jms.JMSChannelBinding; -import com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelBinding; +import com.asyncapi.bindings.kafka.KafkaChannelBinding; import com.asyncapi.bindings.mercure.MercureChannelBinding; import com.asyncapi.bindings.mqtt.v0._1_0.channel.MQTTChannelBinding; import com.asyncapi.bindings.mqtt5.v0._2_0.channel.MQTT5ChannelBinding; diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/MessageBindingsDeserializer.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/MessageBindingsDeserializer.java index 753ab5f4..7f3704d6 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/MessageBindingsDeserializer.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/MessageBindingsDeserializer.java @@ -7,7 +7,7 @@ import com.asyncapi.bindings.http.HTTPMessageBinding; import com.asyncapi.bindings.ibmmq.IBMMQMessageBinding; import com.asyncapi.bindings.jms.JMSMessageBinding; -import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBinding; +import com.asyncapi.bindings.kafka.KafkaMessageBinding; import com.asyncapi.bindings.mercure.MercureMessageBinding; import com.asyncapi.bindings.mqtt.v0._1_0.message.MQTTMessageBinding; import com.asyncapi.bindings.mqtt5.v0._2_0.message.MQTT5MessageBinding; diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/OperationBindingsDeserializer.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/OperationBindingsDeserializer.java index aa1186f9..d9fba36d 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/OperationBindingsDeserializer.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/OperationBindingsDeserializer.java @@ -7,7 +7,7 @@ import com.asyncapi.bindings.http.HTTPOperationBinding; import com.asyncapi.bindings.ibmmq.IBMMQOperationBinding; import com.asyncapi.bindings.jms.JMSOperationBinding; -import com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBinding; +import com.asyncapi.bindings.kafka.KafkaOperationBinding; import com.asyncapi.bindings.mercure.MercureOperationBinding; import com.asyncapi.bindings.mqtt.v0._1_0.operation.MQTTOperationBinding; import com.asyncapi.bindings.mqtt5.v0._2_0.operation.MQTT5OperationBinding; diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/ServerBindingsDeserializer.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/ServerBindingsDeserializer.java index 7b1d549f..e79911b5 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/ServerBindingsDeserializer.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/ServerBindingsDeserializer.java @@ -7,7 +7,7 @@ import com.asyncapi.bindings.http.HTTPServerBinding; import com.asyncapi.bindings.ibmmq.IBMMQServerBinding; import com.asyncapi.bindings.jms.JMSServerBinding; -import com.asyncapi.bindings.kafka.v0._4_0.server.KafkaServerBinding; +import com.asyncapi.bindings.kafka.KafkaServerBinding; import com.asyncapi.bindings.mercure.MercureServerBinding; import com.asyncapi.bindings.mqtt.v0._1_0.server.MQTTServerBinding; import com.asyncapi.bindings.mqtt5.v0._2_0.server.MQTT5ServerBinding; diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaChannelBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaChannelBinding.java new file mode 100644 index 00000000..d393393a --- /dev/null +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaChannelBinding.java @@ -0,0 +1,29 @@ +package com.asyncapi.bindings.kafka; + +import com.asyncapi.bindings.ChannelBinding; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import lombok.EqualsAndHashCode; + +/** + * Describes Kafka channel binding. + * + * @version 0.4.0 + * @see Kafka channel binding + * @author Pavel Bodiachevskii + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + defaultImpl = com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelBinding.class, + property = "bindingVersion", + visible = true +) +@JsonSubTypes({ + @JsonSubTypes.Type(value = com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelBinding.class, names = { + "0.4.0", + "latest" + }), +}) +@EqualsAndHashCode(callSuper = true) +public class KafkaChannelBinding extends ChannelBinding {} \ No newline at end of file diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaMessageBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaMessageBinding.java new file mode 100644 index 00000000..7f231b72 --- /dev/null +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaMessageBinding.java @@ -0,0 +1,31 @@ +package com.asyncapi.bindings.kafka; + +import com.asyncapi.bindings.MessageBinding; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import lombok.EqualsAndHashCode; + +/** + * Describes Kafka message binding. + *

+ * Contains information about the message representation in Kafka. + * + * @version 0.1.0 + * @see Kafka message binding + * @author Pavel Bodiachevskii + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + defaultImpl = com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBinding.class, + property = "bindingVersion", + visible = true +) +@JsonSubTypes({ + @JsonSubTypes.Type(value = com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBinding.class, names = { + "0.4.0", + "latest" + }), +}) +@EqualsAndHashCode(callSuper = true) +public class KafkaMessageBinding extends MessageBinding {} \ No newline at end of file diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaOperationBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaOperationBinding.java new file mode 100644 index 00000000..c4a3b8bf --- /dev/null +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaOperationBinding.java @@ -0,0 +1,31 @@ +package com.asyncapi.bindings.kafka; + +import com.asyncapi.bindings.OperationBinding; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import lombok.EqualsAndHashCode; + +/** + * Describes Kafka operation binding. + *

+ * Contains information about the operation representation in Kafka. + * + * @version 0.1.0 + * @see Kafka operation binding + * @author Pavel Bodiachevskii + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + defaultImpl = com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBinding.class, + property = "bindingVersion", + visible = true +) +@JsonSubTypes({ + @JsonSubTypes.Type(value = com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBinding.class, names = { + "0.4.0", + "latest" + }), +}) +@EqualsAndHashCode(callSuper = true) +public class KafkaOperationBinding extends OperationBinding {} \ No newline at end of file diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaServerBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaServerBinding.java new file mode 100644 index 00000000..ae03fc20 --- /dev/null +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaServerBinding.java @@ -0,0 +1,29 @@ +package com.asyncapi.bindings.kafka; + +import com.asyncapi.bindings.ServerBinding; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import lombok.EqualsAndHashCode; + +/** + * Describes Kafka server binding. + * + * @version 0.4.0 + * @see Kafka server binding + * @author Pavel Bodiachevskii + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + defaultImpl = com.asyncapi.bindings.kafka.v0._4_0.server.KafkaServerBinding.class, + property = "bindingVersion", + visible = true +) +@JsonSubTypes({ + @JsonSubTypes.Type(value = com.asyncapi.bindings.kafka.v0._4_0.server.KafkaServerBinding.class, names = { + "0.4.0", + "latest" + }), +}) +@EqualsAndHashCode(callSuper = true) +public class KafkaServerBinding extends ServerBinding {} \ No newline at end of file diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/channel/KafkaChannelBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/channel/KafkaChannelBinding.java index 9b6b2909..e0e9d6db 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/channel/KafkaChannelBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/channel/KafkaChannelBinding.java @@ -1,6 +1,5 @@ package com.asyncapi.bindings.kafka.v0._4_0.channel; -import com.asyncapi.bindings.ChannelBinding; import com.fasterxml.jackson.annotation.JsonClassDescription; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyDescription; @@ -20,7 +19,7 @@ @AllArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonClassDescription("Describes Kafka channel binding.") -public class KafkaChannelBinding extends ChannelBinding { +public class KafkaChannelBinding extends com.asyncapi.bindings.kafka.KafkaChannelBinding { /** * Kafka topic name if different from channel name. @@ -66,11 +65,14 @@ public class KafkaChannelBinding extends ChannelBinding { @JsonPropertyDescription("Topic configuration properties that are relevant for the API.") private KafkaChannelTopicConfiguration topicConfiguration; - /** - * The version of this binding. If omitted, "latest" MUST be assumed. - */ - @Nullable - @Builder.Default - private String bindingVersion = "0.4.0"; + @Override + public String getBindingVersion() { + return "0.4.0"; + } + + @Override + public void setBindingVersion(@Nullable String bindingVersion) { + super.setBindingVersion("0.4.0"); + } } diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/message/KafkaMessageBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/message/KafkaMessageBinding.java index cc3d7633..5e2b22ad 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/message/KafkaMessageBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/message/KafkaMessageBinding.java @@ -1,6 +1,5 @@ package com.asyncapi.bindings.kafka.v0._4_0.message; -import com.asyncapi.bindings.MessageBinding; import com.asyncapi.v3.schema.AsyncAPISchema; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyDescription; @@ -21,7 +20,7 @@ @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -public class KafkaMessageBinding extends MessageBinding { +public class KafkaMessageBinding extends com.asyncapi.bindings.kafka.KafkaMessageBinding { /** * The message key. @@ -55,13 +54,14 @@ public class KafkaMessageBinding extends MessageBinding { @JsonPropertyDescription("Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied.") private String schemaLookupStrategy; - /** - * The version of this binding. If omitted, "latest" MUST be assumed. - */ - @Nullable - @Builder.Default - @JsonProperty("bindingVersion") - @JsonPropertyDescription("The version of this binding.") - private String bindingVersion = "0.4.0"; + @Override + public String getBindingVersion() { + return "0.4.0"; + } + + @Override + public void setBindingVersion(@Nullable String bindingVersion) { + super.setBindingVersion("0.4.0"); + } } diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/operation/KafkaOperationBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/operation/KafkaOperationBinding.java index 74999426..c2a91203 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/operation/KafkaOperationBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/operation/KafkaOperationBinding.java @@ -1,6 +1,5 @@ package com.asyncapi.bindings.kafka.v0._4_0.operation; -import com.asyncapi.bindings.OperationBinding; import com.asyncapi.v3.schema.AsyncAPISchema; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyDescription; @@ -21,7 +20,7 @@ @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -public class KafkaOperationBinding extends OperationBinding { +public class KafkaOperationBinding extends com.asyncapi.bindings.kafka.KafkaOperationBinding { /** * Id of the consumer group. @@ -39,11 +38,14 @@ public class KafkaOperationBinding extends OperationBinding { @JsonPropertyDescription("Id of the consumer inside a consumer group.") private AsyncAPISchema clientId; - /** - * The version of this binding. If omitted, "latest" MUST be assumed. - */ - @Nullable - @Builder.Default - private String bindingVersion = "0.4.0"; + @Override + public String getBindingVersion() { + return "0.4.0"; + } + + @Override + public void setBindingVersion(@Nullable String bindingVersion) { + super.setBindingVersion("0.4.0"); + } } diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/server/KafkaServerBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/server/KafkaServerBinding.java index 1e9fd2d6..6fa12d1d 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/server/KafkaServerBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/server/KafkaServerBinding.java @@ -1,6 +1,5 @@ package com.asyncapi.bindings.kafka.v0._4_0.server; -import com.asyncapi.bindings.ServerBinding; import com.fasterxml.jackson.annotation.JsonClassDescription; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyDescription; @@ -20,7 +19,7 @@ @AllArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonClassDescription("Describes Kafka server binding.") -public class KafkaServerBinding extends ServerBinding { +public class KafkaServerBinding extends com.asyncapi.bindings.kafka.KafkaServerBinding { /** * API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used) @@ -40,13 +39,14 @@ public class KafkaServerBinding extends ServerBinding { @JsonPropertyDescription("The vendor of Schema Registry and Kafka serdes library that should be used (e.g. apicurio, confluent, ibm, or karapace)") private String schemaRegistryVendor; - /** - * The version of this binding. - */ - @Nullable - @Builder.Default - @JsonProperty("bindingVersion") - @JsonPropertyDescription("The version of this binding.") - private String bindingVersion = "0.4.0"; + @Override + public String getBindingVersion() { + return "0.4.0"; + } + + @Override + public void setBindingVersion(@Nullable String bindingVersion) { + super.setBindingVersion("0.4.0"); + } } diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/Kafka.java b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/Kafka.java new file mode 100644 index 00000000..afe6523a --- /dev/null +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/Kafka.java @@ -0,0 +1,11 @@ +package com.asyncapi.bindings.kafka; + +import org.junit.platform.suite.api.SelectPackages; +import org.junit.platform.suite.api.Suite; +import org.junit.platform.suite.api.SuiteDisplayName; + +@Suite +@SuiteDisplayName("Kafka") +@SelectPackages("com.asyncapi.bindings.kafka") +public class Kafka { +} diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaLatestTest.java b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaLatestTest.java new file mode 100644 index 00000000..f119e6d5 --- /dev/null +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaLatestTest.java @@ -0,0 +1,54 @@ +package com.asyncapi.bindings.kafka; + +import com.asyncapi.bindings.BindingTest; +import com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelBinding; +import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBinding; +import com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBinding; +import com.asyncapi.bindings.kafka.v0._4_0.server.KafkaServerBinding; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Nested; + +@DisplayName("latest") +public class KafkaLatestTest { + + @Nested + @DisplayName("channel") + class ChannelTest extends BindingTest {{ + super.binding = KafkaV0_4_0Test.channelBinding(); + super.bindingTypeClass = KafkaChannelBinding.class; + super.pathToBindingJson = "/bindings/kafka/latest/channel/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/latest/channel/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/latest/channel/binding - wrongly extended.json"; + }} + + @Nested + @DisplayName("message") + class Message extends BindingTest {{ + super.binding = KafkaV0_4_0Test.messageBinding(); + super.bindingTypeClass = KafkaMessageBinding.class; + super.pathToBindingJson = "/bindings/kafka/latest/message/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/latest/message/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/latest/message/binding - wrongly extended.json"; + }} + + @Nested + @DisplayName("operation") + class Operation extends BindingTest {{ + super.binding = KafkaV0_4_0Test.operationBinding(); + super.bindingTypeClass = KafkaOperationBinding.class; + super.pathToBindingJson = "/bindings/kafka/latest/operation/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/latest/operation/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/latest/operation/binding - wrongly extended.json"; + }} + + @Nested + @DisplayName("server") + class Server extends BindingTest {{ + super.binding = KafkaV0_4_0Test.serverBinding(); + super.bindingTypeClass = KafkaServerBinding.class; + super.pathToBindingJson = "/bindings/kafka/latest/server/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/latest/server/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/latest/server/binding - wrongly extended.json"; + }} + +} diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaUnknownVersionTest.java b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaUnknownVersionTest.java new file mode 100644 index 00000000..290af9e4 --- /dev/null +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaUnknownVersionTest.java @@ -0,0 +1,54 @@ +package com.asyncapi.bindings.kafka; + +import com.asyncapi.bindings.BindingTest; +import com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelBinding; +import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBinding; +import com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBinding; +import com.asyncapi.bindings.kafka.v0._4_0.server.KafkaServerBinding; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Nested; + +@DisplayName("unknown version") +public class KafkaUnknownVersionTest { + + @Nested + @DisplayName("channel") + class ChannelTest extends BindingTest {{ + super.binding = KafkaV0_4_0Test.channelBinding(); + super.bindingTypeClass = KafkaChannelBinding.class; + super.pathToBindingJson = "/bindings/kafka/unknown version/channel/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/unknown version/channel/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/unknown version/channel/binding - wrongly extended.json"; + }} + + @Nested + @DisplayName("message") + class Message extends BindingTest {{ + super.binding = KafkaV0_4_0Test.messageBinding(); + super.bindingTypeClass = KafkaMessageBinding.class; + super.pathToBindingJson = "/bindings/kafka/unknown version/message/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/unknown version/message/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/unknown version/message/binding - wrongly extended.json"; + }} + + @Nested + @DisplayName("operation") + class Operation extends BindingTest {{ + super.binding = KafkaV0_4_0Test.operationBinding(); + super.bindingTypeClass = KafkaOperationBinding.class; + super.pathToBindingJson = "/bindings/kafka/unknown version/operation/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/unknown version/operation/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/unknown version/operation/binding - wrongly extended.json"; + }} + + @Nested + @DisplayName("server") + class Server extends BindingTest {{ + super.binding = KafkaV0_4_0Test.serverBinding(); + super.bindingTypeClass = KafkaServerBinding.class; + super.pathToBindingJson = "/bindings/kafka/unknown version/server/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/unknown version/server/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/unknown version/server/binding - wrongly extended.json"; + }} + +} diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaV0_4_0Test.java b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaV0_4_0Test.java new file mode 100644 index 00000000..4c6aa382 --- /dev/null +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaV0_4_0Test.java @@ -0,0 +1,112 @@ +package com.asyncapi.bindings.kafka; + +import com.asyncapi.bindings.BindingTest; +import com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelBinding; +import com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelTopicCleanupPolicy; +import com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelTopicConfiguration; +import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBinding; +import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageSchemaIdLocation; +import com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBinding; +import com.asyncapi.bindings.kafka.v0._4_0.server.KafkaServerBinding; +import com.asyncapi.v3.schema.AsyncAPISchema; +import com.asyncapi.v3.schema.Type; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Nested; + +import java.util.List; + +@DisplayName("0.4.0") +public class KafkaV0_4_0Test { + + public static KafkaChannelBinding channelBinding () { + return KafkaChannelBinding.builder() + .topic("my-specific-topic-name") + .partitions(20) + .replicas(3) + .topicConfiguration(KafkaChannelTopicConfiguration.builder() + .cleanupPolicy(List.of( + KafkaChannelTopicCleanupPolicy.DELETE, + KafkaChannelTopicCleanupPolicy.COMPACT + )) + .retentionMs(604_800_000) + .retentionBytes(1_000_000_000) + .deleteRetentionMs(86_400_000) + .maxMessageBytes(1_048_588) + .build() + ) + .build(); + } + + public static KafkaMessageBinding messageBinding () { + return KafkaMessageBinding.builder() + .key(AsyncAPISchema.builder() + .type(Type.STRING) + .enumValue(List.of("myKey")) + .build()) + .schemaIdLocation(KafkaMessageSchemaIdLocation.PAYLOAD) + .schemaIdPayloadEncoding("apicurio-new") + .schemaLookupStrategy("TopicIdStrategy") + .build(); + } + + public static KafkaOperationBinding operationBinding () { + return KafkaOperationBinding.builder() + .groupId(AsyncAPISchema.builder() + .type(Type.STRING) + .enumValue(List.of("myGroupId")) + .build()) + .clientId(AsyncAPISchema.builder() + .type(Type.STRING) + .enumValue(List.of("myClientId")) + .build()) + .build(); + } + + public static KafkaServerBinding serverBinding () { + return KafkaServerBinding.builder() + .schemaRegistryUrl("https://my-schema-registry.com") + .schemaRegistryVendor("confluent") + .build(); + } + + @Nested + @DisplayName("channel") + class ChannelTest extends BindingTest {{ + super.binding = channelBinding(); + super.bindingTypeClass = KafkaChannelBinding.class; + super.pathToBindingJson = "/bindings/kafka/0.4.0/channel/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/0.4.0/channel/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/0.4.0/channel/binding - wrongly extended.json"; + }} + + @Nested + @DisplayName("message") + class Message extends BindingTest {{ + super.binding = messageBinding(); + super.bindingTypeClass = KafkaMessageBinding.class; + super.pathToBindingJson = "/bindings/kafka/0.4.0/message/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/0.4.0/message/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/0.4.0/message/binding - wrongly extended.json"; + }} + + @Nested + @DisplayName("operation") + class Operation extends BindingTest {{ + super.binding = operationBinding(); + super.bindingTypeClass = KafkaOperationBinding.class; + super.pathToBindingJson = "/bindings/kafka/0.4.0/operation/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/0.4.0/operation/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/0.4.0/operation/binding - wrongly extended.json"; + }} + + @Nested + @DisplayName("server") + class Server extends BindingTest {{ + super.binding = serverBinding(); + super.bindingTypeClass = KafkaServerBinding.class; + super.pathToBindingJson = "/bindings/kafka/0.4.0/server/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/0.4.0/server/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/0.4.0/server/binding - wrongly extended.json"; + }} + +} diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaWithoutVersionTest.java b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaWithoutVersionTest.java new file mode 100644 index 00000000..7ec6cd2f --- /dev/null +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaWithoutVersionTest.java @@ -0,0 +1,54 @@ +package com.asyncapi.bindings.kafka; + +import com.asyncapi.bindings.BindingTest; +import com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelBinding; +import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBinding; +import com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBinding; +import com.asyncapi.bindings.kafka.v0._4_0.server.KafkaServerBinding; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Nested; + +@DisplayName("without version") +public class KafkaWithoutVersionTest { + + @Nested + @DisplayName("channel") + class ChannelTest extends BindingTest {{ + super.binding = KafkaV0_4_0Test.channelBinding(); + super.bindingTypeClass = KafkaChannelBinding.class; + super.pathToBindingJson = "/bindings/kafka/without version/channel/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/without version/channel/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/without version/channel/binding - wrongly extended.json"; + }} + + @Nested + @DisplayName("message") + class Message extends BindingTest {{ + super.binding = KafkaV0_4_0Test.messageBinding(); + super.bindingTypeClass = KafkaMessageBinding.class; + super.pathToBindingJson = "/bindings/kafka/without version/message/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/without version/message/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/without version/message/binding - wrongly extended.json"; + }} + + @Nested + @DisplayName("operation") + class Operation extends BindingTest {{ + super.binding = KafkaV0_4_0Test.operationBinding(); + super.bindingTypeClass = KafkaOperationBinding.class; + super.pathToBindingJson = "/bindings/kafka/without version/operation/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/without version/operation/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/without version/operation/binding - wrongly extended.json"; + }} + + @Nested + @DisplayName("server") + class Server extends BindingTest {{ + super.binding = KafkaV0_4_0Test.serverBinding(); + super.bindingTypeClass = KafkaServerBinding.class; + super.pathToBindingJson = "/bindings/kafka/without version/server/binding.json"; + super.pathToExtendedBindingJson = "/bindings/kafka/without version/server/binding - extended.json"; + super.pathToWronglyExtendedBindingJson = "/bindings/kafka/without version/server/binding - wrongly extended.json"; + }} + +} diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/v0/_4_0/channel/KafkaChannelBindingTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/v0/_4_0/channel/KafkaChannelBindingTest.kt deleted file mode 100644 index cd3f1226..00000000 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/v0/_4_0/channel/KafkaChannelBindingTest.kt +++ /dev/null @@ -1,38 +0,0 @@ -package com.asyncapi.bindings.kafka.v0._4_0.channel - -import com.asyncapi.v3.SerDeTest - -/** - * @version 3.0.0 - * @author Pavel Bodiachevskii - */ -class KafkaChannelBindingTest: SerDeTest() { - - override fun objectClass() = KafkaChannelBinding::class.java - - override fun baseObjectJson() = "/bindings/kafka/channel/kafkaChannelBinding.json" - - override fun extendedObjectJson() = "/bindings/kafka/channel/kafkaChannelBinding - extended.json" - - override fun wronglyExtendedObjectJson() = "/bindings/kafka/channel/kafkaChannelBinding - wrongly extended.json" - - override fun build(): KafkaChannelBinding { - return KafkaChannelBinding.builder() - .topic("my-specific-topic-name") - .partitions(20) - .replicas(3) - .topicConfiguration(KafkaChannelTopicConfiguration.builder() - .cleanupPolicy(listOf( - KafkaChannelTopicCleanupPolicy.DELETE, - KafkaChannelTopicCleanupPolicy.COMPACT - )) - .retentionMs(604_800_000) - .retentionBytes(1_000_000_000) - .deleteRetentionMs(86_400_000) - .maxMessageBytes(1_048_588) - .build() - ) - .build() - } - -} \ No newline at end of file diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/v0/_4_0/message/KafkaMessageBindingTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/v0/_4_0/message/KafkaMessageBindingTest.kt deleted file mode 100644 index aa85b32f..00000000 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/v0/_4_0/message/KafkaMessageBindingTest.kt +++ /dev/null @@ -1,29 +0,0 @@ -package com.asyncapi.bindings.kafka.v0._4_0.message - -import com.asyncapi.v3.SerDeTest -import com.asyncapi.v3.schema.AsyncAPISchema -import com.asyncapi.v3.schema.Type - -class KafkaMessageBindingTest: SerDeTest() { - - override fun objectClass() = KafkaMessageBinding::class.java - - override fun baseObjectJson() = "/bindings/kafka/message/kafkaMessageBinding.json" - - override fun extendedObjectJson() = "/bindings/kafka/message/kafkaMessageBinding - extended.json" - - override fun wronglyExtendedObjectJson() = "/bindings/kafka/message/kafkaMessageBinding - wrongly extended.json" - - override fun build(): KafkaMessageBinding { - return KafkaMessageBinding.builder() - .key(AsyncAPISchema.builder() - .type(Type.STRING) - .enumValue(listOf("myKey")) - .build()) - .schemaIdLocation(KafkaMessageSchemaIdLocation.PAYLOAD) - .schemaIdPayloadEncoding("apicurio-new") - .schemaLookupStrategy("TopicIdStrategy") - .build() - } - -} \ No newline at end of file diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/v0/_4_0/operation/KafkaOperationBindingTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/v0/_4_0/operation/KafkaOperationBindingTest.kt deleted file mode 100644 index 9051f184..00000000 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/v0/_4_0/operation/KafkaOperationBindingTest.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.asyncapi.bindings.kafka.v0._4_0.operation - -import com.asyncapi.v3.SerDeTest -import com.asyncapi.v3.schema.AsyncAPISchema -import com.asyncapi.v3.schema.Type - -class KafkaOperationBindingTest: SerDeTest() { - - override fun objectClass() = KafkaOperationBinding::class.java - - override fun baseObjectJson() = "/bindings/kafka/operation/kafkaOperationBinding.json" - - override fun extendedObjectJson() = "/bindings/kafka/operation/kafkaOperationBinding - extended.json" - - override fun wronglyExtendedObjectJson() = "/bindings/kafka/operation/kafkaOperationBinding - wrongly extended.json" - - override fun build(): KafkaOperationBinding { - return KafkaOperationBinding.builder() - .groupId(AsyncAPISchema.builder() - .type(Type.STRING) - .enumValue(listOf("myGroupId")) - .build()) - .clientId(AsyncAPISchema.builder() - .type(Type.STRING) - .enumValue(listOf("myClientId")) - .build()) - .build() - } - -} \ No newline at end of file diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/v0/_4_0/server/KafkaServerBindingTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/v0/_4_0/server/KafkaServerBindingTest.kt deleted file mode 100644 index 1b14c86c..00000000 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/v0/_4_0/server/KafkaServerBindingTest.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.asyncapi.bindings.kafka.v0._4_0.server - -import com.asyncapi.v3.SerDeTest - -/** - * @version 3.0.0 - * @author Pavel Bodiachevskii - */ -class KafkaServerBindingTest: SerDeTest() { - - override fun objectClass() = KafkaServerBinding::class.java - - override fun baseObjectJson() = "/bindings/kafka/server/kafkaServerBinding.json" - - override fun extendedObjectJson() = "/bindings/kafka/server/kafkaServerBinding - extended.json" - - override fun wronglyExtendedObjectJson() = "/bindings/kafka/server/kafkaServerBinding - wrongly extended.json" - - override fun build(): KafkaServerBinding { - return KafkaServerBinding.builder() - .schemaRegistryUrl("https://my-schema-registry.com") - .schemaRegistryVendor("confluent") - .build() - } - -} \ No newline at end of file diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/ChannelItemTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/ChannelItemTest.kt index db1cdc0b..700932c6 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/ChannelItemTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/ChannelItemTest.kt @@ -12,7 +12,7 @@ import com.asyncapi.bindings.googlepubsub.GooglePubSubV0_1_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test import com.asyncapi.bindings.ibmmq.IBMMQV0_1_0Test import com.asyncapi.bindings.jms.v0._0_1.channel.JMSChannelBinding -import com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mercure.v0._1_0.channel.MercureChannelBinding import com.asyncapi.bindings.mqtt.v0._1_0.channel.MQTTChannelBinding import com.asyncapi.bindings.mqtt5.v0._2_0.channel.MQTT5ChannelBinding @@ -62,7 +62,7 @@ class ChannelItemTest: SerDeTest() { Pair("http", HTTPV0_3_0Test.channelBinding()), Pair("ibmmq", IBMMQV0_1_0Test.channelBinding()), Pair("jms", JMSChannelBinding()), - Pair("kafka", KafkaChannelBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.channelBinding()), Pair("mercure", MercureChannelBinding()), Pair("mqtt", MQTTChannelBinding()), Pair("mqtt5", MQTT5ChannelBinding()), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/message/MessageTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/message/MessageTest.kt index 34b9b699..f5dea5b7 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/message/MessageTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/message/MessageTest.kt @@ -13,7 +13,7 @@ import com.asyncapi.bindings.googlepubsub.GooglePubSubV0_1_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test import com.asyncapi.bindings.ibmmq.IBMMQV0_1_0Test import com.asyncapi.bindings.jms.v0._0_1.message.JMSMessageBinding -import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mercure.v0._1_0.message.MercureMessageBinding import com.asyncapi.bindings.mqtt.v0._1_0.message.MQTTMessageBindingTest import com.asyncapi.bindings.mqtt5.v0._2_0.message.MQTT5MessageBinding @@ -121,7 +121,7 @@ class MessageTest: SerDeTest() { Pair("http", HTTPV0_3_0Test.messageBinding()), Pair("ibmmq", IBMMQV0_1_0Test.messageBinding()), Pair("jms", JMSMessageBinding()), - Pair("kafka", KafkaMessageBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.messageBinding()), Pair("mercure", MercureMessageBinding()), Pair("mqtt", MQTTMessageBindingTest().build()), Pair("mqtt5", MQTT5MessageBinding()), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/message/MessageTraitTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/message/MessageTraitTest.kt index 81ae33c2..bbeae2ad 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/message/MessageTraitTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/message/MessageTraitTest.kt @@ -11,7 +11,7 @@ import com.asyncapi.bindings.googlepubsub.GooglePubSubV0_1_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test import com.asyncapi.bindings.ibmmq.IBMMQV0_1_0Test import com.asyncapi.bindings.jms.v0._0_1.message.JMSMessageBinding -import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mercure.v0._1_0.message.MercureMessageBinding import com.asyncapi.bindings.mqtt.v0._1_0.message.MQTTMessageBindingTest import com.asyncapi.bindings.mqtt5.v0._2_0.message.MQTT5MessageBinding @@ -80,7 +80,7 @@ class MessageTraitTest: SerDeTest() { Pair("http", HTTPV0_3_0Test.messageBinding()), Pair("ibmmq", IBMMQV0_1_0Test.messageBinding()), Pair("jms", JMSMessageBinding()), - Pair("kafka", KafkaMessageBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.messageBinding()), Pair("mercure", MercureMessageBinding()), Pair("mqtt", MQTTMessageBindingTest().build()), Pair("mqtt5", MQTT5MessageBinding()), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/operation/OperationTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/operation/OperationTest.kt index 61f65f50..05de3c5e 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/operation/OperationTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/operation/OperationTest.kt @@ -13,7 +13,7 @@ import com.asyncapi.bindings.googlepubsub.GooglePubSubV0_2_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test import com.asyncapi.bindings.ibmmq.v0._1_0.operation.IBMMQOperationBinding import com.asyncapi.bindings.jms.v0._0_1.operation.JMSOperationBinding -import com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mercure.v0._1_0.operation.MercureOperationBinding import com.asyncapi.bindings.mqtt.v0._1_0.operation.MQTTOperationBindingTest import com.asyncapi.bindings.mqtt5.v0._2_0.operation.MQTT5OperationBinding @@ -108,7 +108,7 @@ class OperationTest { Pair("http", HTTPV0_3_0Test.operationBinding()), Pair("ibmmq", IBMMQOperationBinding()), Pair("jms", JMSOperationBinding()), - Pair("kafka", KafkaOperationBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.operationBinding()), Pair("mercure", MercureOperationBinding()), Pair("mqtt", MQTTOperationBindingTest().build()), Pair("mqtt5", MQTT5OperationBinding()), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/operation/OperationTraitTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/operation/OperationTraitTest.kt index c43ef157..c4732a17 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/operation/OperationTraitTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_0_0/model/channel/operation/OperationTraitTest.kt @@ -10,7 +10,7 @@ import com.asyncapi.bindings.googlepubsub.GooglePubSubV0_2_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test import com.asyncapi.bindings.ibmmq.v0._1_0.operation.IBMMQOperationBinding import com.asyncapi.bindings.jms.v0._0_1.operation.JMSOperationBinding -import com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mercure.v0._1_0.operation.MercureOperationBinding import com.asyncapi.bindings.mqtt.v0._1_0.operation.MQTTOperationBindingTest import com.asyncapi.bindings.mqtt5.v0._2_0.operation.MQTT5OperationBinding @@ -57,7 +57,7 @@ class OperationTraitTest: SerDeTest() { Pair("http", HTTPV0_3_0Test.operationBinding()), Pair("ibmmq", IBMMQOperationBinding()), Pair("jms", JMSOperationBinding()), - Pair("kafka", KafkaOperationBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.operationBinding()), Pair("mercure", MercureOperationBinding()), Pair("mqtt", MQTTOperationBindingTest().build()), Pair("mqtt5", MQTT5OperationBinding()), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/ChannelItemTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/ChannelItemTest.kt index 164ca374..22655f59 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/ChannelItemTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/ChannelItemTest.kt @@ -9,7 +9,7 @@ import com.asyncapi.bindings.amqp.AMQPV0_2_0Test import com.asyncapi.bindings.anypointmq.AnypointMQV0_0_1Test import com.asyncapi.bindings.googlepubsub.GooglePubSubV0_1_0Test import com.asyncapi.bindings.ibmmq.IBMMQV0_1_0Test -import com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.pulsar.PulsarV0_1_0Test import com.asyncapi.bindings.websockets.v0._1_0.WebSocketsBindingProvider @@ -51,7 +51,7 @@ class ChannelItemTest: SerDeTest() { Pair("http", Reference("#/components/channelBindings/http")), Pair("ibmmq", IBMMQV0_1_0Test.channelBinding()), Pair("jms", Reference("#/components/channelBindings/jms")), - Pair("kafka", KafkaChannelBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.channelBinding()), Pair("mercure", Reference("#/components/channelBindings/mercure")), Pair("mqtt", Reference("#/components/channelBindings/mqtt")), Pair("mqtt5", Reference("#/components/channelBindings/mqtt5")), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/message/MessageTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/message/MessageTest.kt index 1c760029..0b751ac8 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/message/MessageTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/message/MessageTest.kt @@ -10,7 +10,7 @@ import com.asyncapi.bindings.anypointmq.AnypointMQV0_0_1Test import com.asyncapi.bindings.googlepubsub.GooglePubSubV0_1_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test import com.asyncapi.bindings.ibmmq.IBMMQV0_1_0Test -import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mqtt.v0._1_0.message.MQTTMessageBindingTest class MessageTest: SerDeTest() { @@ -95,7 +95,7 @@ class MessageTest: SerDeTest() { Pair("http", HTTPV0_3_0Test.messageBinding()), Pair("ibmmq", IBMMQV0_1_0Test.messageBinding()), Pair("jms", Reference("#/components/messageBindings/jms")), - Pair("kafka", KafkaMessageBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.messageBinding()), Pair("mercure", Reference("#/components/messageBindings/mercure")), Pair("mqtt", MQTTMessageBindingTest().build()), Pair("mqtt5", Reference("#/components/messageBindings/mqtt5")), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/message/MessageTraitTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/message/MessageTraitTest.kt index f74b63a6..150b956d 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/message/MessageTraitTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/message/MessageTraitTest.kt @@ -10,7 +10,7 @@ import com.asyncapi.bindings.anypointmq.AnypointMQV0_0_1Test import com.asyncapi.bindings.googlepubsub.GooglePubSubV0_1_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test import com.asyncapi.bindings.ibmmq.IBMMQV0_1_0Test -import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mqtt.v0._1_0.message.MQTTMessageBindingTest class MessageTraitTest: SerDeTest() { @@ -67,7 +67,7 @@ class MessageTraitTest: SerDeTest() { Pair("http", HTTPV0_3_0Test.messageBinding()), Pair("ibmmq", IBMMQV0_1_0Test.messageBinding()), Pair("jms", Reference("#/components/messageBindings/jms")), - Pair("kafka", KafkaMessageBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.messageBinding()), Pair("mercure", Reference("#/components/messageBindings/mercure")), Pair("mqtt", MQTTMessageBindingTest().build()), Pair("mqtt5", Reference("#/components/messageBindings/mqtt5")), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/operation/OperationTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/operation/OperationTest.kt index eefe4250..845e85fe 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/operation/OperationTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/operation/OperationTest.kt @@ -8,7 +8,7 @@ import com.asyncapi.v2._6_0.model.channel.message.MessageTest import com.asyncapi.v2._6_0.model.channel.message.OneOfMessages import com.asyncapi.bindings.amqp.AMQPV0_2_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test -import com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mqtt.v0._1_0.operation.MQTTOperationBindingTest import com.asyncapi.bindings.nats.NATSV0_1_0Test import com.asyncapi.bindings.solace.v0._3_0.operation.SolaceOperationBindingTest @@ -143,7 +143,7 @@ class OperationTest { Pair("http", HTTPV0_3_0Test.operationBinding()), Pair("ibmmq", Reference("#/components/operationBindings/ibmmq")), Pair("jms", Reference("#/components/operationBindings/jms")), - Pair("kafka", KafkaOperationBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.operationBinding()), Pair("mercure", Reference("#/components/operationBindings/mercure")), Pair("mqtt", MQTTOperationBindingTest().build()), Pair("mqtt5", Reference("#/components/operationBindings/mqtt5")), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/operation/OperationTraitTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/operation/OperationTraitTest.kt index 967ed502..97a0a266 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/operation/OperationTraitTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v2/_6_0/model/channel/operation/OperationTraitTest.kt @@ -6,7 +6,7 @@ import com.asyncapi.v2._6_0.model.ExternalDocumentation import com.asyncapi.v2._6_0.model.Tag import com.asyncapi.bindings.amqp.AMQPV0_2_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test -import com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mqtt.v0._1_0.operation.MQTTOperationBindingTest import com.asyncapi.bindings.nats.NATSV0_1_0Test import com.asyncapi.bindings.solace.v0._3_0.operation.SolaceOperationBindingTest @@ -47,7 +47,7 @@ class OperationTraitTest: SerDeTest() { Pair("http", HTTPV0_3_0Test.operationBinding()), Pair("ibmmq", Reference("#/components/operationBindings/ibmmq")), Pair("jms", Reference("#/components/operationBindings/jms")), - Pair("kafka", KafkaOperationBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.operationBinding()), Pair("mercure", Reference("#/components/operationBindings/mercure")), Pair("mqtt", MQTTOperationBindingTest().build()), Pair("mqtt5", Reference("#/components/operationBindings/mqtt5")), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/channel/ChannelTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/channel/ChannelTest.kt index a93059e3..85804602 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/channel/ChannelTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/channel/ChannelTest.kt @@ -12,7 +12,7 @@ import com.asyncapi.bindings.amqp.AMQPV0_2_0Test import com.asyncapi.bindings.anypointmq.AnypointMQV0_0_1Test import com.asyncapi.bindings.googlepubsub.GooglePubSubV0_1_0Test import com.asyncapi.bindings.ibmmq.IBMMQV0_1_0Test -import com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.pulsar.PulsarV0_1_0Test import com.asyncapi.bindings.websockets.v0._1_0.WebSocketsBindingProvider @@ -71,7 +71,7 @@ class ChannelTest: SerDeTest() { Pair("http", Reference("#/components/channelBindings/http")), Pair("ibmmq", IBMMQV0_1_0Test.channelBinding()), Pair("jms", Reference("#/components/channelBindings/jms")), - Pair("kafka", KafkaChannelBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.channelBinding()), Pair("mercure", Reference("#/components/channelBindings/mercure")), Pair("mqtt", Reference("#/components/channelBindings/mqtt")), Pair("mqtt5", Reference("#/components/channelBindings/mqtt5")), @@ -144,7 +144,7 @@ class ChannelTestWithReference: SerDeTest() { Pair("http", Reference("#/components/channelBindings/http")), Pair("ibmmq", IBMMQV0_1_0Test.channelBinding()), Pair("jms", Reference("#/components/channelBindings/jms")), - Pair("kafka", KafkaChannelBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.channelBinding()), Pair("mercure", Reference("#/components/channelBindings/mercure")), Pair("mqtt", Reference("#/components/channelBindings/mqtt")), Pair("mqtt5", Reference("#/components/channelBindings/mqtt5")), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/channel/message/MessageTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/channel/message/MessageTest.kt index d6aa3717..aecefccb 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/channel/message/MessageTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/channel/message/MessageTest.kt @@ -9,7 +9,7 @@ import com.asyncapi.bindings.anypointmq.AnypointMQV0_0_1Test import com.asyncapi.bindings.googlepubsub.GooglePubSubV0_1_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test import com.asyncapi.bindings.ibmmq.IBMMQV0_1_0Test -import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mqtt.v0._1_0.message.MQTTMessageBindingTest import com.asyncapi.v3.schema.AsyncAPISchema import com.asyncapi.v3.schema.multiformat.AsyncAPIFormatSchema @@ -91,7 +91,7 @@ class MessageTestWithSchema: SerDeTest() { Pair("http", HTTPV0_3_0Test.messageBinding()), Pair("ibmmq", IBMMQV0_1_0Test.messageBinding()), Pair("jms", Reference("#/components/messageBindings/jms")), - Pair("kafka", KafkaMessageBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.messageBinding()), Pair("mercure", Reference("#/components/messageBindings/mercure")), Pair("mqtt", MQTTMessageBindingTest().build()), Pair("mqtt5", Reference("#/components/messageBindings/mqtt5")), @@ -144,7 +144,7 @@ class MessageTestWithReference: SerDeTest() { Pair("http", HTTPV0_3_0Test.messageBinding()), Pair("ibmmq", IBMMQV0_1_0Test.messageBinding()), Pair("jms", Reference("#/components/messageBindings/jms")), - Pair("kafka", KafkaMessageBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.messageBinding()), Pair("mercure", Reference("#/components/messageBindings/mercure") ), @@ -234,7 +234,7 @@ class MessageTestWithMultiFormatSchema: SerDeTest() { Pair("http", HTTPV0_3_0Test.messageBinding()), Pair("ibmmq", IBMMQV0_1_0Test.messageBinding()), Pair("jms", Reference("#/components/messageBindings/jms")), - Pair("kafka", KafkaMessageBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.messageBinding()), Pair("mercure", Reference("#/components/messageBindings/mercure") ), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/channel/message/MessageTraitTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/channel/message/MessageTraitTest.kt index b8238d03..f001e328 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/channel/message/MessageTraitTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/channel/message/MessageTraitTest.kt @@ -10,7 +10,7 @@ import com.asyncapi.bindings.anypointmq.AnypointMQV0_0_1Test import com.asyncapi.bindings.googlepubsub.GooglePubSubV0_1_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test import com.asyncapi.bindings.ibmmq.IBMMQV0_1_0Test -import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mqtt.v0._1_0.message.MQTTMessageBindingTest import com.asyncapi.v3.schema.multiformat.AsyncAPIFormatSchema @@ -66,7 +66,7 @@ class MessageTraitTestWithSchema: SerDeTest() { Pair("http", HTTPV0_3_0Test.messageBinding()), Pair("ibmmq", IBMMQV0_1_0Test.messageBinding()), Pair("jms", Reference("#/components/messageBindings/jms")), - Pair("kafka", KafkaMessageBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.messageBinding()), Pair("mercure", Reference("#/components/messageBindings/mercure") ), @@ -121,7 +121,7 @@ class MessageTraitTestWithReference: SerDeTest() { Pair("http", HTTPV0_3_0Test.messageBinding()), Pair("ibmmq", IBMMQV0_1_0Test.messageBinding()), Pair("jms", Reference("#/components/messageBindings/jms")), - Pair("kafka", KafkaMessageBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.messageBinding()), Pair("mercure", Reference("#/components/messageBindings/mercure") ), @@ -193,7 +193,7 @@ class MessageTraitTestWithMultiFormatSchema: SerDeTest() { Pair("http", HTTPV0_3_0Test.messageBinding()), Pair("ibmmq", IBMMQV0_1_0Test.messageBinding()), Pair("jms", Reference("#/components/messageBindings/jms")), - Pair("kafka", KafkaMessageBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.messageBinding()), Pair("mercure", Reference("#/components/messageBindings/mercure") ), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/operation/OperationTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/operation/OperationTest.kt index 7d72786a..649b12eb 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/operation/OperationTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/operation/OperationTest.kt @@ -2,7 +2,7 @@ package com.asyncapi.v3._0_0.model.operation import com.asyncapi.bindings.amqp.AMQPV0_2_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test -import com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mqtt.v0._1_0.operation.MQTTOperationBindingTest import com.asyncapi.bindings.nats.NATSV0_1_0Test import com.asyncapi.bindings.solace.v0._3_0.operation.SolaceOperationBindingTest @@ -74,7 +74,7 @@ class OperationTest: SerDeTest() { Pair("http", HTTPV0_3_0Test.operationBinding()), Pair("ibmmq", Reference("#/components/operationBindings/ibmmq")), Pair("jms", Reference("#/components/operationBindings/jms")), - Pair("kafka", KafkaOperationBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.operationBinding()), Pair("mercure", Reference("#/components/operationBindings/mercure")), Pair("mqtt", MQTTOperationBindingTest().build()), Pair("mqtt5", Reference("#/components/operationBindings/mqtt5")), @@ -132,7 +132,7 @@ class OperationTestWithReference: SerDeTest() { Pair("http", HTTPV0_3_0Test.operationBinding()), Pair("ibmmq", Reference("#/components/operationBindings/ibmmq")), Pair("jms", Reference("#/components/operationBindings/jms")), - Pair("kafka", KafkaOperationBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.operationBinding()), Pair("mercure", Reference("#/components/operationBindings/mercure") ), diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/operation/OperationTraitTest.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/operation/OperationTraitTest.kt index e91737c7..7fd79ecd 100644 --- a/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/operation/OperationTraitTest.kt +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/v3/_0_0/model/operation/OperationTraitTest.kt @@ -2,7 +2,7 @@ package com.asyncapi.v3._0_0.model.operation import com.asyncapi.bindings.amqp.AMQPV0_2_0Test import com.asyncapi.bindings.http.HTTPV0_3_0Test -import com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBindingTest +import com.asyncapi.bindings.kafka.KafkaV0_4_0Test import com.asyncapi.bindings.mqtt.v0._1_0.operation.MQTTOperationBindingTest import com.asyncapi.bindings.nats.NATSV0_1_0Test import com.asyncapi.bindings.solace.v0._3_0.operation.SolaceOperationBindingTest @@ -54,7 +54,7 @@ class OperationTraitTest: SerDeTest() { Pair("http", HTTPV0_3_0Test.operationBinding()), Pair("ibmmq", Reference("#/components/operationBindings/ibmmq")), Pair("jms", Reference("#/components/operationBindings/jms")), - Pair("kafka", KafkaOperationBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.operationBinding()), Pair("mercure", Reference("#/components/operationBindings/mercure") ), @@ -114,7 +114,7 @@ class OperationTraitTestWithReference: SerDeTest() { Pair("http", HTTPV0_3_0Test.operationBinding()), Pair("ibmmq", Reference("#/components/operationBindings/ibmmq")), Pair("jms", Reference("#/components/operationBindings/jms")), - Pair("kafka", KafkaOperationBindingTest().build()), + Pair("kafka", KafkaV0_4_0Test.operationBinding()), Pair("mercure", Reference("#/components/operationBindings/mercure") ), diff --git a/asyncapi-core/src/test/resources/bindings/kafka/channel/kafkaChannelBinding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/0.4.0/channel/binding - extended.json similarity index 100% rename from asyncapi-core/src/test/resources/bindings/kafka/channel/kafkaChannelBinding - extended.json rename to asyncapi-core/src/test/resources/bindings/kafka/0.4.0/channel/binding - extended.json diff --git a/asyncapi-core/src/test/resources/bindings/kafka/channel/kafkaChannelBinding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/0.4.0/channel/binding - wrongly extended.json similarity index 100% rename from asyncapi-core/src/test/resources/bindings/kafka/channel/kafkaChannelBinding - wrongly extended.json rename to asyncapi-core/src/test/resources/bindings/kafka/0.4.0/channel/binding - wrongly extended.json diff --git a/asyncapi-core/src/test/resources/bindings/kafka/channel/kafkaChannelBinding.json b/asyncapi-core/src/test/resources/bindings/kafka/0.4.0/channel/binding.json similarity index 100% rename from asyncapi-core/src/test/resources/bindings/kafka/channel/kafkaChannelBinding.json rename to asyncapi-core/src/test/resources/bindings/kafka/0.4.0/channel/binding.json diff --git a/asyncapi-core/src/test/resources/bindings/kafka/message/kafkaMessageBinding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/0.4.0/message/binding - extended.json similarity index 100% rename from asyncapi-core/src/test/resources/bindings/kafka/message/kafkaMessageBinding - extended.json rename to asyncapi-core/src/test/resources/bindings/kafka/0.4.0/message/binding - extended.json diff --git a/asyncapi-core/src/test/resources/bindings/kafka/message/kafkaMessageBinding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/0.4.0/message/binding - wrongly extended.json similarity index 100% rename from asyncapi-core/src/test/resources/bindings/kafka/message/kafkaMessageBinding - wrongly extended.json rename to asyncapi-core/src/test/resources/bindings/kafka/0.4.0/message/binding - wrongly extended.json diff --git a/asyncapi-core/src/test/resources/bindings/kafka/message/kafkaMessageBinding.json b/asyncapi-core/src/test/resources/bindings/kafka/0.4.0/message/binding.json similarity index 100% rename from asyncapi-core/src/test/resources/bindings/kafka/message/kafkaMessageBinding.json rename to asyncapi-core/src/test/resources/bindings/kafka/0.4.0/message/binding.json diff --git a/asyncapi-core/src/test/resources/bindings/kafka/operation/kafkaOperationBinding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/0.4.0/operation/binding - extended.json similarity index 100% rename from asyncapi-core/src/test/resources/bindings/kafka/operation/kafkaOperationBinding - extended.json rename to asyncapi-core/src/test/resources/bindings/kafka/0.4.0/operation/binding - extended.json diff --git a/asyncapi-core/src/test/resources/bindings/kafka/operation/kafkaOperationBinding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/0.4.0/operation/binding - wrongly extended.json similarity index 100% rename from asyncapi-core/src/test/resources/bindings/kafka/operation/kafkaOperationBinding - wrongly extended.json rename to asyncapi-core/src/test/resources/bindings/kafka/0.4.0/operation/binding - wrongly extended.json diff --git a/asyncapi-core/src/test/resources/bindings/kafka/operation/kafkaOperationBinding.json b/asyncapi-core/src/test/resources/bindings/kafka/0.4.0/operation/binding.json similarity index 100% rename from asyncapi-core/src/test/resources/bindings/kafka/operation/kafkaOperationBinding.json rename to asyncapi-core/src/test/resources/bindings/kafka/0.4.0/operation/binding.json diff --git a/asyncapi-core/src/test/resources/bindings/kafka/server/kafkaServerBinding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/0.4.0/server/binding - extended.json similarity index 100% rename from asyncapi-core/src/test/resources/bindings/kafka/server/kafkaServerBinding - extended.json rename to asyncapi-core/src/test/resources/bindings/kafka/0.4.0/server/binding - extended.json diff --git a/asyncapi-core/src/test/resources/bindings/kafka/server/kafkaServerBinding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/0.4.0/server/binding - wrongly extended.json similarity index 100% rename from asyncapi-core/src/test/resources/bindings/kafka/server/kafkaServerBinding - wrongly extended.json rename to asyncapi-core/src/test/resources/bindings/kafka/0.4.0/server/binding - wrongly extended.json diff --git a/asyncapi-core/src/test/resources/bindings/kafka/server/kafkaServerBinding.json b/asyncapi-core/src/test/resources/bindings/kafka/0.4.0/server/binding.json similarity index 100% rename from asyncapi-core/src/test/resources/bindings/kafka/server/kafkaServerBinding.json rename to asyncapi-core/src/test/resources/bindings/kafka/0.4.0/server/binding.json diff --git a/asyncapi-core/src/test/resources/bindings/kafka/latest/channel/binding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/latest/channel/binding - extended.json new file mode 100644 index 00000000..1b79a719 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/latest/channel/binding - extended.json @@ -0,0 +1,18 @@ +{ + "bindingVersion" : "0.4.0", + "topic" : "my-specific-topic-name", + "partitions" : 20, + "replicas" : 3, + "topicConfiguration" : { + "cleanup.policy" : [ "delete", "compact" ], + "retention.ms" : 604800000, + "retention.bytes" : 1000000000, + "delete.retention.ms" : 86400000, + "max.message.bytes" : 1048588 + }, + "x-number" : 0, + "x-string" : "", + "x-object" : { + "property" : { } + } +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/latest/channel/binding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/latest/channel/binding - wrongly extended.json new file mode 100644 index 00000000..060b9e51 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/latest/channel/binding - wrongly extended.json @@ -0,0 +1,22 @@ +{ + "topic": "my-specific-topic-name", + "partitions": 20, + "replicas": 3, + "topicConfiguration": { + "cleanup.policy": [ + "delete", + "compact" + ], + "retention.ms": 604800000, + "retention.bytes": 1000000000, + "delete.retention.ms": 86400000, + "max.message.bytes": 1048588 + }, + "bindingVersion": "latest", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/latest/channel/binding.json b/asyncapi-core/src/test/resources/bindings/kafka/latest/channel/binding.json new file mode 100644 index 00000000..5a58fbc3 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/latest/channel/binding.json @@ -0,0 +1,16 @@ +{ + "topic": "my-specific-topic-name", + "partitions": 20, + "replicas": 3, + "topicConfiguration": { + "cleanup.policy": [ + "delete", + "compact" + ], + "retention.ms": 604800000, + "retention.bytes": 1000000000, + "delete.retention.ms": 86400000, + "max.message.bytes": 1048588 + }, + "bindingVersion": "latest" +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/latest/message/binding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/latest/message/binding - extended.json new file mode 100644 index 00000000..3325c99e --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/latest/message/binding - extended.json @@ -0,0 +1,15 @@ +{ + "bindingVersion" : "0.4.0", + "key" : { + "type" : "string", + "enum" : [ "myKey" ] + }, + "schemaIdLocation" : "payload", + "schemaIdPayloadEncoding" : "apicurio-new", + "schemaLookupStrategy" : "TopicIdStrategy", + "x-number" : 0, + "x-string" : "", + "x-object" : { + "property" : { } + } +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/latest/message/binding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/latest/message/binding - wrongly extended.json new file mode 100644 index 00000000..4093226c --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/latest/message/binding - wrongly extended.json @@ -0,0 +1,18 @@ +{ + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "latest", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/latest/message/binding.json b/asyncapi-core/src/test/resources/bindings/kafka/latest/message/binding.json new file mode 100644 index 00000000..1d6d2913 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/latest/message/binding.json @@ -0,0 +1,12 @@ +{ + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "latest" +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/latest/operation/binding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/latest/operation/binding - extended.json new file mode 100644 index 00000000..c86580a4 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/latest/operation/binding - extended.json @@ -0,0 +1,16 @@ +{ + "bindingVersion" : "0.4.0", + "groupId" : { + "type" : "string", + "enum" : [ "myGroupId" ] + }, + "clientId" : { + "type" : "string", + "enum" : [ "myClientId" ] + }, + "x-number" : 0, + "x-string" : "", + "x-object" : { + "property" : { } + } +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/latest/operation/binding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/latest/operation/binding - wrongly extended.json new file mode 100644 index 00000000..b7797ae6 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/latest/operation/binding - wrongly extended.json @@ -0,0 +1,21 @@ +{ + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "latest", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/latest/operation/binding.json b/asyncapi-core/src/test/resources/bindings/kafka/latest/operation/binding.json new file mode 100644 index 00000000..72f176d7 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/latest/operation/binding.json @@ -0,0 +1,15 @@ +{ + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "latest" +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/latest/server/binding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/latest/server/binding - extended.json new file mode 100644 index 00000000..a0eb3c82 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/latest/server/binding - extended.json @@ -0,0 +1,10 @@ +{ + "bindingVersion" : "0.4.0", + "schemaRegistryUrl" : "https://my-schema-registry.com", + "schemaRegistryVendor" : "confluent", + "x-number" : 0, + "x-string" : "", + "x-object" : { + "property" : { } + } +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/latest/server/binding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/latest/server/binding - wrongly extended.json new file mode 100644 index 00000000..17f694cc --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/latest/server/binding - wrongly extended.json @@ -0,0 +1,11 @@ +{ + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "latest", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/latest/server/binding.json b/asyncapi-core/src/test/resources/bindings/kafka/latest/server/binding.json new file mode 100644 index 00000000..6bb539a3 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/latest/server/binding.json @@ -0,0 +1,5 @@ +{ + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "latest" +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/unknown version/channel/binding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/channel/binding - extended.json new file mode 100644 index 00000000..1b79a719 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/channel/binding - extended.json @@ -0,0 +1,18 @@ +{ + "bindingVersion" : "0.4.0", + "topic" : "my-specific-topic-name", + "partitions" : 20, + "replicas" : 3, + "topicConfiguration" : { + "cleanup.policy" : [ "delete", "compact" ], + "retention.ms" : 604800000, + "retention.bytes" : 1000000000, + "delete.retention.ms" : 86400000, + "max.message.bytes" : 1048588 + }, + "x-number" : 0, + "x-string" : "", + "x-object" : { + "property" : { } + } +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/unknown version/channel/binding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/channel/binding - wrongly extended.json new file mode 100644 index 00000000..de2b2142 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/channel/binding - wrongly extended.json @@ -0,0 +1,22 @@ +{ + "topic": "my-specific-topic-name", + "partitions": 20, + "replicas": 3, + "topicConfiguration": { + "cleanup.policy": [ + "delete", + "compact" + ], + "retention.ms": 604800000, + "retention.bytes": 1000000000, + "delete.retention.ms": 86400000, + "max.message.bytes": 1048588 + }, + "bindingVersion": "unknown version", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/unknown version/channel/binding.json b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/channel/binding.json new file mode 100644 index 00000000..61bb7103 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/channel/binding.json @@ -0,0 +1,16 @@ +{ + "topic": "my-specific-topic-name", + "partitions": 20, + "replicas": 3, + "topicConfiguration": { + "cleanup.policy": [ + "delete", + "compact" + ], + "retention.ms": 604800000, + "retention.bytes": 1000000000, + "delete.retention.ms": 86400000, + "max.message.bytes": 1048588 + }, + "bindingVersion": "unknown version" +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/unknown version/message/binding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/message/binding - extended.json new file mode 100644 index 00000000..3325c99e --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/message/binding - extended.json @@ -0,0 +1,15 @@ +{ + "bindingVersion" : "0.4.0", + "key" : { + "type" : "string", + "enum" : [ "myKey" ] + }, + "schemaIdLocation" : "payload", + "schemaIdPayloadEncoding" : "apicurio-new", + "schemaLookupStrategy" : "TopicIdStrategy", + "x-number" : 0, + "x-string" : "", + "x-object" : { + "property" : { } + } +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/unknown version/message/binding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/message/binding - wrongly extended.json new file mode 100644 index 00000000..ef27d281 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/message/binding - wrongly extended.json @@ -0,0 +1,18 @@ +{ + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "unknown version", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/unknown version/message/binding.json b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/message/binding.json new file mode 100644 index 00000000..c2b78b4e --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/message/binding.json @@ -0,0 +1,12 @@ +{ + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "unknown version" +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/unknown version/operation/binding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/operation/binding - extended.json new file mode 100644 index 00000000..c86580a4 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/operation/binding - extended.json @@ -0,0 +1,16 @@ +{ + "bindingVersion" : "0.4.0", + "groupId" : { + "type" : "string", + "enum" : [ "myGroupId" ] + }, + "clientId" : { + "type" : "string", + "enum" : [ "myClientId" ] + }, + "x-number" : 0, + "x-string" : "", + "x-object" : { + "property" : { } + } +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/unknown version/operation/binding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/operation/binding - wrongly extended.json new file mode 100644 index 00000000..bf426992 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/operation/binding - wrongly extended.json @@ -0,0 +1,21 @@ +{ + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "unknown version", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/unknown version/operation/binding.json b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/operation/binding.json new file mode 100644 index 00000000..91ba6c98 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/operation/binding.json @@ -0,0 +1,15 @@ +{ + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "unknown version" +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/unknown version/server/binding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/server/binding - extended.json new file mode 100644 index 00000000..a0eb3c82 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/server/binding - extended.json @@ -0,0 +1,10 @@ +{ + "bindingVersion" : "0.4.0", + "schemaRegistryUrl" : "https://my-schema-registry.com", + "schemaRegistryVendor" : "confluent", + "x-number" : 0, + "x-string" : "", + "x-object" : { + "property" : { } + } +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/unknown version/server/binding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/server/binding - wrongly extended.json new file mode 100644 index 00000000..7ded284f --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/server/binding - wrongly extended.json @@ -0,0 +1,11 @@ +{ + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "unknown version", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/unknown version/server/binding.json b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/server/binding.json new file mode 100644 index 00000000..a932b24f --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/unknown version/server/binding.json @@ -0,0 +1,5 @@ +{ + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "unknown version" +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/without version/channel/binding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/without version/channel/binding - extended.json new file mode 100644 index 00000000..1b79a719 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/without version/channel/binding - extended.json @@ -0,0 +1,18 @@ +{ + "bindingVersion" : "0.4.0", + "topic" : "my-specific-topic-name", + "partitions" : 20, + "replicas" : 3, + "topicConfiguration" : { + "cleanup.policy" : [ "delete", "compact" ], + "retention.ms" : 604800000, + "retention.bytes" : 1000000000, + "delete.retention.ms" : 86400000, + "max.message.bytes" : 1048588 + }, + "x-number" : 0, + "x-string" : "", + "x-object" : { + "property" : { } + } +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/without version/channel/binding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/without version/channel/binding - wrongly extended.json new file mode 100644 index 00000000..3a85e13d --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/without version/channel/binding - wrongly extended.json @@ -0,0 +1,22 @@ +{ + "topic": "my-specific-topic-name", + "partitions": 20, + "replicas": 3, + "topicConfiguration": { + "cleanup.policy": [ + "delete", + "compact" + ], + "retention.ms": 604800000, + "retention.bytes": 1000000000, + "delete.retention.ms": 86400000, + "max.message.bytes": 1048588 + }, + "bindingVersion": "without version", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/without version/channel/binding.json b/asyncapi-core/src/test/resources/bindings/kafka/without version/channel/binding.json new file mode 100644 index 00000000..0e34633c --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/without version/channel/binding.json @@ -0,0 +1,16 @@ +{ + "topic": "my-specific-topic-name", + "partitions": 20, + "replicas": 3, + "topicConfiguration": { + "cleanup.policy": [ + "delete", + "compact" + ], + "retention.ms": 604800000, + "retention.bytes": 1000000000, + "delete.retention.ms": 86400000, + "max.message.bytes": 1048588 + }, + "bindingVersion": "without version" +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/without version/message/binding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/without version/message/binding - extended.json new file mode 100644 index 00000000..3325c99e --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/without version/message/binding - extended.json @@ -0,0 +1,15 @@ +{ + "bindingVersion" : "0.4.0", + "key" : { + "type" : "string", + "enum" : [ "myKey" ] + }, + "schemaIdLocation" : "payload", + "schemaIdPayloadEncoding" : "apicurio-new", + "schemaLookupStrategy" : "TopicIdStrategy", + "x-number" : 0, + "x-string" : "", + "x-object" : { + "property" : { } + } +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/without version/message/binding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/without version/message/binding - wrongly extended.json new file mode 100644 index 00000000..9ca25de8 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/without version/message/binding - wrongly extended.json @@ -0,0 +1,18 @@ +{ + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "without version", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/without version/message/binding.json b/asyncapi-core/src/test/resources/bindings/kafka/without version/message/binding.json new file mode 100644 index 00000000..64eef8fa --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/without version/message/binding.json @@ -0,0 +1,12 @@ +{ + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "without version" +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/without version/operation/binding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/without version/operation/binding - extended.json new file mode 100644 index 00000000..c86580a4 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/without version/operation/binding - extended.json @@ -0,0 +1,16 @@ +{ + "bindingVersion" : "0.4.0", + "groupId" : { + "type" : "string", + "enum" : [ "myGroupId" ] + }, + "clientId" : { + "type" : "string", + "enum" : [ "myClientId" ] + }, + "x-number" : 0, + "x-string" : "", + "x-object" : { + "property" : { } + } +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/without version/operation/binding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/without version/operation/binding - wrongly extended.json new file mode 100644 index 00000000..0f039bd9 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/without version/operation/binding - wrongly extended.json @@ -0,0 +1,21 @@ +{ + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "without version", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/without version/operation/binding.json b/asyncapi-core/src/test/resources/bindings/kafka/without version/operation/binding.json new file mode 100644 index 00000000..e11e2a46 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/without version/operation/binding.json @@ -0,0 +1,15 @@ +{ + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "without version" +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/without version/server/binding - extended.json b/asyncapi-core/src/test/resources/bindings/kafka/without version/server/binding - extended.json new file mode 100644 index 00000000..a0eb3c82 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/without version/server/binding - extended.json @@ -0,0 +1,10 @@ +{ + "bindingVersion" : "0.4.0", + "schemaRegistryUrl" : "https://my-schema-registry.com", + "schemaRegistryVendor" : "confluent", + "x-number" : 0, + "x-string" : "", + "x-object" : { + "property" : { } + } +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/without version/server/binding - wrongly extended.json b/asyncapi-core/src/test/resources/bindings/kafka/without version/server/binding - wrongly extended.json new file mode 100644 index 00000000..cddc4644 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/without version/server/binding - wrongly extended.json @@ -0,0 +1,11 @@ +{ + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "without version", + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 +} \ No newline at end of file diff --git a/asyncapi-core/src/test/resources/bindings/kafka/without version/server/binding.json b/asyncapi-core/src/test/resources/bindings/kafka/without version/server/binding.json new file mode 100644 index 00000000..7de76a74 --- /dev/null +++ b/asyncapi-core/src/test/resources/bindings/kafka/without version/server/binding.json @@ -0,0 +1,5 @@ +{ + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "without version" +} \ No newline at end of file