Skip to content

Commit

Permalink
tests(bindings): HTTP 0.1.0, 0.2.0, 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Pakisan committed Apr 27, 2024
1 parent e2ddf5f commit e99fd01
Show file tree
Hide file tree
Showing 221 changed files with 3,106 additions and 1,111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.asyncapi.bindings.amqp1.v0._1_0.channel.AMQP1ChannelBinding;
import com.asyncapi.bindings.anypointmq.AnypointMQChannelBinding;
import com.asyncapi.bindings.googlepubsub.GooglePubSubChannelBinding;
import com.asyncapi.bindings.http.v0._1_0.channel.HTTPChannelBinding;
import com.asyncapi.bindings.http.HTTPChannelBinding;
import com.asyncapi.bindings.ibmmq.v0._1_0.channel.IBMMQChannelBinding;
import com.asyncapi.bindings.jms.v0._0_1.channel.JMSChannelBinding;
import com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelBinding;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.asyncapi.bindings.amqp1.v0._1_0.message.AMQP1MessageBinding;
import com.asyncapi.bindings.anypointmq.AnypointMQMessageBinding;
import com.asyncapi.bindings.googlepubsub.GooglePubSubMessageBinding;
import com.asyncapi.bindings.http.v0._1_0.message.HTTPMessageBinding;
import com.asyncapi.bindings.http.HTTPMessageBinding;
import com.asyncapi.bindings.ibmmq.v0._1_0.message.IBMMQMessageBinding;
import com.asyncapi.bindings.jms.v0._0_1.message.JMSMessageBinding;
import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBinding;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.asyncapi.bindings.amqp1.v0._1_0.operation.AMQP1OperationBinding;
import com.asyncapi.bindings.anypointmq.AnypointMQOperationBinding;
import com.asyncapi.bindings.googlepubsub.GooglePubSubOperationBinding;
import com.asyncapi.bindings.http.v0._1_0.operation.HTTPOperationBinding;
import com.asyncapi.bindings.http.HTTPOperationBinding;
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.KafkaOperationBinding;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.asyncapi.bindings.amqp1.v0._1_0.server.AMQP1ServerBinding;
import com.asyncapi.bindings.anypointmq.AnypointMQServerBinding;
import com.asyncapi.bindings.googlepubsub.GooglePubSubServerBinding;
import com.asyncapi.bindings.http.v0._1_0.server.HTTPServerBinding;
import com.asyncapi.bindings.http.HTTPServerBinding;
import com.asyncapi.bindings.ibmmq.v0._1_0.server.IBMMQServerBinding;
import com.asyncapi.bindings.jms.v0._0_1.server.JMSServerBinding;
import com.asyncapi.bindings.kafka.v0._4_0.server.KafkaServerBinding;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.asyncapi.bindings.http;

import com.asyncapi.bindings.ChannelBinding;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.EqualsAndHashCode;

