-
-
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.
Merge pull request #188 from asyncapi/release/1.0.0-EAP-3
1.0.0-EAP-3
- Loading branch information
Showing
48 changed files
with
11,535 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
# Changelog | ||
|
||
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-EAP-3] - 2024-03-10 | ||
|
||
Kudos to: | ||
- https://github.com/jaydeepk | ||
- https://github.com/ctasada | ||
- https://github.com/guillaumelamirand | ||
- https://github.com/ivanalayan15 | ||
- https://github.com/Crain-32 | ||
- https://github.com/wrwks | ||
- https://github.com/dennis-brinley | ||
|
||
### Added | ||
|
||
- AsyncAPI 3.0.0 | ||
|
||
### Changed | ||
|
||
- Reference was moved from `com.asyncapi.v2._6_0.model` to `com.asyncapi.v2` | ||
- 2.0.0: | ||
- `Schema.multipleOf` type was changed to `Number` | ||
- 2.6.0: | ||
- Specification: | ||
- `AsyncAPI.servers` now can hold server objects and references | ||
- `AsyncAPI.info` now has default value - empty Info object | ||
- `AsyncAPI.channels` now has default value - empty map | ||
- `Info.title` now has default value - empty string | ||
- `Info.version` now has default value - empty string | ||
- `License.name` now has default value - empty string | ||
- `Server.url` now has default value - empty string | ||
- `Server.protocol` now has default value - empty string | ||
- `Tag.name` now has default value - empty string | ||
- `CorrelationId.location` now has default value - empty string | ||
- `OneOfMessages.oneOf` now has default value - empty list | ||
- Bindings: | ||
- AMQP: | ||
- `AMQPChannelBinding.is` now `is required` and type was changed from `string` to `AMQPChannelType` enum and has default value - `routingKey` | ||
- AMQP `ExchangeProperties` was extracted and renamed to `AMQPChannelExchangeProperties` | ||
- AMQP `QueueProperties` was extracted and renamed to `AMQPChannelQueueProperties` | ||
- Anypoint MQ: | ||
- `AnypointMQChannelBinding.destinationType` was changed from `string` to `AnypointMQChannelDestinationType` with next default value - `queue` | ||
- Google Pub/Sub: | ||
- channels: | ||
- `GooglePubSubChannelBinding.topic` now has default value - empty string | ||
- `GooglePubSubChannelBinding.messageStoragePolicy` was extracted and renamed to `GooglePubSubChannelMessageStoragePolicy` | ||
- `GooglePubSubChannelBinding.schemaSettings` was extracted and renamed to `GooglePubSubChannelSchemaSettings` | ||
- `GooglePubSubChannelBinding.schemaSettings` now has default value - `GooglePubSubChannelSchemaSettings()` | ||
- messages: | ||
- `GooglePubSubMessageBinding.schema` was extracted and renamed to `GooglePubSubMessageSchemaDefinition` | ||
- IBM MQ: | ||
- channels: | ||
- `IBMMQChannelBinding.destinationType` type was changed to `IBMMQChannelDestinationType` | ||
- `IBMMQChannelBinding.destinationType` now has default value - `topic` | ||
- `IBMMQChannelBinding.queue` was extracted and renamed to `IBMMQChannelQueueProperties` | ||
- `IBMMQChannelBinding.topic` was extracted and renamed to `IBMMQChannelTopicProperties` | ||
- `IBMMQChannelBinding.topic` was extracted and renamed to `IBMMQChannelTopicProperties` | ||
- messages: | ||
- `IBMMQMessageBinding.type` type was changed to `IBMMQMessageType` | ||
- `IBMMQMessageBinding.type` now has default value - `string` | ||
- `IBMMQMessageBinding.expiry` now has default value - `0` | ||
- Kafka: | ||
- channels: | ||
- `KafkaChannelBinding.topicConfiguration` was extracted and renamed to `KafkaChannelTopicConfiguration` | ||
- messages: | ||
- `KafkaMessageBinding.key` type was changed to `Schema` | ||
- `KafkaMessageBinding.schemaIdLocation` type was changed to `KafkaMessageSchemaIdLocation` | ||
- operations: | ||
- `KafkaOperationBinding.groupId` type was changed to `Schema` | ||
- `KafkaOperationBinding.clientId` type was changed to `Schema` | ||
- Pulsar: | ||
- `PulsarChannelBinding.namespace` now has default value - empty string | ||
- `PulsarChannelBinding.persistence` type was changed to `PulsarChannelPersistence` | ||
- `PulsarChannelBinding.persistence` now has default value - `persistent` | ||
- `PulsarChannelBinding.retention` was extracted and renamed to `PulsarChannelRetentionDefinition` | ||
- WebSocket: | ||
- `WebSocketsChannelBinding.method` type was changed to `WebSocketsChannelMethod` | ||
- `WebSocketsChannelBinding.query` type was changed to `Schema` | ||
- `WebSocketsChannelBinding.headers` type was changed to `Schema` | ||
- Anypoint MQ: | ||
- `AnypointMQMessageBinding.headers` type was changed to `Schema` | ||
- HTTP: | ||
- messages: | ||
- `HTTPMessageBinding.headers` type was changed to `Schema` | ||
- operations: | ||
- `HTTPOperationBinding.type` type was changed to `HTTPOperationType` | ||
- `HTTPOperationBinding.type` now has default value - `request` | ||
- `HTTPOperationBinding.method` type was changed to `HTTPOperationMethod` | ||
- `HTTPOperationBinding.query` type was changed to `Schema` | ||
- Solace: | ||
- operations: | ||
- `SolaceOperationBinding.destinations` type was changed to `List<SolaceOperationDestination>` | ||
- `SolaceDestination` was extracted end renamed to `SolaceOperationDestination` | ||
- `SolaceQueue` was renamed to `SolaceOperationQueue` | ||
- `SolaceTopic` was renamed to `SolaceOperationTopic` | ||
- MQTT: | ||
- servers: | ||
- `LastWillConfiguration` was renamed to `MQTTServerLastWillConfiguration` | ||
|
||
### Fixed | ||
|
||
- Compiling warnings - https://github.com/asyncapi/jasyncapi/pull/152 | ||
- Array schema is not being parsed correctly - https://github.com/asyncapi/jasyncapi/pull/159 | ||
|
||
## [1.0.0-EAP-2] - 2023-03-16 | ||
|
||
https://github.com/asyncapi/jasyncapi/pull/137 | ||
|
||
### Added | ||
|
||
- AsyncAPI 2.6.0 | ||
- New Bindings | ||
- New Security Schemes | ||
- Specification components now can be extended with `x-*` | ||
|
||
### Changed | ||
|
||
- Bindings now are common for `2.6.0` and `2.0.0` | ||
- Schema now is common for `2.6.0` and `2.0.0` | ||
- Security Scheme now is common for `2.6.0` and `2.0.0` | ||
- `Schema.additionalProperties` now can be `boolean` or `Schema` | ||
- Schema.minimum, Schema.exclusiveMinimum, Schema.maximum, Schema.exclusiveMaximum now are BigDecimal: | ||
- https://github.com/asyncapi/jasyncapi/issues/97 | ||
- https://github.com/asyncapi/jasyncapi/issues/96 | ||
|
||
### Fixed | ||
|
||
- Specification components doesn't overrides given ObjectMapper - https://github.com/asyncapi/jasyncapi/issues/128 | ||
- 2.0.0 - typo in Components serverBindings: ServerBinding instead of ServerBindingsDeserializer | ||
- 2.0.0 - fixed typo in ServerVariable field name - example was renamed to examples | ||
- Error while parsing of specifications when Reference was recognized as Schema | ||
|
||
## [1.0.0-EAP-1] - 2021-03-08 | ||
|
||
https://github.com/asyncapi/jasyncapi/pull/35 | ||
|
||
### Changed | ||
|
||
- `com.asyncapi.v2.schema.Schema` field `enumValues` was renamed to `enumValue` | ||
- `com.asyncapi.v2.model.schema.Type` was changed to class | ||
- Updated description of `examples` for `com.asyncapi.v2.model.channel.message.Message` | ||
|
||
## [1.0.0-EAP] - 2021-02-08 | ||
|
||
Initial release of AsyncAPI 2.0.0 | ||
|
||
https://github.com/asyncapi/jasyncapi/pull/31 | ||
|
||
### Added | ||
|
||
- AsyncAPI 2.0.0 |
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
93 changes: 93 additions & 0 deletions
93
asyncapi-core/src/test/kotlin/com/asyncapi/examples/v2/_0_0/AbstractExampleValidationTest.kt
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,93 @@ | ||
package com.asyncapi.examples.v2._0_0 | ||
|
||
import com.asyncapi.v3.ClasspathUtils | ||
import com.asyncapi.v2._0_0.model.AsyncAPI | ||
import com.asyncapi.v2._0_0.model.component.Components | ||
import com.asyncapi.v2._0_0.model.info.Info | ||
import com.fasterxml.jackson.annotation.JsonInclude | ||
import com.fasterxml.jackson.databind.ObjectMapper | ||
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory | ||
import org.junit.jupiter.api.Assertions | ||
import org.junit.jupiter.api.Test | ||
|
||
abstract class AbstractExampleValidationTest { | ||
|
||
private val objectMapper = ObjectMapper(YAMLFactory()) | ||
.setSerializationInclusion(JsonInclude.Include.NON_NULL) | ||
|
||
abstract fun specificationLocation(): String | ||
|
||
private fun specification(): AsyncAPI { | ||
return objectMapper.readValue( | ||
ClasspathUtils.readAsString(specificationLocation()), | ||
AsyncAPI::class.java | ||
) | ||
} | ||
|
||
open fun expectedId(): String? = null | ||
|
||
@Test | ||
fun `ensure that id was read correctly`() { | ||
Assertions.assertEquals( | ||
specification().id, | ||
expectedId(), | ||
"id must be read correctly" | ||
) | ||
} | ||
|
||
open fun expectedDefaultContentType(): String? = null | ||
|
||
@Test | ||
fun `ensure that defaultContentType was read correctly`() { | ||
Assertions.assertEquals( | ||
specification().defaultContentType, | ||
expectedDefaultContentType(), | ||
"defaultContentType must be read correctly" | ||
) | ||
} | ||
|
||
abstract fun expectedInfo(): Info | ||
|
||
@Test | ||
fun `ensure that info was read correctly`() { | ||
Assertions.assertEquals( | ||
specification().info, | ||
expectedInfo(), | ||
"Info must be read correctly" | ||
) | ||
} | ||
|
||
abstract fun expectedServers(): Map<String, Any>? | ||
|
||
@Test | ||
fun `ensure that servers were read correctly`() { | ||
Assertions.assertEquals( | ||
specification().servers, | ||
expectedServers(), | ||
"Servers must be read correctly" | ||
) | ||
} | ||
|
||
abstract fun expectedChannels(): Map<String, Any> | ||
|
||
@Test | ||
fun `ensure that channels were read correctly`() { | ||
Assertions.assertEquals( | ||
specification().channels, | ||
expectedChannels(), | ||
"Channels must be read correctly" | ||
) | ||
} | ||
|
||
abstract fun expectedComponents(): Components? | ||
|
||
@Test | ||
fun `ensure that components were read correctly`() { | ||
Assertions.assertEquals( | ||
specification().components, | ||
expectedComponents(), | ||
"Components must be read correctly" | ||
) | ||
} | ||
|
||
} |
76 changes: 76 additions & 0 deletions
76
asyncapi-core/src/test/kotlin/com/asyncapi/examples/v2/_0_0/AnyOf.kt
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,76 @@ | ||
package com.asyncapi.examples.v2._0_0 | ||
|
||
import com.asyncapi.v2.Reference | ||
import com.asyncapi.v2._0_0.model.channel.ChannelItem | ||
import com.asyncapi.v2._0_0.model.channel.message.Message | ||
import com.asyncapi.v2._0_0.model.channel.operation.Operation | ||
import com.asyncapi.v2._0_0.model.component.Components | ||
import com.asyncapi.v2._0_0.model.info.Info | ||
import com.asyncapi.v2.schema.Schema | ||
|
||
class AnyOf: AbstractExampleValidationTest() { | ||
|
||
override fun specificationLocation(): String = "/examples/v2.0.0/anyof.yml" | ||
|
||
override fun expectedInfo(): Info { | ||
return Info.builder() | ||
.title("AnyOf example") | ||
.version("1.0.0") | ||
.build() | ||
} | ||
|
||
override fun expectedServers(): Map<String, Any>? = null | ||
|
||
override fun expectedChannels(): Map<String, Any> { | ||
return mapOf( | ||
Pair("test", ChannelItem.builder() | ||
.publish(Operation.builder() | ||
.message(Reference("#/components/messages/testMessages")) | ||
.build() | ||
) | ||
.build() | ||
) | ||
) | ||
} | ||
|
||
override fun expectedComponents(): Components? { | ||
return Components.builder() | ||
.messages(mapOf( | ||
Pair("testMessages", Message.builder() | ||
.payload(Schema.builder() | ||
.anyOf(listOf( | ||
Schema.builder().ref("#/components/schemas/objectWithKey").build(), | ||
Schema.builder().ref("#/components/schemas/objectWithKey2").build(), | ||
)) | ||
.build() | ||
) | ||
.build() | ||
) | ||
)) | ||
.schemas(mapOf( | ||
Pair("objectWithKey", Schema.builder() | ||
.type("object") | ||
.properties(mapOf( | ||
Pair("key", Schema.builder() | ||
.type("string") | ||
.additionalProperties(false) | ||
.build() | ||
) | ||
)) | ||
.build() | ||
), | ||
Pair("objectWithKey2", Schema.builder() | ||
.type("object") | ||
.properties(mapOf( | ||
Pair("key2", Schema.builder() | ||
.type("string") | ||
.build() | ||
) | ||
)) | ||
.build() | ||
) | ||
)) | ||
.build() | ||
} | ||
|
||
} |
Oops, something went wrong.