Skip to content

Commit a8901bc

Browse files
committed
docs: asyncapi-generator
1 parent 7f45818 commit a8901bc

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

plugins/asyncapi-generator/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
![AsyncAPI and Spring Cloud Streams 3](../../docs/ZenWave360-AsyncAPI-SpringCloudStreams.excalidraw.svg)
88

9-
The ZenWave AsyncAPI Generator solves a long-standing issue in event-driven Java applications: keeping message models and channel contracts fully aligned with their AsyncAPI specification. It provides build-time read-only code generation from AsyncAPI files sourced from their canonical locations: local files, classpath resources, or authenticated remote URLs.
9+
The ZenWave AsyncAPI Generator solves a long-standing issue in event-driven Java applications:
10+
11+
👉 keeping message models and channel contracts fully aligned with their AsyncAPI specification.
12+
13+
It provides build-time read-only code generation from AsyncAPI files sourced from their canonical locations: local files, classpath resources, or authenticated remote URLs.
1014

1115
This approach eliminates API drift by enforcing the AsyncAPI file as the single source of truth for message schemas, channel definitions, and producer or consumer interfaces.
1216

@@ -212,12 +216,7 @@ tasks.register<dev.jbang.gradle.tasks.JBangTask>("generateAsyncApiProvider") {
212216
"--deps=" +
213217
"org.slf4j:slf4j-simple:1.7.36," +
214218
"io.zenwave360.sdk.plugins:asyncapi-generator:RELEASE," +
215-
"org.apache.avro:avro-compiler:1.11.1",
216-
"--java-options \"--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED\"",
217-
"--java-options \"--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED\"",
218-
"--java-options \"--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED\"",
219-
"--java-options \"--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED\"",
220-
"--java-options \"--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED\""
219+
"org.apache.avro:avro-compiler:1.11.1"
221220
))
222221
args.set(listOf(
223222
"-p", "AsyncAPIGenerator",

plugins/avro-schema-compiler/README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ It supports Avro versions from 1.8.0 up to 1.12.0.
1313
- Automatically **sorts schemas** to resolve dependencies for Avro versions prior to 1.12.0.
1414
- Ensures generated code is consistent and ready for integration in Java projects.
1515

16+
<!-- TOC -->
17+
* [Avro Schema Generator](#avro-schema-generator)
18+
* [Why use this Avro Compiler Plugin?](#why-use-this-avro-compiler-plugin)
19+
* [Usage](#usage)
20+
* [Using the ZenWave CLI](#using-the-zenwave-cli)
21+
* [Using the ZenWave Maven Plugin](#using-the-zenwave-maven-plugin)
22+
* [Gradle Usage](#gradle-usage)
23+
* [Options](#options)
24+
* [Getting Help](#getting-help)
25+
<!-- TOC -->
26+
1627
## Usage
1728

1829
### Using the ZenWave CLI
@@ -29,6 +40,16 @@ jbang zw -p io.zenwave360.sdk.plugins.AvroSchemaGeneratorPlugin \
2940
targetFolder=target/generated-sources/avro
3041
```
3142

43+
This will generate the following Java classes:
44+
45+
```shell
46+
$ find target/ -type f
47+
target/generated-sources/avro/src/main/java/io/zenwave360/example/core/outbound/events/dtos/Address.java
48+
target/generated-sources/avro/src/main/java/io/zenwave360/example/core/outbound/events/dtos/CustomerEvent.java
49+
target/generated-sources/avro/src/main/java/io/zenwave360/example/core/outbound/events/dtos/PaymentMethod.java
50+
target/generated-sources/avro/src/main/java/io/zenwave360/example/core/outbound/events/dtos/PaymentMethodType.java
51+
```
52+
3253
Generating from local folders and imports:
3354

3455
```shell
@@ -103,7 +124,7 @@ jbang zw -p io.zenwave360.sdk.plugins.AvroSchemaGeneratorPlugin \
103124

104125
NOTE: you need to exclude jackson-core and jackson-databind from avro-compiler dependency to avoid conflicts with ZenWaveSDK requirements which expect newer versions.
105126

106-
## Gradle Usage
127+
### Gradle Usage
107128

108129
```kotlin
109130
plugins {

0 commit comments

Comments
 (0)