diff --git a/CHANGELOG.md b/CHANGELOG.md index 68092660..51de1c9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.0-RC3] - 2025-01-21 + +### Changed + +- Replace `javax.validation` with `jakarta.validation`. Because last one is successor +- Mark lombok dependency as `provided` to avoid its injection into resulted jar +- `MessageExample.payload` now is `any` type instead of `Map` + ## [1.0.0-RC2] - 2024-05-16 ### Added diff --git a/asyncapi-core/README.md b/asyncapi-core/README.md index 8239b3af..022d95bf 100644 --- a/asyncapi-core/README.md +++ b/asyncapi-core/README.md @@ -10,7 +10,7 @@ which allows to use it in null-safety languages like `kotlin` without extra head com.asyncapi asyncapi-core - 1.0.0-RC2 + 1.0.0-RC3 ``` diff --git a/asyncapi-core/pom.xml b/asyncapi-core/pom.xml index 41befac9..6fe76584 100644 --- a/asyncapi-core/pom.xml +++ b/asyncapi-core/pom.xml @@ -6,7 +6,7 @@ asyncapi com.asyncapi - 1.0.0-RC2 + 1.0.0-RC3 4.0.0 @@ -48,9 +48,9 @@ test - javax.validation - validation-api - 2.0.1.Final + jakarta.validation + jakarta.validation-api + 3.1.0 diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/channel/AMQPChannelBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/channel/AMQPChannelBinding.java index 826b5fd5..1e0963cd 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/channel/AMQPChannelBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/channel/AMQPChannelBinding.java @@ -37,7 +37,7 @@ public class AMQPChannelBinding extends com.asyncapi.bindings.amqp.AMQPChannelBi */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "is", required = true, defaultValue = "routingKey") @JsonPropertyDescription("Defines what type of channel is it. Can be either queue or routingKey (default).") private AMQPChannelType is = AMQPChannelType.ROUTING_KEY; diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/channel/exchange/AMQPChannelExchangeProperties.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/channel/exchange/AMQPChannelExchangeProperties.java index 86aabe36..2047c7ff 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/channel/exchange/AMQPChannelExchangeProperties.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/channel/exchange/AMQPChannelExchangeProperties.java @@ -33,7 +33,7 @@ public class AMQPChannelExchangeProperties { * The name of the exchange. It MUST NOT exceed 255 characters long. */ @Nullable - @javax.validation.constraints.Size( + @jakarta.validation.constraints.Size( max = 255, message = "Exchange name must not exceed 255 characters long." ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/channel/queue/AMQPChannelQueueProperties.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/channel/queue/AMQPChannelQueueProperties.java index 28b56b26..bfdf8472 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/channel/queue/AMQPChannelQueueProperties.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/channel/queue/AMQPChannelQueueProperties.java @@ -33,7 +33,7 @@ public class AMQPChannelQueueProperties { * The name of the queue. It MUST NOT exceed 255 characters long. */ @Nullable - @javax.validation.constraints.Size( + @jakarta.validation.constraints.Size( max = 255, message = "Queue name must not exceed 255 characters long." ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/operation/AMQPOperationBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/operation/AMQPOperationBinding.java index e4a15fe3..853b183d 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/operation/AMQPOperationBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_1_0/operation/AMQPOperationBinding.java @@ -37,7 +37,7 @@ public class AMQPOperationBinding extends com.asyncapi.bindings.amqp.AMQPOperati * Applies to: publish, subscribe */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "TTL (Time-To-Live) for the message must be greater than or equal to zero" ) @@ -81,11 +81,11 @@ public class AMQPOperationBinding extends com.asyncapi.bindings.amqp.AMQPOperati * Applies to: publish, subscribe */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 1, message = "Delivery mode of the message must be either 1 (transient) or 2 (persistent)" ) - @javax.validation.constraints.Max( + @jakarta.validation.constraints.Max( value = 2, message = "Delivery mode of the message must be either 1 (transient) or 2 (persistent)" ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/channel/AMQPChannelBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/channel/AMQPChannelBinding.java index 6ff30319..ca3662a9 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/channel/AMQPChannelBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/channel/AMQPChannelBinding.java @@ -37,7 +37,7 @@ public class AMQPChannelBinding extends com.asyncapi.bindings.amqp.AMQPChannelBi */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "is", required = true, defaultValue = "routingKey") @JsonPropertyDescription("Defines what type of channel is it. Can be either queue or routingKey (default).") private AMQPChannelType is = AMQPChannelType.ROUTING_KEY; diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/channel/exchange/AMQPChannelExchangeProperties.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/channel/exchange/AMQPChannelExchangeProperties.java index 18471275..2215127f 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/channel/exchange/AMQPChannelExchangeProperties.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/channel/exchange/AMQPChannelExchangeProperties.java @@ -33,7 +33,7 @@ public class AMQPChannelExchangeProperties { * The name of the exchange. It MUST NOT exceed 255 characters long. */ @Nullable - @javax.validation.constraints.Size( + @jakarta.validation.constraints.Size( max = 255, message = "Exchange name must not exceed 255 characters long." ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/channel/queue/AMQPChannelQueueProperties.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/channel/queue/AMQPChannelQueueProperties.java index 8a55855c..67198243 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/channel/queue/AMQPChannelQueueProperties.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/channel/queue/AMQPChannelQueueProperties.java @@ -33,7 +33,7 @@ public class AMQPChannelQueueProperties { * The name of the queue. It MUST NOT exceed 255 characters long. */ @Nullable - @javax.validation.constraints.Size( + @jakarta.validation.constraints.Size( max = 255, message = "Queue name must not exceed 255 characters long." ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/operation/AMQPOperationBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/operation/AMQPOperationBinding.java index 6c5f26ed..3447c28c 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/operation/AMQPOperationBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_2_0/operation/AMQPOperationBinding.java @@ -37,7 +37,7 @@ public class AMQPOperationBinding extends com.asyncapi.bindings.amqp.AMQPOperati * Applies to: publish, subscribe */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "TTL (Time-To-Live) for the message must be greater than or equal to zero" ) @@ -81,11 +81,11 @@ public class AMQPOperationBinding extends com.asyncapi.bindings.amqp.AMQPOperati * Applies to: publish, subscribe */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 1, message = "Delivery mode of the message must be either 1 (transient) or 2 (persistent)" ) - @javax.validation.constraints.Max( + @jakarta.validation.constraints.Max( value = 2, message = "Delivery mode of the message must be either 1 (transient) or 2 (persistent)" ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/channel/AMQPChannelBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/channel/AMQPChannelBinding.java index 2edb0f0b..1ad53450 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/channel/AMQPChannelBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/channel/AMQPChannelBinding.java @@ -37,7 +37,7 @@ public class AMQPChannelBinding extends com.asyncapi.bindings.amqp.AMQPChannelBi */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "is", required = true, defaultValue = "routingKey") @JsonPropertyDescription("Defines what type of channel is it. Can be either queue or routingKey (default).") private AMQPChannelType is = AMQPChannelType.ROUTING_KEY; diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/channel/exchange/AMQPChannelExchangeProperties.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/channel/exchange/AMQPChannelExchangeProperties.java index 5eb623df..75b1b4c6 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/channel/exchange/AMQPChannelExchangeProperties.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/channel/exchange/AMQPChannelExchangeProperties.java @@ -33,7 +33,7 @@ public class AMQPChannelExchangeProperties { * The name of the exchange. It MUST NOT exceed 255 characters long. */ @Nullable - @javax.validation.constraints.Size( + @jakarta.validation.constraints.Size( max = 255, message = "Exchange name must not exceed 255 characters long." ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/channel/queue/AMQPChannelQueueProperties.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/channel/queue/AMQPChannelQueueProperties.java index a84f0183..c59293b6 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/channel/queue/AMQPChannelQueueProperties.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/channel/queue/AMQPChannelQueueProperties.java @@ -33,7 +33,7 @@ public class AMQPChannelQueueProperties { * The name of the queue. It MUST NOT exceed 255 characters long. */ @Nullable - @javax.validation.constraints.Size( + @jakarta.validation.constraints.Size( max = 255, message = "Queue name must not exceed 255 characters long." ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/operation/AMQPOperationBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/operation/AMQPOperationBinding.java index d5d3a181..62b044f2 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/operation/AMQPOperationBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/amqp/v0/_3_0/operation/AMQPOperationBinding.java @@ -37,7 +37,7 @@ public class AMQPOperationBinding extends com.asyncapi.bindings.amqp.AMQPOperati * Applies to: publish, subscribe */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "TTL (Time-To-Live) for the message must be greater than or equal to zero" ) @@ -81,11 +81,11 @@ public class AMQPOperationBinding extends com.asyncapi.bindings.amqp.AMQPOperati * Applies to: publish, subscribe */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 1, message = "Delivery mode of the message must be either 1 (transient) or 2 (persistent)" ) - @javax.validation.constraints.Max( + @jakarta.validation.constraints.Max( value = 2, message = "Delivery mode of the message must be either 1 (transient) or 2 (persistent)" ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_1_0/channel/GooglePubSubChannelBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_1_0/channel/GooglePubSubChannelBinding.java index e5cdfecc..6044017f 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_1_0/channel/GooglePubSubChannelBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_1_0/channel/GooglePubSubChannelBinding.java @@ -37,7 +37,7 @@ public class GooglePubSubChannelBinding extends com.asyncapi.bindings.googlepubs */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "topic", required = true) @JsonPropertyDescription("The Google Cloud Pub/Sub Topic name.") private String topic = ""; @@ -71,7 +71,7 @@ public class GooglePubSubChannelBinding extends com.asyncapi.bindings.googlepubs */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "schemaSettings", required = true) @JsonPropertyDescription("Settings for validating messages published against a schema") private GooglePubSubChannelSchemaSettings schemaSettings = new GooglePubSubChannelSchemaSettings(); diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_1_0/channel/GooglePubSubChannelSchemaSettings.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_1_0/channel/GooglePubSubChannelSchemaSettings.java index 96d6f646..fc3af653 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_1_0/channel/GooglePubSubChannelSchemaSettings.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_1_0/channel/GooglePubSubChannelSchemaSettings.java @@ -34,7 +34,7 @@ public class GooglePubSubChannelSchemaSettings { */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "encoding", required = true) @JsonPropertyDescription("The encoding of the message (Must be one of the possible https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#encoding values.)") private String encoding = ""; @@ -60,7 +60,7 @@ public class GooglePubSubChannelSchemaSettings { */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "name", required = true) @JsonPropertyDescription("The name of the schema that messages published should be validated against (The format is projects/{project}/schemas/{schema}.)") private String name = ""; diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_1_0/message/GooglePubSubMessageSchemaDefinition.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_1_0/message/GooglePubSubMessageSchemaDefinition.java index db017077..009467d1 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_1_0/message/GooglePubSubMessageSchemaDefinition.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_1_0/message/GooglePubSubMessageSchemaDefinition.java @@ -37,7 +37,7 @@ public class GooglePubSubMessageSchemaDefinition { */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "name", required = true) @JsonPropertyDescription("The name of the schema") private String name = ""; @@ -47,7 +47,7 @@ public class GooglePubSubMessageSchemaDefinition { */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "type", required = true) @JsonPropertyDescription("The type of the schema") private GooglePubSubMessageSchemaDefinitionType type = GooglePubSubMessageSchemaDefinitionType.PROTOBUF; diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_2_0/channel/GooglePubSubChannelBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_2_0/channel/GooglePubSubChannelBinding.java index 94761ffe..2a2b9ecc 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_2_0/channel/GooglePubSubChannelBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_2_0/channel/GooglePubSubChannelBinding.java @@ -61,7 +61,7 @@ public class GooglePubSubChannelBinding extends com.asyncapi.bindings.googlepubs */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "schemaSettings", required = true) @JsonPropertyDescription("Settings for validating messages published against a schema") private GooglePubSubChannelSchemaSettings schemaSettings = new GooglePubSubChannelSchemaSettings(); diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_2_0/channel/GooglePubSubChannelSchemaSettings.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_2_0/channel/GooglePubSubChannelSchemaSettings.java index a62aa1e4..094e576e 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_2_0/channel/GooglePubSubChannelSchemaSettings.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_2_0/channel/GooglePubSubChannelSchemaSettings.java @@ -34,7 +34,7 @@ public class GooglePubSubChannelSchemaSettings { */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "encoding", required = true) @JsonPropertyDescription("The encoding of the message (Must be one of the possible https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#encoding values.)") private String encoding = ""; @@ -60,7 +60,7 @@ public class GooglePubSubChannelSchemaSettings { */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "name", required = true) @JsonPropertyDescription("The name of the schema that messages published should be validated against (The format is projects/{project}/schemas/{schema}.)") private String name = ""; diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_2_0/message/GooglePubSubMessageSchemaDefinition.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_2_0/message/GooglePubSubMessageSchemaDefinition.java index 84d10108..abe5dd94 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_2_0/message/GooglePubSubMessageSchemaDefinition.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/googlepubsub/v0/_2_0/message/GooglePubSubMessageSchemaDefinition.java @@ -37,7 +37,7 @@ public class GooglePubSubMessageSchemaDefinition { */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "name", required = true) @JsonPropertyDescription("The name of the schema") private String name = ""; diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/http/v0/_1_0/operation/HTTPOperationBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/http/v0/_1_0/operation/HTTPOperationBinding.java index 171e750f..a5c0dee4 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/http/v0/_1_0/operation/HTTPOperationBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/http/v0/_1_0/operation/HTTPOperationBinding.java @@ -36,7 +36,7 @@ public class HTTPOperationBinding extends com.asyncapi.bindings.http.HTTPOperati */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "type", required = true) @JsonPropertyDescription("Type of operation. Its value MUST be either request or response.") private HTTPOperationType type = HTTPOperationType.REQUEST; diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/channel/IBMMQChannelBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/channel/IBMMQChannelBinding.java index 382ca084..9cc1b608 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/channel/IBMMQChannelBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/channel/IBMMQChannelBinding.java @@ -70,11 +70,11 @@ public class IBMMQChannelBinding extends com.asyncapi.bindings.ibmmq.IBMMQChanne * MUST be 0-104,857,600 bytes (100 MB). */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "Maximum length of the physical message (in bytes) must be greater or equals to 0" ) - @javax.validation.constraints.Max( + @jakarta.validation.constraints.Max( value = 104857600, message = "Maximum length of the physical message (in bytes) must be lower or equals to 104857600" ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/channel/IBMMQChannelQueueProperties.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/channel/IBMMQChannelQueueProperties.java index 0298cfae..d240a115 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/channel/IBMMQChannelQueueProperties.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/channel/IBMMQChannelQueueProperties.java @@ -34,8 +34,8 @@ public class IBMMQChannelQueueProperties { * A value MUST be specified. MUST NOT exceed 48 characters in length. MUST be a valid IBM MQ queue name */ @NotNull - @javax.validation.constraints.NotNull - @javax.validation.constraints.Size( + @jakarta.validation.constraints.NotNull + @jakarta.validation.constraints.Size( max = 48, message = "Name of the IBM MQ queue must be less or equals to 48" ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/channel/IBMMQChannelTopicProperties.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/channel/IBMMQChannelTopicProperties.java index cf2a35aa..4e49d4dd 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/channel/IBMMQChannelTopicProperties.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/channel/IBMMQChannelTopicProperties.java @@ -34,7 +34,7 @@ public class IBMMQChannelTopicProperties { * MUST NOT exceed 10240 characters in length. MAY coexist with topic.objectName */ @Nullable - @javax.validation.constraints.Max( + @jakarta.validation.constraints.Max( value = 10240, message = "Maximum length of topic string must be lower or equals to 10240" ) @@ -51,7 +51,7 @@ public class IBMMQChannelTopicProperties { * MUST NOT exceed 48 characters in length. MAY coexist with topic.string */ @Nullable - @javax.validation.constraints.Max( + @jakarta.validation.constraints.Max( value = 48, message = "Maximum length of topic name must be lower or equals to 48" ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/message/IBMMQMessageBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/message/IBMMQMessageBinding.java index b82ba5f9..a7050b6f 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/message/IBMMQMessageBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/message/IBMMQMessageBinding.java @@ -74,7 +74,7 @@ public class IBMMQMessageBinding extends com.asyncapi.bindings.ibmmq.IBMMQMessag */ @Nullable @Builder.Default - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "Expiry must be greater or equals to 0" ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/server/IBMMQServerBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/server/IBMMQServerBinding.java index 865ee718..481f4c00 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/server/IBMMQServerBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/ibmmq/v0/_1_0/server/IBMMQServerBinding.java @@ -84,11 +84,11 @@ public class IBMMQServerBinding extends com.asyncapi.bindings.ibmmq.IBMMQServerB * MUST be 0-999999 */ @Builder.Default - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "Heart beat interval must be greater or equals to 0" ) - @javax.validation.constraints.Max( + @jakarta.validation.constraints.Max( value = 999999, message = "Heart beat interval must be less or equals to 999999" ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_3_0/channel/KafkaChannelBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_3_0/channel/KafkaChannelBinding.java index 238f777c..5771fe95 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_3_0/channel/KafkaChannelBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_3_0/channel/KafkaChannelBinding.java @@ -41,7 +41,7 @@ public class KafkaChannelBinding extends com.asyncapi.bindings.kafka.KafkaChanne * MUST be positive. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 1, message = "Number of partitions must be greater or equals to 1" ) @@ -55,7 +55,7 @@ public class KafkaChannelBinding extends com.asyncapi.bindings.kafka.KafkaChanne * MUST be positive. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 1, message = "Number of replicas must be greater or equals to 1" ) 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 99185e84..b3a7f151 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 @@ -39,7 +39,7 @@ public class KafkaChannelBinding extends com.asyncapi.bindings.kafka.KafkaChanne * MUST be positive. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 1, message = "Number of partitions must be greater or equals to 1" ) @@ -53,7 +53,7 @@ public class KafkaChannelBinding extends com.asyncapi.bindings.kafka.KafkaChanne * MUST be positive. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 1, message = "Number of replicas must be greater or equals to 1" ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/channel/KafkaChannelTopicConfiguration.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/channel/KafkaChannelTopicConfiguration.java index 44fb919f..d9fe02ec 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/channel/KafkaChannelTopicConfiguration.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_4_0/channel/KafkaChannelTopicConfiguration.java @@ -36,7 +36,7 @@ public class KafkaChannelTopicConfiguration { * The retention.ms configuration option. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = -1, message = "retention.ms must be greater or equals to -1" ) @@ -48,7 +48,7 @@ public class KafkaChannelTopicConfiguration { * The retention.bytes configuration option. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = -1, message = "retention.bytes must be greater or equals to -1" ) @@ -60,7 +60,7 @@ public class KafkaChannelTopicConfiguration { * The delete.retention.ms configuration option. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "delete.retention.ms must be greater or equals to 0" ) @@ -72,7 +72,7 @@ public class KafkaChannelTopicConfiguration { * The max.message.bytes configuration option. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "max.message.bytes must be greater or equals to 0" ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_5_0/channel/KafkaChannelBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_5_0/channel/KafkaChannelBinding.java index e7c8f475..864e7342 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_5_0/channel/KafkaChannelBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_5_0/channel/KafkaChannelBinding.java @@ -41,7 +41,7 @@ public class KafkaChannelBinding extends com.asyncapi.bindings.kafka.KafkaChanne * MUST be positive. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 1, message = "Number of partitions must be greater or equals to 1" ) @@ -55,7 +55,7 @@ public class KafkaChannelBinding extends com.asyncapi.bindings.kafka.KafkaChanne * MUST be positive. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 1, message = "Number of replicas must be greater or equals to 1" ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_5_0/channel/KafkaChannelTopicConfiguration.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_5_0/channel/KafkaChannelTopicConfiguration.java index 8159dfcb..8b6d29a8 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_5_0/channel/KafkaChannelTopicConfiguration.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/kafka/v0/_5_0/channel/KafkaChannelTopicConfiguration.java @@ -38,7 +38,7 @@ public class KafkaChannelTopicConfiguration { * The retention.ms configuration option. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = -1, message = "retention.ms must be greater or equals to -1" ) @@ -50,7 +50,7 @@ public class KafkaChannelTopicConfiguration { * The retention.bytes configuration option. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = -1, message = "retention.bytes must be greater or equals to -1" ) @@ -62,7 +62,7 @@ public class KafkaChannelTopicConfiguration { * The delete.retention.ms configuration option. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "delete.retention.ms must be greater or equals to 0" ) @@ -74,7 +74,7 @@ public class KafkaChannelTopicConfiguration { * The max.message.bytes configuration option. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "max.message.bytes must be greater or equals to 0" ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_1_0/operation/MQTTOperationBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_1_0/operation/MQTTOperationBinding.java index d6b7f1ba..99707eaa 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_1_0/operation/MQTTOperationBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_1_0/operation/MQTTOperationBinding.java @@ -36,11 +36,11 @@ public class MQTTOperationBinding extends com.asyncapi.bindings.mqtt.MQTTOperati * Applies to: publish, subscribe */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "QoS must be greater or equals to 0." ) - @javax.validation.constraints.Max( + @jakarta.validation.constraints.Max( value = 2, message = "QoS must be lower or equals to 0." ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_1_0/server/MQTTServerLastWillConfiguration.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_1_0/server/MQTTServerLastWillConfiguration.java index 65cf84cc..25ed199e 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_1_0/server/MQTTServerLastWillConfiguration.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_1_0/server/MQTTServerLastWillConfiguration.java @@ -36,11 +36,11 @@ public class MQTTServerLastWillConfiguration { * Its value MUST be either 0, 1 or 2. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "QoS must be greater or equals to 0." ) - @javax.validation.constraints.Max( + @jakarta.validation.constraints.Max( value = 2, message = "QoS must be lower or equals to 0." ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_2_0/operation/MQTTOperationBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_2_0/operation/MQTTOperationBinding.java index e8b9b57a..439f10d2 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_2_0/operation/MQTTOperationBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_2_0/operation/MQTTOperationBinding.java @@ -38,11 +38,11 @@ public class MQTTOperationBinding extends com.asyncapi.bindings.mqtt.MQTTOperati * Applies to: publish, subscribe */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "QoS must be greater or equals to 0." ) - @javax.validation.constraints.Max( + @jakarta.validation.constraints.Max( value = 2, message = "QoS must be lower or equals to 2." ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_2_0/server/MQTTServerLastWillConfiguration.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_2_0/server/MQTTServerLastWillConfiguration.java index 663a226d..5671a57d 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_2_0/server/MQTTServerLastWillConfiguration.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/mqtt/v0/_2_0/server/MQTTServerLastWillConfiguration.java @@ -36,11 +36,11 @@ public class MQTTServerLastWillConfiguration { * Its value MUST be either 0, 1 or 2. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "QoS must be greater or equals to 0." ) - @javax.validation.constraints.Max( + @jakarta.validation.constraints.Max( value = 2, message = "QoS must be lower or equals to 0." ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/nats/v0/_1_0/operation/NATSOperationBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/nats/v0/_1_0/operation/NATSOperationBinding.java index 0f66c03a..fb037ef1 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/nats/v0/_1_0/operation/NATSOperationBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/nats/v0/_1_0/operation/NATSOperationBinding.java @@ -31,7 +31,7 @@ public class NATSOperationBinding extends com.asyncapi.bindings.nats.NATSOperati * Defines the name of the queue to use. It MUST NOT exceed 255 characters. */ @Nullable - @javax.validation.constraints.Size( + @jakarta.validation.constraints.Size( max = 255, message = "Queue name must be lower or equals to 255." ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/pulsar/v0/_1_0/channel/PulsarChannelBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/pulsar/v0/_1_0/channel/PulsarChannelBinding.java index a1533cf3..a476514e 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/pulsar/v0/_1_0/channel/PulsarChannelBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/pulsar/v0/_1_0/channel/PulsarChannelBinding.java @@ -35,7 +35,7 @@ public class PulsarChannelBinding extends com.asyncapi.bindings.pulsar.PulsarCha */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty("namespace") @JsonPropertyDescription("The namespace the channel is associated with.") private String namespace = ""; @@ -45,7 +45,7 @@ public class PulsarChannelBinding extends com.asyncapi.bindings.pulsar.PulsarCha */ @NotNull @Builder.Default - @javax.validation.constraints.NotNull + @jakarta.validation.constraints.NotNull @JsonProperty(value = "persistence", defaultValue = "persistent") @JsonPropertyDescription("Persistence of the topic in Pulsar. It MUST be either persistent or non-persistent.") private PulsarChannelPersistence persistence = PulsarChannelPersistence.PERSISTENT; @@ -54,7 +54,7 @@ public class PulsarChannelBinding extends com.asyncapi.bindings.pulsar.PulsarCha * Topic compaction threshold given in Megabytes. */ @Nullable - @javax.validation.constraints.Min( + @jakarta.validation.constraints.Min( value = 0, message = "Topic compaction threshold must be greater or equals to 0." ) diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/sns/v0/_1_0/operation/SNSOperationBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/sns/v0/_1_0/operation/SNSOperationBinding.java index a7784f7a..9ef6b450 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/sns/v0/_1_0/operation/SNSOperationBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/sns/v0/_1_0/operation/SNSOperationBinding.java @@ -39,7 +39,7 @@ public class SNSOperationBinding extends com.asyncapi.bindings.sns.SNSOperationB */ @NotNull @Builder.Default - @javax.validation.constraints.Size(min = 1) + @jakarta.validation.constraints.Size(min = 1) private List<@NotNull SNSOperationConsumer> consumers = Collections.emptyList(); /** diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/solace/v0/_4_0/operation/SolaceOperationBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/solace/v0/_4_0/operation/SolaceOperationBinding.java index 0fd66087..c2fbc1a9 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/solace/v0/_4_0/operation/SolaceOperationBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/solace/v0/_4_0/operation/SolaceOperationBinding.java @@ -49,8 +49,8 @@ public class SolaceOperationBinding extends com.asyncapi.bindings.solace.SolaceO * a Schema Object containing the definition of the priority. */ @Nullable - @javax.validation.constraints.Min(0) - @javax.validation.constraints.Max(255) + @jakarta.validation.constraints.Min(0) + @jakarta.validation.constraints.Max(255) private Integer priority; /** diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/solace/v0/_4_0/server/SolaceServerBinding.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/solace/v0/_4_0/server/SolaceServerBinding.java index c71fbf75..326ee84b 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/solace/v0/_4_0/server/SolaceServerBinding.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/solace/v0/_4_0/server/SolaceServerBinding.java @@ -42,7 +42,7 @@ public class SolaceServerBinding extends com.asyncapi.bindings.solace.SolaceServ */ @Nullable @JsonProperty("clientName") - @javax.validation.constraints.Size(min = 1, max = 160) + @jakarta.validation.constraints.Size(min = 1, max = 160) private String clientName; @Override diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/sqs/v0/_2_0/channel/SQSChannelQueue.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/sqs/v0/_2_0/channel/SQSChannelQueue.java index aa6c4690..674be4e8 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/sqs/v0/_2_0/channel/SQSChannelQueue.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/sqs/v0/_2_0/channel/SQSChannelQueue.java @@ -62,8 +62,8 @@ public class SQSChannelQueue { */ @Nullable @Builder.Default - @javax.validation.constraints.Min(0) - @javax.validation.constraints.Max(15) + @jakarta.validation.constraints.Min(0) + @jakarta.validation.constraints.Max(15) private Integer deliveryDelay = 0; /** @@ -71,8 +71,8 @@ public class SQSChannelQueue { */ @Nullable @Builder.Default - @javax.validation.constraints.Min(0) - @javax.validation.constraints.Max(43200) + @jakarta.validation.constraints.Min(0) + @jakarta.validation.constraints.Max(43200) private Integer visibilityTimeout = 30; /** @@ -91,8 +91,8 @@ public class SQSChannelQueue { */ @Nullable @Builder.Default - @javax.validation.constraints.Min(60) - @javax.validation.constraints.Max(1209600) + @jakarta.validation.constraints.Min(60) + @jakarta.validation.constraints.Max(1209600) private Integer messageRetentionPeriod = 345600; /** diff --git a/asyncapi-core/src/main/java/com/asyncapi/bindings/sqs/v0/_2_0/operation/SQSOperationQueue.java b/asyncapi-core/src/main/java/com/asyncapi/bindings/sqs/v0/_2_0/operation/SQSOperationQueue.java index e93e1777..ad03504e 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/bindings/sqs/v0/_2_0/operation/SQSOperationQueue.java +++ b/asyncapi-core/src/main/java/com/asyncapi/bindings/sqs/v0/_2_0/operation/SQSOperationQueue.java @@ -75,8 +75,8 @@ public class SQSOperationQueue { */ @Nullable @Builder.Default - @javax.validation.constraints.Min(0) - @javax.validation.constraints.Max(15) + @jakarta.validation.constraints.Min(0) + @jakarta.validation.constraints.Max(15) private Integer deliveryDelay = 0; /** @@ -84,8 +84,8 @@ public class SQSOperationQueue { */ @Nullable @Builder.Default - @javax.validation.constraints.Min(0) - @javax.validation.constraints.Max(43200) + @jakarta.validation.constraints.Min(0) + @jakarta.validation.constraints.Max(43200) private Integer visibilityTimeout = 30; /** @@ -104,8 +104,8 @@ public class SQSOperationQueue { */ @Nullable @Builder.Default - @javax.validation.constraints.Min(60) - @javax.validation.constraints.Max(1209600) + @jakarta.validation.constraints.Min(60) + @jakarta.validation.constraints.Max(1209600) private Integer messageRetentionPeriod = 345600; /** diff --git a/asyncapi-core/src/main/java/com/asyncapi/schemas/asyncapi/AsyncAPISchema.java b/asyncapi-core/src/main/java/com/asyncapi/schemas/asyncapi/AsyncAPISchema.java index de15caf6..b0eb5245 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/schemas/asyncapi/AsyncAPISchema.java +++ b/asyncapi-core/src/main/java/com/asyncapi/schemas/asyncapi/AsyncAPISchema.java @@ -15,7 +15,7 @@ import lombok.NoArgsConstructor; import org.jetbrains.annotations.Nullable; -import javax.validation.constraints.Min; +import jakarta.validation.constraints.Min; import java.math.BigDecimal; import java.util.List; import java.util.Map; diff --git a/asyncapi-core/src/main/java/com/asyncapi/schemas/json/JsonSchema.java b/asyncapi-core/src/main/java/com/asyncapi/schemas/json/JsonSchema.java index c6ee1db8..150cd8f0 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/schemas/json/JsonSchema.java +++ b/asyncapi-core/src/main/java/com/asyncapi/schemas/json/JsonSchema.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; import org.jetbrains.annotations.Nullable; -import javax.validation.constraints.Min; +import jakarta.validation.constraints.Min; import java.math.BigDecimal; import java.util.List; import java.util.Map; diff --git a/asyncapi-core/src/main/java/com/asyncapi/v3/_0_0/model/channel/message/MessageExample.java b/asyncapi-core/src/main/java/com/asyncapi/v3/_0_0/model/channel/message/MessageExample.java index 00baa026..ba7d9fe1 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/v3/_0_0/model/channel/message/MessageExample.java +++ b/asyncapi-core/src/main/java/com/asyncapi/v3/_0_0/model/channel/message/MessageExample.java @@ -30,7 +30,7 @@ public class MessageExample extends ExtendableObject { * The value of this field MUST validate against the Message {@link Message} payload field. */ @Nullable - public Map payload; + public Object payload; /** * A machine-friendly name. diff --git a/asyncapi-core/src/test/kotlin/com/asyncapi/examples/v3/_0_0/ArrayAsMessageAsyncAPI.kt b/asyncapi-core/src/test/kotlin/com/asyncapi/examples/v3/_0_0/ArrayAsMessageAsyncAPI.kt new file mode 100644 index 00000000..94ab1ca8 --- /dev/null +++ b/asyncapi-core/src/test/kotlin/com/asyncapi/examples/v3/_0_0/ArrayAsMessageAsyncAPI.kt @@ -0,0 +1,100 @@ +package com.asyncapi.examples.v3._0_0 + +import com.asyncapi.schemas.asyncapi.Reference +import com.asyncapi.v3._0_0.model.channel.Channel +import com.asyncapi.v3._0_0.model.channel.message.Message +import com.asyncapi.v3._0_0.model.component.Components +import com.asyncapi.v3._0_0.model.info.Info +import com.asyncapi.v3._0_0.model.operation.Operation +import com.asyncapi.v3._0_0.model.operation.OperationAction +import com.asyncapi.schemas.asyncapi.AsyncAPISchema +import com.asyncapi.v3._0_0.model.channel.message.MessageExample + +class ArrayAsMessageAsyncAPI: AbstractExampleValidationTest() { + + override fun specificationLocation(): String = "/examples/v3.0.0/message-of-array-type-asyncapi.yml" + + override fun expectedInfo(): Info { + return Info.builder() + .title("Message of array type example") + .version("1.0.0") + .build() + } + + override fun expectedServers(): Map = emptyMap() + + override fun expectedChannels(): Map { + return mapOf( + Pair("test", + Channel.builder() + .address("test") + .messages(mapOf( + Pair("testMessages", + Reference("#/components/messages/testMessages") + ) + )) + .build() + ) + ) + } + + override fun expectedOperations(): Map { + return mapOf( + Pair("onTestMsg", + Operation.builder() + .action(OperationAction.RECEIVE) + .channel(Reference("#/channels/test")) + .messages(listOf(Reference("#/channels/test/messages/testMessages"))) + .build() + ) + ) + } + + override fun expectedComponents(): Components { + return Components.builder() + .messages(mapOf( + Pair("testMessages", + Message.builder() + .payload( + Reference("#/components/schemas/objectWithKeyArray") + ) + .examples( + listOf( + MessageExample.builder().name("example1").payload( + listOf( + mapOf("key" to "value1"), + mapOf("key" to "value2") + ) + ).build(), + MessageExample.builder().name("example2").payload( + listOf( + mapOf("key" to "value3") + ) + ).build() + ) + ) + .build() + ) + )) + .schemas(mapOf( + Pair( + "objectWithKeyArray", AsyncAPISchema.builder() + .type("array") + .items( + AsyncAPISchema.builder() + .type("object") + .properties( + mapOf( + Pair("key", AsyncAPISchema.builder().type("string").build()) + ) + ) + .build() + ) + .build() + ) + )) + .build() + } + +} + diff --git a/asyncapi-core/src/test/resources/examples/v3.0.0/message-of-array-type-asyncapi.yml b/asyncapi-core/src/test/resources/examples/v3.0.0/message-of-array-type-asyncapi.yml new file mode 100644 index 00000000..03a4d532 --- /dev/null +++ b/asyncapi-core/src/test/resources/examples/v3.0.0/message-of-array-type-asyncapi.yml @@ -0,0 +1,39 @@ +asyncapi: 3.0.0 +info: + title: Message of array type example + version: 1.0.0 +channels: + test: + address: test + messages: + testMessages: + $ref: '#/components/messages/testMessages' +operations: + onTestMsg: + action: receive + channel: + $ref: '#/channels/test' + messages: + - $ref: '#/channels/test/messages/testMessages' +components: + messages: + testMessages: + payload: + $ref: '#/components/schemas/objectWithKeyArray' + examples: + - name: example1 + payload: + - key: "value1" + - key: "value2" + - name: example2 + payload: + - key: "value3" + schemas: + objectWithKeyArray: + type: array + items: + type: object + properties: + key: + type: string + diff --git a/pom.xml b/pom.xml index 803cfb94..d4f1f057 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.asyncapi asyncapi - 1.0.0-RC2 + 1.0.0-RC3 AsyncAPI @@ -114,6 +114,7 @@ org.projectlombok lombok ${lombok.version} + provided @@ -248,7 +249,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.7 + 1.6.14 true ossrh @@ -259,7 +260,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.2.7 sign-artifacts