/**
* Describes HTTP channel binding.
*
* @see <a href="https://github.com/asyncapi/bindings/tree/master/http#channel-binding-object">HTTP channel binding</a>
* @author Pavel Bodiachevskii
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
defaultImpl = com.asyncapi.bindings.http.v0._3_0.channel.HTTPChannelBinding.class,
property = "bindingVersion",
visible = true
)
@JsonSubTypes({
@JsonSubTypes.Type(value = com.asyncapi.bindings.http.v0._1_0.channel.HTTPChannelBinding.class, names = "0.1.0"),
@JsonSubTypes.Type(value = com.asyncapi.bindings.http.v0._2_0.channel.HTTPChannelBinding.class, names = "0.2.0"),
@JsonSubTypes.Type(value = com.asyncapi.bindings.http.v0._3_0.channel.HTTPChannelBinding.class, names = {
"0.3.0",
"latest"
}),
})
@EqualsAndHashCode(callSuper = true)
public abstract class HTTPChannelBinding extends ChannelBinding {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.asyncapi.bindings.http;

import com.asyncapi.bindings.MessageBinding;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.EqualsAndHashCode;

/**
* Contains information about the message representation in HTTP.
*
* @see <a href="https://github.com/asyncapi/bindings/tree/master/http#message-binding-object">HTTP message binding</a>
* @author Pavel Bodiachevskii
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
defaultImpl = com.asyncapi.bindings.http.v0._3_0.message.HTTPMessageBinding.class,
property = "bindingVersion",
visible = true
)
@JsonSubTypes({
@JsonSubTypes.Type(value = com.asyncapi.bindings.http.v0._1_0.message.HTTPMessageBinding.class, names = "0.1.0"),
@JsonSubTypes.Type(value = com.asyncapi.bindings.http.v0._2_0.message.HTTPMessageBinding.class, names = "0.2.0"),
@JsonSubTypes.Type(value = com.asyncapi.bindings.http.v0._3_0.message.HTTPMessageBinding.class, names = {
"0.3.0",
"latest"
}),
})
@EqualsAndHashCode(callSuper = true)
public abstract class HTTPMessageBinding extends MessageBinding {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.asyncapi.bindings.http;

import com.asyncapi.bindings.OperationBinding;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.EqualsAndHashCode;

/**
* Contains information about the operation representation in HTTP.
*
* @see <a href="https://github.com/asyncapi/bindings/tree/master/http#operation-binding-object">HTTP operation binding</a>
* @author Pavel Bodiachevskii
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
defaultImpl = com.asyncapi.bindings.http.v0._3_0.operation.HTTPOperationBinding.class,
property = "bindingVersion",
visible = true
)
@JsonSubTypes({
@JsonSubTypes.Type(value = com.asyncapi.bindings.http.v0._1_0.operation.HTTPOperationBinding.class, names = "0.1.0"),
@JsonSubTypes.Type(value = com.asyncapi.bindings.http.v0._2_0.operation.HTTPOperationBinding.class, names = "0.2.0"),
@JsonSubTypes.Type(value = com.asyncapi.bindings.http.v0._3_0.operation.HTTPOperationBinding.class, names = {
"0.3.0",
"latest"
}),
})
@EqualsAndHashCode(callSuper = true)
public abstract class HTTPOperationBinding extends OperationBinding {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.asyncapi.bindings.http;

import com.asyncapi.bindings.ServerBinding;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.EqualsAndHashCode;

/**
* Describes HTTP server binding.
*
* @see <a href="https://github.com/asyncapi/bindings/tree/master/http#server-binding-object">HTTP server binding</a>
* @author Pavel Bodiachevskii
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
defaultImpl = com.asyncapi.bindings.http.v0._3_0.server.HTTPServerBinding.class,
property = "bindingVersion",
visible = true
)
@JsonSubTypes({
@JsonSubTypes.Type(value = com.asyncapi.bindings.http.v0._1_0.server.HTTPServerBinding.class, names = "0.1.0"),
@JsonSubTypes.Type(value = com.asyncapi.bindings.http.v0._2_0.server.HTTPServerBinding.class, names = "0.2.0"),
@JsonSubTypes.Type(value = com.asyncapi.bindings.http.v0._3_0.server.HTTPServerBinding.class, names = {
"0.3.0",
"latest"
}),
})
@EqualsAndHashCode(callSuper = true)
public abstract class HTTPServerBinding extends ServerBinding {}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.asyncapi.bindings.http.v0._1_0.channel;

import com.asyncapi.bindings.ChannelBinding;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.jetbrains.annotations.Nullable;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
Expand All @@ -17,5 +17,16 @@
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class HTTPChannelBinding extends ChannelBinding {
public class HTTPChannelBinding extends com.asyncapi.bindings.http.HTTPChannelBinding {

@Override
public String getBindingVersion() {
return "0.1.0";
}

@Override
public void setBindingVersion(@Nullable String bindingVersion) {
super.setBindingVersion("0.1.0");
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.asyncapi.bindings.http.v0._1_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;
Expand All @@ -21,7 +20,7 @@
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class HTTPMessageBinding extends MessageBinding {
public class HTTPMessageBinding extends com.asyncapi.bindings.http.HTTPMessageBinding {

/**
* A Schema object containing the definitions for each query parameter. This schema MUST be of type object
Expand All @@ -32,13 +31,14 @@ public class HTTPMessageBinding extends MessageBinding {
@JsonPropertyDescription("A Schema object containing the definitions for each query parameter. This schema MUST be of type object and have a properties key.")
private AsyncAPISchema headers;

/**
* The version of this binding.
*/
@Nullable
@Builder.Default
@JsonProperty("bindingVersion")
@JsonPropertyDescription("The version of this binding.")
private String bindingVersion = "0.1.0";
@Override
public String getBindingVersion() {
return "0.1.0";
}

