Skip to content

Conversation

@asyncapi-bot
Copy link
Contributor

@asyncapi-bot asyncapi-bot commented May 12, 2025

Updated generator documentation is available and this PR introduces update to generator folder on the website

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive tutorial for creating a Java MQTT client template using AsyncAPI, including setup, code generation, Gradle configuration, and reusable template components.
    • Updated the Python template tutorial title for clarity and made minor formatting adjustments.

@netlify
Copy link

netlify bot commented May 12, 2025

Deploy Preview for asyncapi-website ready!

Name Link
🔨 Latest commit fd04a36
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/68220efa814aed00086d76a8
😎 Deploy Preview https://deploy-preview-4109--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 12, 2025

Walkthrough

A new tutorial document was added to guide users through building a Java MQTT client template using AsyncAPI, complete with project setup, code generation, Gradle configuration, and reusable template components. Additionally, the Python template tutorial’s title was clarified, and minor formatting was adjusted.

Changes

File(s) Change Summary
markdown/docs/tools/generator/generator-template-java.md Added a detailed tutorial for creating a Java MQTT client template with AsyncAPI, Gradle setup, and code generation.
markdown/docs/tools/generator/generator-template.md Changed document title to "Creating a template - Python" and removed a trailing newline.
.../template/index.js, .../components/TopicFunction.js Added exported functions for generating Java client code and dynamic topic methods in AsyncAPI templates.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant AsyncAPI Generator
    participant Template (index.js)
    participant TopicFunction Component
    participant Output Java Client

    User->>AsyncAPI Generator: Run generator with AsyncAPI doc
    AsyncAPI Generator->>Template (index.js): Pass asyncapi, params
    Template (index.js)->>TopicFunction Component: Generate topic methods from channels
    TopicFunction Component-->>Template (index.js): Return Java methods for each topic
    Template (index.js)->>Output Java Client: Assemble Client.java with topic methods
    Output Java Client-->>User: Generated Java client code
Loading

Poem

In burrows deep, with code to write,
A Java client springs to light!
AsyncAPI leads the way,
With templates bright as break of day.
Topics hop and messages flow,
Gradle builds, and tests all go—
A rabbit cheers: “Let’s MQTT, ho!” 🐇✨

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov
Copy link

codecov bot commented May 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (1bbf804) to head (fd04a36).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #4109   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          778       778           
  Branches       144       144           
=========================================
  Hits           778       778           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asyncapi-bot asyncapi-bot merged commit 7efaf9f into master May 12, 2025
32 of 34 checks passed
@asyncapi-bot asyncapi-bot deleted the update-generator-docs-9f19c224c4dab71b357cc9124c8d597c4075fbe3 branch May 12, 2025 15:12
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (5)
markdown/docs/tools/generator/generator-template.md (2)

12-15: Clarify the “React template” bullet in a Python tutorial

This Python-focused tutorial still mentions “You’ll create a React template,” which may confuse readers. Consider rephrasing to emphasize that you’re using the React render engine of the AsyncAPI generator to build a Python template (e.g., “You’ll create a template using the generator-react-sdk engine to produce Python code”).

🧰 Tools
🪛 LanguageTool

[style] ~14-~14: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... the MQTT client in this project. - You'll create a React template that will us...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


374-374: Remove invalid comment from JSON snippet

JSON does not support # comments. The snippet in package.json showing # ...(redacted for brevity) may confuse readers. Either remove the comment or convert it into a note outside the code block.

markdown/docs/tools/generator/generator-template-java.md (3)

30-30: Unify “sub-directories” spelling

The term “sub-directories” is typically spelled “subdirectories” in technical docs. Consider updating to improve consistency.

🧰 Tools
🪛 LanguageTool

[misspelling] ~30-~30: This word is normally spelled as one.
Context: ...hat is done, you should create some new sub-directories to begin building your Java client. 1...

(EN_COMPOUNDS_SUB_DIRECTORIES)


39-46: Add language identifiers to directory-tree code blocks

Several code fences showing the project directory structure lack a language specifier. For better syntax highlighting and linting, consider using text or bash for these tree diagrams:

bash

Also applies to: 181-193, 431-437

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

40-40: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


233-233: Remove trailing period in heading

The heading

### 4. Output Java template code.

should omit the period for consistency with other headings (e.g., ### 3. Test the Java Client).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

233-233: Trailing punctuation in heading
Punctuation: '.'

(MD026, no-trailing-punctuation)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1bbf804 and fd04a36.

📒 Files selected for processing (2)
  • markdown/docs/tools/generator/generator-template-java.md (1 hunks)
  • markdown/docs/tools/generator/generator-template.md (2 hunks)
🧰 Additional context used
🪛 LanguageTool
markdown/docs/tools/generator/generator-template-java.md

[misspelling] ~30-~30: This word is normally spelled as one.
Context: ...hat is done, you should create some new sub-directories to begin building your Java client. 1...

(EN_COMPOUNDS_SUB_DIRECTORIES)


[style] ~34-~34: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...plate#background-context) into it. 4. Create a new file named package.json in yo...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~234-~234: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ... index.js and copy the content below so your file looks like the code snippet b...

(COMMA_COMPOUND_SENTENCE_2)

🪛 markdownlint-cli2 (0.17.2)
markdown/docs/tools/generator/generator-template-java.md

13-13: Bare URL used
null

(MD034, no-bare-urls)


14-14: Bare URL used
null

(MD034, no-bare-urls)


40-40: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


103-103: Headings must start at the beginning of the line
null

(MD023, heading-start-left)


136-136: Headings must start at the beginning of the line
null

(MD023, heading-start-left)


182-182: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


233-233: Trailing punctuation in heading
Punctuation: '.'

(MD026, no-trailing-punctuation)


433-433: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 180000ms (2)
  • GitHub Check: Automerge PR autoapproved by a bot
  • GitHub Check: Lighthouse CI
🔇 Additional comments (1)
markdown/docs/tools/generator/generator-template.md (1)

2-2: Title Clarification Approved

The updated title "Creating a template - Python" clearly specifies the language focus for this tutorial and aligns with best practices for language-specific documentation.


## Prerequisites

To run it, ensure you have Java JDK 8 or higher, Gradle, and the AsyncAPI generator.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Include AsyncAPI CLI in Prerequisites

You list Java JDK and Gradle but omit the AsyncAPI CLI, which is required to run asyncapi generate. Please add “AsyncAPI CLI” (or “AsyncAPI generator CLI”) to the prerequisites for completeness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants