Skip to content

Commit eaf536d

Browse files
chore: move domain (#77)
* feat: Implement message model annotations (#43) * feat - Implement message model annotations * chore - Remove unused dependencies * feat: Process message and schema annotations (#44) * feat - Implement Message annotation processing * feat - Merge annotation components * feat - Add schema annotation processor * refactor - Make annotation processor context dynamic test - Add annotation provider integration test * chore - ktlint format * refactor - Refactor dependency management --------- Co-authored-by: lorenzsimon <[email protected]> * feat: Channel annotation processing (#45) * feat - Add Channel and Operation annotations * feat - Add Channel processing * refactor - Annotation keys to values * chore - Fix confusing test values * refactor: Annotation mapping (#47) * refactor - Annotation mapping improvements * refactor - Add option for inline messages and schemas * refactor - Use classname for channel component keys if autogenerated * fix - Typo * test - Fix Schemas test * feat: Add Kotlin module to model resolver (#48) feat - Add Kotlin module to model resolver * feat: Bind channels to annotation components (#49) * refactor - Context providers * feat - Bind channels to annotation components * refactor - Annotation components binding * chore - Format * chore: Add Spring Boot example application (#63) * chore: Add Spring Boot example application * fix: Java version * fix: Test * chore: Bump dependencies (#65) * chore: Bump dependencies * chore: Bump dependencies * chore: Set Java version in GH actions * fix: Autoconfig migration * fix: Migrate Jakarta * chore: Refactor data objects (#67) * chore: Revert * release: 3.0.3 * pre-release: 3.0.4 * feat: Add Ktor integration (#72) * docs: Update Spring support * pre-release: 3.0.4 (#70) * docs: Link Spring Boot example * Add Ktor integration * Fix content type * Fix test * Fix test * Add Script extension * Add Script extension * Refactor * Add plugin integration test * Add docs for ktor integration * Move to new domain namespace * Fix kts example usage * Move domain * Bump dependencies --------- Co-authored-by: Lorenz Simon <[email protected]>
1 parent d72b79f commit eaf536d

File tree

140 files changed

+637
-637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+637
-637
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
![Logo](.github/assets/kotlin_asyncapi_logo.png)
22
[![Apache License 2](https://img.shields.io/badge/license-ASF2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.txt)
3-
[![Build status](https://github.com/OpenFolder/kotlin-asyncapi/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/OpenFolder/kotlin-asyncapi/actions/workflows/build.yml)
4-
[![Qodana](https://github.com/OpenFolder/kotlin-asyncapi/actions/workflows/qodana.yml/badge.svg?branch=master)](https://openfolder.github.io/kotlin-asyncapi/qodana/report)
5-
[![Maven Central status](https://img.shields.io/maven-central/v/org.openfolder/kotlin-asyncapi-parent.svg)](https://search.maven.org/#search%7Cga%7C1%7Corg.openfolder%20kotlin-asyncapi)
3+
[![Build status](https://github.com/asyncapi/kotlin-asyncapi/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/asyncapi/kotlin-asyncapi/actions/workflows/build.yml)
4+
[![Qodana](https://github.com/asyncapi/kotlin-asyncapi/actions/workflows/qodana.yml/badge.svg?branch=master)](https://asyncapi.github.io/kotlin-asyncapi/qodana/report)
5+
[![Maven Central status](https://img.shields.io/maven-central/v/com.asyncapi/kotlin-asyncapi-parent.svg)](https://search.maven.org/#search%7Cga%7C1%7Ccom.asyncapi%20kotlin-asyncapi)
66

77
> [!NOTE]
88
> Spring Framework 6 / Spring Boot 3 is supported since `6.0.14` / `3.1.6`
@@ -165,7 +165,7 @@ data class ChatMessage(
165165
```
166166
```xml
167167
<dependency>
168-
<groupId>org.openfolder</groupId>
168+
<groupId>com.asyncapi</groupId>
169169
<artifactId>kotlin-asyncapi-spring-web</artifactId>
170170
<version>${kotlin-asyncapi.version}</version>
171171
</dependency>
@@ -225,7 +225,7 @@ data class ChatMessage(
225225
```
226226
```xml
227227
<dependency>
228-
<groupId>org.openfolder</groupId>
228+
<groupId>com.asyncapi</groupId>
229229
<artifactId>kotlin-asyncapi-ktor</artifactId>
230230
<version>${kotlin-asyncapi.version}</version>
231231
</dependency>
@@ -275,7 +275,7 @@ servers {
275275
```
276276
```xml
277277
<plugin>
278-
<groupId>org.openfolder</groupId>
278+
<groupId>com.asyncapi</groupId>
279279
<artifactId>kotlin-asyncapi-maven-plugin</artifactId>
280280
<version>${kotlin-asyncapi.version}</version>
281281
<executions>

kotlin-asyncapi-annotation/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44

55
<parent>
6-
<groupId>org.openfolder</groupId>
6+
<groupId>com.asyncapi</groupId>
77
<artifactId>kotlin-asyncapi-parent</artifactId>
88
<version>3.0.4-SNAPSHOT</version>
99
</parent>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.openfolder.kotlinasyncapi.annotation
1+
package com.asyncapi.kotlinasyncapi.annotation
22

33
@Target(AnnotationTarget.ANNOTATION_CLASS)
44
annotation class AsyncApiAnnotation
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.openfolder.kotlinasyncapi.annotation
1+
package com.asyncapi.kotlinasyncapi.annotation
22

33
annotation class CorrelationID(
44
val isDefault: kotlin.Boolean = false,
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.openfolder.kotlinasyncapi.annotation
1+
package com.asyncapi.kotlinasyncapi.annotation
22

33
annotation class ExternalDocumentation(
44
val isDefault: kotlin.Boolean = false,

kotlin-asyncapi-annotation/src/main/kotlin/org/openfolder/kotlinasyncapi/annotation/Primitive.kt renamed to kotlin-asyncapi-annotation/src/main/kotlin/com/asyncapi/kotlinasyncapi/annotation/Primitive.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.openfolder.kotlinasyncapi.annotation
1+
package com.asyncapi.kotlinasyncapi.annotation
22

33
annotation class Int(
44
val value: kotlin.Int = 0,

kotlin-asyncapi-annotation/src/main/kotlin/org/openfolder/kotlinasyncapi/annotation/Schema.kt renamed to kotlin-asyncapi-annotation/src/main/kotlin/com/asyncapi/kotlinasyncapi/annotation/Schema.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.openfolder.kotlinasyncapi.annotation
1+
package com.asyncapi.kotlinasyncapi.annotation
22

33
import kotlin.reflect.KClass
44

kotlin-asyncapi-annotation/src/main/kotlin/org/openfolder/kotlinasyncapi/annotation/Tag.kt renamed to kotlin-asyncapi-annotation/src/main/kotlin/com/asyncapi/kotlinasyncapi/annotation/Tag.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.openfolder.kotlinasyncapi.annotation
1+
package com.asyncapi.kotlinasyncapi.annotation
22

33
annotation class Tag(
44
val isDefault: kotlin.Boolean = false,
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package org.openfolder.kotlinasyncapi.annotation.channel
1+
package com.asyncapi.kotlinasyncapi.annotation.channel
22

3-
import org.openfolder.kotlinasyncapi.annotation.AsyncApiAnnotation
3+
import com.asyncapi.kotlinasyncapi.annotation.AsyncApiAnnotation
44

55
@Target(
66
AnnotationTarget.CLASS,
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package org.openfolder.kotlinasyncapi.annotation.channel
1+
package com.asyncapi.kotlinasyncapi.annotation.channel
22

3-
import org.openfolder.kotlinasyncapi.annotation.Boolean
4-
import org.openfolder.kotlinasyncapi.annotation.Int
5-
import org.openfolder.kotlinasyncapi.annotation.Schema
3+
import com.asyncapi.kotlinasyncapi.annotation.Boolean
4+
import com.asyncapi.kotlinasyncapi.annotation.Int
5+
import com.asyncapi.kotlinasyncapi.annotation.Schema
66

77
annotation class ChannelBindings(
88
val isDefault: kotlin.Boolean = false,
+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package org.openfolder.kotlinasyncapi.annotation.channel
1+
package com.asyncapi.kotlinasyncapi.annotation.channel
22

3-
import org.openfolder.kotlinasyncapi.annotation.AsyncApiAnnotation
4-
import org.openfolder.kotlinasyncapi.annotation.CorrelationID
5-
import org.openfolder.kotlinasyncapi.annotation.ExternalDocumentation
6-
import org.openfolder.kotlinasyncapi.annotation.Schema
7-
import org.openfolder.kotlinasyncapi.annotation.Tag
3+
import com.asyncapi.kotlinasyncapi.annotation.AsyncApiAnnotation
4+
import com.asyncapi.kotlinasyncapi.annotation.CorrelationID
5+
import com.asyncapi.kotlinasyncapi.annotation.ExternalDocumentation
6+
import com.asyncapi.kotlinasyncapi.annotation.Schema
7+
import com.asyncapi.kotlinasyncapi.annotation.Tag
88
import kotlin.reflect.KClass
99

1010
@Target(
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package org.openfolder.kotlinasyncapi.annotation.channel
1+
package com.asyncapi.kotlinasyncapi.annotation.channel
22

3-
import org.openfolder.kotlinasyncapi.annotation.Int
4-
import org.openfolder.kotlinasyncapi.annotation.Schema
3+
import com.asyncapi.kotlinasyncapi.annotation.Int
4+
import com.asyncapi.kotlinasyncapi.annotation.Schema
55

66
annotation class MessageBindings(
77
val isDefault: Boolean = false,
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.openfolder.kotlinasyncapi.annotation.channel
1+
package com.asyncapi.kotlinasyncapi.annotation.channel
22

33
annotation class MessageExample(
44
val isDefault: Boolean = false,
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package org.openfolder.kotlinasyncapi.annotation.channel
1+
package com.asyncapi.kotlinasyncapi.annotation.channel
22

3-
import org.openfolder.kotlinasyncapi.annotation.CorrelationID
4-
import org.openfolder.kotlinasyncapi.annotation.ExternalDocumentation
5-
import org.openfolder.kotlinasyncapi.annotation.Schema
6-
import org.openfolder.kotlinasyncapi.annotation.Tag
3+
import com.asyncapi.kotlinasyncapi.annotation.CorrelationID
4+
import com.asyncapi.kotlinasyncapi.annotation.ExternalDocumentation
5+
import com.asyncapi.kotlinasyncapi.annotation.Schema
6+
import com.asyncapi.kotlinasyncapi.annotation.Tag
77

88
annotation class MessageTrait(
99
val isDefault: Boolean = false,
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package org.openfolder.kotlinasyncapi.annotation.channel
1+
package com.asyncapi.kotlinasyncapi.annotation.channel
22

3-
import org.openfolder.kotlinasyncapi.annotation.AsyncApiAnnotation
4-
import org.openfolder.kotlinasyncapi.annotation.ExternalDocumentation
5-
import org.openfolder.kotlinasyncapi.annotation.Tag
3+
import com.asyncapi.kotlinasyncapi.annotation.AsyncApiAnnotation
4+
import com.asyncapi.kotlinasyncapi.annotation.ExternalDocumentation
5+
import com.asyncapi.kotlinasyncapi.annotation.Tag
66

77
@Target(
88
AnnotationTarget.FUNCTION,
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package org.openfolder.kotlinasyncapi.annotation.channel
1+
package com.asyncapi.kotlinasyncapi.annotation.channel
22

3-
import org.openfolder.kotlinasyncapi.annotation.Boolean
4-
import org.openfolder.kotlinasyncapi.annotation.Int
5-
import org.openfolder.kotlinasyncapi.annotation.Schema
3+
import com.asyncapi.kotlinasyncapi.annotation.Boolean
4+
import com.asyncapi.kotlinasyncapi.annotation.Int
5+
import com.asyncapi.kotlinasyncapi.annotation.Schema
66

77
annotation class OperationBindings(
88
val isDefault: kotlin.Boolean = false,
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package org.openfolder.kotlinasyncapi.annotation.channel
1+
package com.asyncapi.kotlinasyncapi.annotation.channel
22

3-
import org.openfolder.kotlinasyncapi.annotation.ExternalDocumentation
4-
import org.openfolder.kotlinasyncapi.annotation.Tag
3+
import com.asyncapi.kotlinasyncapi.annotation.ExternalDocumentation
4+
import com.asyncapi.kotlinasyncapi.annotation.Tag
55

66
annotation class OperationTrait(
77
val isDefault: Boolean = false,
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package org.openfolder.kotlinasyncapi.annotation.channel
1+
package com.asyncapi.kotlinasyncapi.annotation.channel
22

3-
import org.openfolder.kotlinasyncapi.annotation.Schema
3+
import com.asyncapi.kotlinasyncapi.annotation.Schema
44

55
annotation class Parameter(
66
val value: String = "",
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.openfolder.kotlinasyncapi.annotation.channel
1+
package com.asyncapi.kotlinasyncapi.annotation.channel
22

33
annotation class SecurityRequirement(
44
val key: String = "",

kotlin-asyncapi-context/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44

55
<parent>
6-
<groupId>org.openfolder</groupId>
6+
<groupId>com.asyncapi</groupId>
77
<artifactId>kotlin-asyncapi-parent</artifactId>
88
<version>3.0.4-SNAPSHOT</version>
99
</parent>
@@ -16,15 +16,15 @@
1616

1717
<dependencies>
1818
<dependency>
19-
<groupId>org.openfolder</groupId>
19+
<groupId>com.asyncapi</groupId>
2020
<artifactId>kotlin-asyncapi-core</artifactId>
2121
</dependency>
2222
<dependency>
23-
<groupId>org.openfolder</groupId>
23+
<groupId>com.asyncapi</groupId>
2424
<artifactId>kotlin-asyncapi-script</artifactId>
2525
</dependency>
2626
<dependency>
27-
<groupId>org.openfolder</groupId>
27+
<groupId>com.asyncapi</groupId>
2828
<artifactId>kotlin-asyncapi-annotation</artifactId>
2929
</dependency>
3030
<dependency>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.asyncapi.kotlinasyncapi.context
2+
3+
import com.asyncapi.kotlinasyncapi.model.AsyncApi
4+
5+
interface AsyncApiContextProvider {
6+
7+
val asyncApi: AsyncApi?
8+
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package org.openfolder.kotlinasyncapi.context
1+
package com.asyncapi.kotlinasyncapi.context
22

3-
import org.openfolder.kotlinasyncapi.model.AsyncApi
3+
import com.asyncapi.kotlinasyncapi.model.AsyncApi
44

55
class PackageInfoProvider(
66
private val applicationPackage: Package?

kotlin-asyncapi-context/src/main/kotlin/org/openfolder/kotlinasyncapi/context/ResourceProvider.kt renamed to kotlin-asyncapi-context/src/main/kotlin/com/asyncapi/kotlinasyncapi/context/ResourceProvider.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package org.openfolder.kotlinasyncapi.context
1+
package com.asyncapi.kotlinasyncapi.context
22

33
import com.fasterxml.jackson.annotation.JsonInclude
44
import com.fasterxml.jackson.databind.ObjectMapper
5-
import org.openfolder.kotlinasyncapi.model.AsyncApi
5+
import com.asyncapi.kotlinasyncapi.model.AsyncApi
66

77
class ResourceProvider(path: String) : AsyncApiContextProvider {
88

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
package org.openfolder.kotlinasyncapi.context.annotation
1+
package com.asyncapi.kotlinasyncapi.context.annotation
22

3-
import org.openfolder.kotlinasyncapi.annotation.AsyncApiAnnotation
4-
import org.openfolder.kotlinasyncapi.annotation.Schema
5-
import org.openfolder.kotlinasyncapi.annotation.channel.Channel
6-
import org.openfolder.kotlinasyncapi.annotation.channel.Message
7-
import org.openfolder.kotlinasyncapi.context.AsyncApiContextProvider
8-
import org.openfolder.kotlinasyncapi.context.annotation.processor.AnnotationProcessor
9-
import org.openfolder.kotlinasyncapi.model.AsyncApi
10-
import org.openfolder.kotlinasyncapi.model.ReferencableCorrelationIDsMap
11-
import org.openfolder.kotlinasyncapi.model.ReferencableSchemasMap
12-
import org.openfolder.kotlinasyncapi.model.channel.ReferencableChannelBindingsMap
13-
import org.openfolder.kotlinasyncapi.model.channel.ReferencableChannelsMap
14-
import org.openfolder.kotlinasyncapi.model.channel.ReferencableMessageBindingsMap
15-
import org.openfolder.kotlinasyncapi.model.channel.ReferencableMessageTraitsMap
16-
import org.openfolder.kotlinasyncapi.model.channel.ReferencableMessagesMap
17-
import org.openfolder.kotlinasyncapi.model.channel.ReferencableOperationBindingsMap
18-
import org.openfolder.kotlinasyncapi.model.channel.ReferencableOperationTraitsMap
19-
import org.openfolder.kotlinasyncapi.model.channel.ReferencableParametersMap
20-
import org.openfolder.kotlinasyncapi.model.component.Components
21-
import org.openfolder.kotlinasyncapi.model.component.ReferencableSecuritySchemasMap
22-
import org.openfolder.kotlinasyncapi.model.server.ReferencableServerBindingsMap
23-
import org.openfolder.kotlinasyncapi.model.server.ReferencableServerVariablesMap
24-
import org.openfolder.kotlinasyncapi.model.server.ReferencableServersMap
3+
import com.asyncapi.kotlinasyncapi.annotation.AsyncApiAnnotation
4+
import com.asyncapi.kotlinasyncapi.annotation.Schema
5+
import com.asyncapi.kotlinasyncapi.annotation.channel.Channel
6+
import com.asyncapi.kotlinasyncapi.annotation.channel.Message
7+
import com.asyncapi.kotlinasyncapi.context.AsyncApiContextProvider
8+
import com.asyncapi.kotlinasyncapi.context.annotation.processor.AnnotationProcessor
9+
import com.asyncapi.kotlinasyncapi.model.AsyncApi
10+
import com.asyncapi.kotlinasyncapi.model.ReferencableCorrelationIDsMap
11+
import com.asyncapi.kotlinasyncapi.model.ReferencableSchemasMap
12+
import com.asyncapi.kotlinasyncapi.model.channel.ReferencableChannelBindingsMap
13+
import com.asyncapi.kotlinasyncapi.model.channel.ReferencableChannelsMap
14+
import com.asyncapi.kotlinasyncapi.model.channel.ReferencableMessageBindingsMap
15+
import com.asyncapi.kotlinasyncapi.model.channel.ReferencableMessageTraitsMap
16+
import com.asyncapi.kotlinasyncapi.model.channel.ReferencableMessagesMap
17+
import com.asyncapi.kotlinasyncapi.model.channel.ReferencableOperationBindingsMap
18+
import com.asyncapi.kotlinasyncapi.model.channel.ReferencableOperationTraitsMap
19+
import com.asyncapi.kotlinasyncapi.model.channel.ReferencableParametersMap
20+
import com.asyncapi.kotlinasyncapi.model.component.Components
21+
import com.asyncapi.kotlinasyncapi.model.component.ReferencableSecuritySchemasMap
22+
import com.asyncapi.kotlinasyncapi.model.server.ReferencableServerBindingsMap
23+
import com.asyncapi.kotlinasyncapi.model.server.ReferencableServerVariablesMap
24+
import com.asyncapi.kotlinasyncapi.model.server.ReferencableServersMap
2525
import kotlin.reflect.KClass
2626
import kotlin.reflect.full.findAnnotation
2727

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.openfolder.kotlinasyncapi.context.annotation
1+
package com.asyncapi.kotlinasyncapi.context.annotation
22

33
import io.github.classgraph.ClassGraph
44
import kotlin.reflect.KClass
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.asyncapi.kotlinasyncapi.context.annotation.processor
2+
3+
import com.asyncapi.kotlinasyncapi.model.component.Components
4+
5+
interface AnnotationProcessor<T, U> {
6+
fun process(annotation: T, context: U): Components
7+
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package org.openfolder.kotlinasyncapi.context.annotation.processor
1+
package com.asyncapi.kotlinasyncapi.context.annotation.processor
22

3-
import org.openfolder.kotlinasyncapi.annotation.channel.Channel
4-
import org.openfolder.kotlinasyncapi.annotation.channel.Publish
5-
import org.openfolder.kotlinasyncapi.annotation.channel.Subscribe
6-
import org.openfolder.kotlinasyncapi.model.component.Components
3+
import com.asyncapi.kotlinasyncapi.annotation.channel.Channel
4+
import com.asyncapi.kotlinasyncapi.annotation.channel.Publish
5+
import com.asyncapi.kotlinasyncapi.annotation.channel.Subscribe
6+
import com.asyncapi.kotlinasyncapi.model.component.Components
77
import kotlin.reflect.KClass
88
import kotlin.reflect.full.findAnnotation
99
import kotlin.reflect.full.functions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.openfolder.kotlinasyncapi.context.annotation.processor
1+
package com.asyncapi.kotlinasyncapi.context.annotation.processor
22

33
import com.fasterxml.jackson.module.kotlin.registerKotlinModule
44
import io.swagger.v3.core.converter.ModelConverters

0 commit comments

Comments
 (0)