-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
84 changed files
with
1,023 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaChannelBinding.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <a href="https://github.com/asyncapi/bindings/tree/master/kafka#channel-binding-object">Kafka channel binding</a> | ||
* @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 {} |
31 changes: 31 additions & 0 deletions
31
asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaMessageBinding.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
* <p> | ||
* Contains information about the message representation in Kafka. | ||
* | ||
* @version 0.1.0 | ||
* @see <a href="https://github.com/asyncapi/bindings/tree/master/kafka#message-binding-object">Kafka message binding</a> | ||
* @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 {} |
31 changes: 31 additions & 0 deletions
31
asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaOperationBinding.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
* <p> | ||
* Contains information about the operation representation in Kafka. | ||
* | ||
* @version 0.1.0 | ||
* @see <a href="https://github.com/asyncapi/bindings/tree/master/kafka#operation-binding-object">Kafka operation binding</a> | ||
* @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 {} |
29 changes: 29 additions & 0 deletions
29
asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/KafkaServerBinding.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <a href="https://github.com/asyncapi/bindings/tree/master/kafka#server-binding-object">Kafka server binding</a> | ||
* @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 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/Kafka.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 { | ||
} |
54 changes: 54 additions & 0 deletions
54
asyncapi-core/src/test/kotlin/com/asyncapi/bindings/kafka/KafkaLatestTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<KafkaChannelBinding> {{ | ||
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<KafkaMessageBinding> {{ | ||
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<KafkaOperationBinding> {{ | ||
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<KafkaServerBinding> {{ | ||
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"; | ||
}} | ||
|
||
} |
Oops, something went wrong.