-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
build.gradle:
plugins {
id "com.sngular.scs-multiapi-gradle-plugin" version "6.1.0"
}
def asyncapiSpec = "${projectDir}/asyncapi.yml"
if (!file(asyncapiSpec).exists()) {
throw new GradleException("AsyncAPI spec not found at: ${asyncapiSpecPath}")
}
asyncapimodel {
specFile {
filePath = "${asyncapiSpec}"
supplier {
ids = ["orderCreated"]
apiPackage = 'com.rs.sample.api.model.event.consumer'
modelPackage = 'com.rs.sample.api.model.event'
}
consumer {
ids = ["orderCreated"]
apiPackage = 'com.rs.sample.api.model.event.producer'
modelPackage = 'com.rs.sample.api.model.event'
}
}
overWriteModel = true
springBootVersion = 35
}
asyncapi.yml:
asyncapi: '2.6.0'
info:
title: OrderEvents
version: '1.0.0'
channels:
order.created:
publish:
operationId: orderCreated
message:
$ref: '#/components/messages/OrderCreated'
components:
messages:
OrderCreated:
payload:
type: object
properties:
id:
type: string
amount:
type: number
files structure:
tree src/adapters/messaging --filesfirst
src/adapters/messaging
├── asyncapi.yml
├── build.gradle
Gradle task output:
gradle asyncApiTask --rerun-tasks
NOTE: Picked up JDK_JAVA_OPTIONS: -Djdk.attach.allowAttachSelf=true
Starting a Gradle Daemon (subsequent builds will be faster)
BUILD SUCCESSFUL in 10s
1 actionable task: 1 executed
gradle version:
gradle --version
NOTE: Picked up JDK_JAVA_OPTIONS: -Djdk.attach.allowAttachSelf=true
------------------------------------------------------------
Gradle 8.14.4
------------------------------------------------------------
Build time: 2026-01-23 16:30:23 UTC
Revision: ad5ff774b4b0e9a8a0cf1a14ca70d7230003c3ad
Kotlin: 2.0.21
Groovy: 3.0.25
Ant: Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM: 21.0.8 (Eclipse Adoptium 21.0.8+9-LTS)
Daemon JVM: /home/rpieczon/.sdkman/candidates/java/21.0.8-tem (no JDK specified, using current Java home)
OS: Linux 6.18.3-200.fc43.x86_64 amd64
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels