Skip to content
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

fix: updated few outdated information #3723

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Adi-204
Copy link

@Adi-204 Adi-204 commented Feb 23, 2025

Description
Updated few outdated information.

asyncapi generate fromTemplate https://bit.ly/asyncapi @asyncapi/html-template -o example --use-new-generator command is working fine.

Related issue(s)
Fixes: #3721

Summary by CodeRabbit

  • New Features
    • Updated the HTML template generation process to support an enhanced generator option.
    • Refined the CLI command for creating new AsyncAPI files to offer a more explicit execution.

Copy link

netlify bot commented Feb 23, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3158bf2
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/67bb2b0e321dd0000851309e
😎 Deploy Preview https://deploy-preview-3723--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.

Copy link
Contributor

coderabbitai bot commented Feb 23, 2025

Walkthrough

The changes update a configuration flag and a CLI command. In the configuration file for the HTML template, the flag has been extended to include the new option --use-new-generator. In the CLI page component, the command has been modified from asyncapi new to asyncapi new file to clarify the intended operation.

Changes

File(s) Change Summary
config/generator-flags.json In the @asyncapi/html-template entry, the flag was updated from -o example to -o example --use-new-generator.
pages/tools/cli.tsx The command in the CliPage component changed from asyncapi new to asyncapi new file.

Possibly related PRs

Suggested labels

autoapproved, autoupdate

Suggested reviewers

  • quetzalliwrites
  • VaishnaviNandakumar
  • Aahil13
  • TRohit20
  • asyncapi-bot-eve

Poem

I'm a bunny in the code, hopping light and free,
Updating flags and commands with glee.
My twitching nose sniffs out the newest trend,
With "--use-new-generator" around the bend.
Leaping through changes, I cheer this day—
Hop, hop, hooray for code that leads the way!
🐇✨


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 881a4c7 and 3158bf2.

📒 Files selected for processing (2)
  • config/generator-flags.json (1 hunks)
  • pages/tools/cli.tsx (1 hunks)
🔇 Additional comments (2)
pages/tools/cli.tsx (1)

167-167: LGTM! Command updated to be more specific.

The change from asyncapi new to asyncapi new file makes the command more explicit and aligns with the feature description.

config/generator-flags.json (1)

3-3:

✅ Verification successful

LGTM! Verify the new generator flag documentation.

The addition of --use-new-generator flag aligns with the PR objectives and is confirmed to be working correctly.

Let's verify if this flag is documented in the AsyncAPI documentation:


🌐 Web query:

What is the --use-new-generator flag in AsyncAPI HTML template?

💡 Result:

The --use-new-generator flag in AsyncAPI HTML template generation indicates compatibility with AsyncAPI Generator v2 and newer template versions (v3+). Here's what you need to know:

Key Purpose

  • Enables Generator v2 features when working with templates specifically designed for this major version
  • Required for templates using modern React-based rendering engine instead of legacy Nunjucks
  • Ensures proper handling of template dependencies and configuration formats introduced in Generator v2

Usage Context

# For HTML template v3+ with Generator v2
asyncapi generate fromTemplate <spec> @asyncapi/[email protected] --use-new-generator

# Without flag (legacy behavior)
asyncapi generate fromTemplate <spec> @asyncapi/[email protected]

Technical Implications

  1. Activates React renderer instead of Nunjucks [7][8]
  2. Supports new template configuration format (generator property in package.json) [8]
  3. Enables modern React component architecture for templates [9]
  4. Required for templates using @asyncapi/generator-react-sdk dependency [8]

Version Compatibility

Template Version Generator Version Flag Required
≤ 2.x v1 No
≥ 3.x v2 Yes

The flag essentially acts as a bridge between major version changes in both generator and template components[5][7]. Without it, v3+ templates would fail to render properly with older generator versions[5].

Citations:


LGTM! New generator flag documentation verified.

  • The update in config/generator-flags.json (line 3) correctly adds the --use-new-generator flag for the HTML template.
  • The web lookup confirms that this flag is used to enable AsyncAPI Generator v2 features—such as the modern React-based rendering engine and the updated configuration format required for v3+ templates.
  • This change aligns with the PR objectives and no further modifications are necessary.
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.

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. (Beta)
  • @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.

Copy link

codecov bot commented Feb 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (881a4c7) to head (3158bf2).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3723   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines          732       732           
=========================================
  Hits           732       732           

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

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

Successfully merging this pull request may close these issues.

[Docs Bug 🐞 report]: Few outdated info on /tools/generator and /tools/cli
1 participant