-
-
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.
tests(bindings): HTTP 0.1.0, 0.2.0, 0.3.0
- Loading branch information
Showing
221 changed files
with
3,106 additions
and
1,111 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
30 changes: 30 additions & 0 deletions
30
asyncapi-core/src/main/java/com/asyncapi/bindings/http/HTTPChannelBinding.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,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 {} |
30 changes: 30 additions & 0 deletions
30
asyncapi-core/src/main/java/com/asyncapi/bindings/http/HTTPMessageBinding.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,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 {} |
30 changes: 30 additions & 0 deletions
30
asyncapi-core/src/main/java/com/asyncapi/bindings/http/HTTPOperationBinding.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,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 {} |
30 changes: 30 additions & 0 deletions
30
asyncapi-core/src/main/java/com/asyncapi/bindings/http/HTTPServerBinding.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,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 {} |
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
32 changes: 32 additions & 0 deletions
32
...api-core/src/main/java/com/asyncapi/bindings/http/v0/_2_0/channel/HTTPChannelBinding.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,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"); | ||
} | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
...api-core/src/main/java/com/asyncapi/bindings/http/v0/_2_0/message/HTTPMessageBinding.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,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"); | ||
} | ||
|
||
} |
Oops, something went wrong.