Skip to content

fix: dynamic topic params out of order and non-bean methods added to application.yml #286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

CameronRushton
Copy link
Member

@CameronRushton CameronRushton commented Aug 24, 2022

Description
Dynamic bindings had two issues.

  1. A topic that was my/topic/{var1}/{var2} may generate code building the string like String.format("my/topic/%s/%s", var2, var1); which has the variables out of order.
    The logic for constructing these variable params has been refactored and sorted based on the position the variable is found in the topic. This means the variables can be listed in any order in the asyncAPI document and the code will always generate the correct order. Caveat: We can't have the same variable twice in the topic.

  2. The dynamic binding that was a supplier of type streamBridge, doesn't get created as a bean. It was expected for this function to not be added to application.yml, so now the dynamic bindings that fit that description to not be beans are no longer added to application.yml.

Additionally, I've given the test folders names based on the test name to make testing easier.

Fixes #240

…uded in the generated application.yml file; order of variables in topic are fixed
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@CameronRushton CameronRushton merged commit db808d4 into asyncapi:master Aug 25, 2022
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.13.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test folder names are not descriptive
4 participants