...
Link: (https://github.com/sngular/scs-multiapi-plugin)
Code Block | ||||
---|---|---|---|---|
| ||||
<plugin>
<groupId>com.sngular</groupId>
<artifactId>scs-multiapi-maven-plugin</artifactId>
<version>5.3.5</version>
<executions>
<execution>
<id>asyncapi</id>
<phase>generate-sources</phase>
<goals>
<goal>asyncapi-generation</goal>
</goals>
<configuration>
<specFiles>
<specFile>
<filePath>${project.basedir}/src/main/resources/asyncapi/asyncapi.yaml</filePath>
<supplier>
<ids>sendMessage</ids>
<modelPackage>org.onap.policy.clamp.models.acm.messages.kafka.participant</modelPackage>
</supplier>
</specFile>
</specFiles>
<generatedSourcesFolder>sources-generated</generatedSourcesFolder>
</configuration>
</execution>
</executions>
</plugin> |
Code Block | ||||
---|---|---|---|---|
| ||||
asyncapi: 2.0.0
info:
title: Account Service
version: '1.0.0'
description: Manages user accounts in the system.
servers:
production:
url: kafka:9092
protocol: kafka
description: kafka broker
channels:
policy-acruntime-participant:
publish:
operationId: sendMessage
message:
$ref: '#/components/messages/ParticipantPrime'
components:
messages:
ParticipantPrime:
name: ParticipantPrime
title: ParticipantPrime
summary: Prime a composition to participants
contentType: application/json
payload:
$ref: '#/components/schemas/ParticipantPrime'
schemas:
ParticipantPrime:
type: object
properties:
messageType:
description: "Message Type"
$ref: '#/components/schemas/ParticipantMessageType'
default: 'PARTICIPANT_PRIME'
messageId:
type: string
format: uuid
timestamp:
type: string
format: dateTime
participantId:
type: string
format: uuid
compositionId:
type: string
format: uuid
ParticipantMessageType:
type: string
enum:
- PARTICIPANT_STATUS
- PARTICIPANT_STATE_CHANGE
- AUTOMATION_COMPOSITION_DEPLOY
- AUTOMATION_COMPOSITION_STATE_CHANGE
- PARTICIPANT_REGISTER
- PARTICIPANT_REGISTER_ACK
- PARTICIPANT_DEREGISTER
- PARTICIPANT_DEREGISTER_ACK
- PARTICIPANT_PRIME
- PARTICIPANT_PRIME_ACK
- AUTOMATION_COMPOSITION_DEPLOY_ACK
- AUTOMATION_COMPOSITION_STATECHANGE_ACK
- PARTICIPANT_STATUS_REQ
- PROPERTIES_UPDATE
- PARTICIPANT_RESTART
- AUTOMATION_COMPOSITION_MIGRATION |
- the plugin generates model classes with builder support; is mandatory create the bean with the builder;
- there is no support for java.util.UUID and java.time.Instant;
- appliesTo method have to be refactored;
ZenWave SDK
ZenWave SDK is a configurable and extensible toolkit for Domain Driven Design (DDD) and API-First that can generate code from a mix of different models including (MIT license):
...