Skip to content

Commit

Permalink
feat(websockets bindings): v3 use common bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
Pakisan committed Apr 20, 2024
1 parent d31e556 commit 66eb0ff
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.asyncapi.v3.binding.channel.ws;
package com.asyncapi.bindings.websockets.v0._1_0.channel;

import com.asyncapi.bindings.ChannelBinding;
import com.asyncapi.v3.schema.AsyncAPISchema;
import com.asyncapi.v3.binding.channel.ChannelBinding;
import com.fasterxml.jackson.annotation.JsonClassDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.asyncapi.bindings.websockets.v0._1_0.channel;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The HTTP method to use when establishing the connection.
* <p>
* Its value <b>MUST</b> be either GET or POST.
*
* @version 0.1.0
* @author Pavel Bodiachevskii
*/
public enum WebSocketsChannelMethod {

@JsonProperty("GET")
GET,

@JsonProperty("POST")
POST

}
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.asyncapi.v3.binding.message.ws;
package com.asyncapi.bindings.websockets.v0._1_0.message;

import com.asyncapi.v3.binding.message.MessageBinding;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
* This class <b>MUST NOT</b> contain any properties.
* <p>
* Its name is reserved for future use.
* <p>
* Describes WebSockets message binding.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.asyncapi.v3.binding.operation.ws;
package com.asyncapi.bindings.websockets.v0._1_0.operation;

import com.asyncapi.v3.binding.operation.OperationBinding;
import com.asyncapi.bindings.OperationBinding;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
* This class <b>MUST NOT</b> contain any properties.
* <p>
* Its name is reserved for future use.
* <p>
* Describes WebSockets operation binding.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.asyncapi.v3.binding.server.ws;
package com.asyncapi.bindings.websockets.v0._1_0.server;

import com.asyncapi.v3.binding.server.ServerBinding;
import com.asyncapi.bindings.ServerBinding;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
* This class <b>MUST NOT</b> contain any properties.
* <p>
* Its name is reserved for future use.
* <p>
* Describes WebSockets server binding.
*
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.asyncapi.v3.binding.channel.solace.SolaceChannelBinding;
import com.asyncapi.v3.binding.channel.sqs.SQSChannelBinding;
import com.asyncapi.v3.binding.channel.stomp.STOMPChannelBinding;
import com.asyncapi.v3.binding.channel.ws.WebSocketsChannelBinding;
import com.asyncapi.bindings.websockets.v0._1_0.channel.WebSocketsChannelBinding;
import com.asyncapi.v3.jackson.BindingsMapDeserializer;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.ObjectCodec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.asyncapi.v3.binding.message.solace.SolaceMessageBinding;
import com.asyncapi.v3.binding.message.sqs.SQSMessageBinding;
import com.asyncapi.v3.binding.message.stomp.STOMPMessageBinding;
import com.asyncapi.v3.binding.message.ws.WebSocketsMessageBinding;
import com.asyncapi.bindings.websockets.v0._1_0.message.WebSocketsMessageBinding;
import com.asyncapi.v3.jackson.BindingsMapDeserializer;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.ObjectCodec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.asyncapi.v3.binding.operation.solace.SolaceOperationBinding;
import com.asyncapi.v3.binding.operation.sqs.SQSOperationBinding;
import com.asyncapi.v3.binding.operation.stomp.STOMPOperationBinding;
import com.asyncapi.v3.binding.operation.ws.WebSocketsOperationBinding;
import com.asyncapi.bindings.websockets.v0._1_0.operation.WebSocketsOperationBinding;
import com.asyncapi.v3.jackson.BindingsMapDeserializer;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.ObjectCodec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.asyncapi.v3.binding.server.solace.SolaceServerBinding;
import com.asyncapi.v3.binding.server.sqs.SQSServerBinding;
import com.asyncapi.v3.binding.server.stomp.STOMPServerBinding;
import com.asyncapi.v3.binding.server.ws.WebSocketsServerBinding;
import com.asyncapi.bindings.websockets.v0._1_0.server.WebSocketsServerBinding;
import com.asyncapi.v3.jackson.BindingsMapDeserializer;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.ObjectCodec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import com.asyncapi.v3._0_0.model.info.Contact
import com.asyncapi.v3._0_0.model.operation.Operation
import com.asyncapi.v3._0_0.model.operation.OperationAction
import com.asyncapi.v3._0_0.model.server.Server
import com.asyncapi.v3.binding.channel.ws.WebSocketsChannelBinding
import com.asyncapi.bindings.websockets.v0._1_0.channel.WebSocketsChannelBinding
import com.asyncapi.v3.schema.AsyncAPISchema
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.asyncapi.v3.binding.server.sns.SNSServerBinding
import com.asyncapi.v3.binding.server.solace.SolaceServerBinding
import com.asyncapi.v3.binding.server.sqs.SQSServerBinding
import com.asyncapi.v3.binding.server.stomp.STOMPServerBinding
import com.asyncapi.v3.binding.server.ws.WebSocketsServerBinding
import com.asyncapi.bindings.websockets.v0._1_0.server.WebSocketsServerBinding
import com.asyncapi.v3.security_scheme.ApiKeySecuritySchemeTest
import com.asyncapi.v3.security_scheme.http.HttpSecuritySchemeBearerTest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ package com.asyncapi.v3.binding.channel.ws
import com.asyncapi.v3.SerDeTest
import com.asyncapi.v3.schema.AsyncAPISchema
import com.asyncapi.v3.schema.Type
import com.asyncapi.bindings.websockets.v0._1_0.channel.WebSocketsChannelBinding;
import com.asyncapi.bindings.websockets.v0._1_0.channel.WebSocketsChannelMethod


/**
* @version 3.0.0
Expand Down

0 comments on commit 66eb0ff

Please sign in to comment.