-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(generic-binding): Move
@AsyncGenericOperationBinding
to own addon
- Loading branch information
Showing
16 changed files
with
190 additions
and
129 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
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
Empty file.
Empty file.
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,45 @@ | ||
# Springwolf Generic Binding Add-on | ||
|
||
### Table Of Contents | ||
|
||
- [About](#about) | ||
- [Usage](#usage) | ||
- [Dependencies](#dependencies) | ||
- [Code](#code) | ||
|
||
### About | ||
|
||
This module allows to document any binding in a generic way. | ||
|
||
It is intended to document fields that are not yet support by Springwolf and/or AsyncApi. | ||
It can also be used to document vendor-specific protocols or properties. | ||
|
||
There exists no validation on key or value names. | ||
|
||
### Usage | ||
|
||
Add the following dependency: | ||
|
||
#### Dependencies | ||
|
||
```groovy | ||
dependencies { | ||
implementation 'io.github.springwolf:springwolf-generic-binding:0.1.1' | ||
} | ||
``` | ||
|
||
#### Code | ||
|
||
```java | ||
class TestClass { | ||
@AsyncPublisher( | ||
// ... | ||
) | ||
@AsyncGenericOperationBinding( | ||
type = "custom-sqs", | ||
fields = {"internal-field=customValue", "nested.key=nestedValue"}) | ||
public void sendMessage(AnotherPayloadDto msg) { | ||
// ... | ||
} | ||
} | ||
``` |
51 changes: 51 additions & 0 deletions
51
springwolf-add-ons/springwolf-generic-binding/build.gradle
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,51 @@ | ||
plugins { | ||
id 'java-library' | ||
|
||
id 'org.springframework.boot' | ||
id 'io.spring.dependency-management' | ||
id 'ca.cutterslade.analyze' | ||
} | ||
|
||
dependencies { | ||
api project(":springwolf-core") | ||
|
||
implementation "com.asyncapi:asyncapi-core:${asyncapiCoreVersion}" | ||
implementation "org.slf4j:slf4j-api:${slf4jApiVersion}" | ||
|
||
implementation "org.springframework:spring-context" | ||
implementation "org.springframework:spring-core" | ||
|
||
annotationProcessor "org.projectlombok:lombok:${lombokVersion}" | ||
|
||
testImplementation "org.assertj:assertj-core:${assertjCoreVersion}" | ||
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}" | ||
testRuntimeOnly "org.junit.jupiter:junit-jupiter:${junitJupiterVersion}" | ||
} | ||
|
||
jar { | ||
enabled = true | ||
archiveClassifier = '' | ||
} | ||
bootJar.enabled = false | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
test { | ||
dependsOn spotlessApply // Automatically fix code formatting if possible | ||
|
||
useJUnitPlatform() | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
pom { | ||
name = 'springwolf-generic-binding' | ||
description = 'Document any AsyncApi binding in Springwolf using a generic way' | ||
} | ||
} | ||
} | ||
} |
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
4 changes: 2 additions & 2 deletions
4
...syncGenericOperationBindingProcessor.java → ...syncGenericOperationBindingProcessor.java
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
2 changes: 1 addition & 1 deletion
2
.../annotation/processor/PropertiesUtil.java → .../annotation/processor/PropertiesUtil.java
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
Oops, something went wrong.