docs: rewrite Java template tutorial to AsyncAPI v3#2029
docs: rewrite Java template tutorial to AsyncAPI v3#2029wei123-web wants to merge 4 commits intoasyncapi:masterfrom
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughUpdated the Java template tutorial to AsyncAPI v3: example document, template code, and TopicFunction now use v3 operations and server APIs; fixed duplicate log text and minor imports/newline issues in the tutorial snippets. (≤50 words) Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🚀 Docs preview deployed |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
apps/generator/docs/generator-template-java.md (1)
318-318: Wording drift: this should reference operations, not channels.Since this section migrates to AsyncAPI v3 operations, “regardless of the number of channels” is misleading here.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/generator/docs/generator-template-java.md` at line 318, The sentence currently references "channels" but this section is about AsyncAPI v3 operations; update the wording around the `TopicFunction` description to reference "operations" (or "the number of operations in the AsyncAPI v3 document") instead of "channels" so it accurately reflects that the reusable component applies regardless of operation count in the asyncAPI v3 document.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/generator/docs/generator-template-java.md`:
- Line 393: BROKER_URL is being set to server.host() which yields "host:port"
but the Paho MQTT client requires a URI with a scheme; update the assignment
that sets the static constant BROKER_URL (and the server.host() usage in the
server configuration) to prepend an appropriate scheme such as "tcp://" (e.g.,
"tcp://" + server.host()) so the value becomes a valid URI like
"tcp://test.mosquitto.org:1883" before it is used by the client.
- Around line 355-357: The template is filtering receive operations which misses
AsyncAPI operations with action: send; update getTopicsFromOperations to use
operations.filterBySend() when generating publish/send methods (replace
operations.filterByReceive() with operations.filterBySend()), and apply the same
change to other occurrences where publish methods are derived (the other places
using operations.filterByReceive() for send-method generation) so generated
TestClient sendTemperatureDrop/Rise methods match the document's action: send
operations.
---
Nitpick comments:
In `@apps/generator/docs/generator-template-java.md`:
- Line 318: The sentence currently references "channels" but this section is
about AsyncAPI v3 operations; update the wording around the `TopicFunction`
description to reference "operations" (or "the number of operations in the
AsyncAPI v3 document") instead of "channels" so it accurately reflects that the
reusable component applies regardless of operation count in the asyncAPI v3
document.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 25edfbe6-b065-444b-9743-ce85e40aeb58
📒 Files selected for processing (1)
apps/generator/docs/generator-template-java.md
|
/u |
|



Description
Rewrites the "Creating a template – Java" tutorial to use AsyncAPI v3.
Changes made:
url:withhost:in servers sectiongetTopicstogetTopicsFromOperationsindex.jsto useasyncapi.operations().filterByReceive()server.host()Related issue
Resolves #1828
Summary by CodeRabbit