@Override
public void setBindingVersion(@Nullable String bindingVersion) {
super.setBindingVersion("0.1.0");
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.asyncapi.bindings.http.v0._1_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;
Expand All @@ -22,7 +21,7 @@
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class HTTPOperationBinding extends OperationBinding {
public class HTTPOperationBinding extends com.asyncapi.bindings.http.HTTPOperationBinding {

/**
* Required.
Expand Down Expand Up @@ -54,13 +53,14 @@ public class HTTPOperationBinding extends OperationBinding {
@JsonPropertyDescription("A Schema object containing the definitions for each query parameter. This schema MUST be of type object and have a properties key.")
private AsyncAPISchema query;

/**
* 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.1.0";
@Override
public String getBindingVersion() {
return "0.1.0";
}

@Override
public void setBindingVersion(@Nullable String bindingVersion) {
super.setBindingVersion("0.1.0");
}

}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.asyncapi.bindings.http.v0._1_0.server;

import com.asyncapi.bindings.ServerBinding;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.jetbrains.annotations.Nullable;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
Expand All @@ -17,5 +17,16 @@
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class HTTPServerBinding extends ServerBinding {
public class HTTPServerBinding extends com.asyncapi.bindings.http.HTTPServerBinding {

@Override
public String getBindingVersion() {
return "0.1.0";
}

@Override
public void setBindingVersion(@Nullable String bindingVersion) {
super.setBindingVersion("0.1.0");
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.asyncapi.bindings.http.v0._2_0.channel;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.jetbrains.annotations.Nullable;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
* <p>
* Describes HTTP channel binding.
*
* @version 0.2.0
* @see <a href="https://github.com/asyncapi/bindings/tree/master/http#channel-binding-object">HTTP channel binding</a>
* @author Pavel Bodiachevskii
*/
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class HTTPChannelBinding extends com.asyncapi.bindings.http.HTTPChannelBinding {

@Override
public String getBindingVersion() {
return "0.2.0";
}

@Override
public void setBindingVersion(@Nullable String bindingVersion) {
super.setBindingVersion("0.2.0");
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.asyncapi.bindings.http.v0._2_0.message;

import com.asyncapi.v3.schema.AsyncAPISchema;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import lombok.*;
import org.jetbrains.annotations.Nullable;

/**
* Describes HTTP message binding.
* <p>
* Contains information about the message representation in HTTP.
*
* @version 0.2.0
* @see <a href="https://github.com/asyncapi/bindings/tree/master/http#message-binding-object">HTTP message binding</a>
* @author Pavel Bodiachevskii
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class HTTPMessageBinding extends com.asyncapi.bindings.http.HTTPMessageBinding {

/**
* A Schema object containing the definitions for each query parameter. This schema MUST be of type object
* and have a properties key.*
*/
@Nullable
@JsonProperty("headers")
@JsonPropertyDescription("A Schema object containing the definitions for each query parameter. This schema MUST be of type object and have a properties key.")
private AsyncAPISchema headers;

@Override
public String getBindingVersion() {
return "0.2.0";
}

@Override
public void setBindingVersion(@Nullable String bindingVersion) {
super.setBindingVersion("0.2.0");
}

}
Loading

0 comments on commit e99fd01

Please sign in to comment.