Skip to content

Conversation

@Arijit-Char
Copy link

@Arijit-Char Arijit-Char commented Mar 20, 2025

Fixed: issue #3721

1st Issue:

Description:
This PR updates the incorrect installation example in the AsyncAPI documentation for the HTML template.

Changes Made:
Updated the specPath for HTML Template v3.0.0:
Previous specPath: Path (used for AsyncAPI v2.0.0)
New specPath: Path
This ensures compatibility with @asyncapi/html-template@3.0.0.

2nd Issue:

Description: Updated Description as per PR #1649

Changes Made: Changed the description text.

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Enhanced the CLI interface to clearly convey that users can now create complete projects, specification files, and client/application templates—offering broader utility and flexibility.
    • Introduced improved internationalization support to better serve users across multiple languages and regions.
  • Chores

    • Streamlined the generator installation process with updated defaults, simplifying the parameters and providing a direct reference to a reliable specification source, ensuring a more consistent setup experience.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 20, 2025

Walkthrough

This pull request updates several areas of the codebase. In the GeneratorInstallation component, the initial state has been simplified to only include the --use-new-generator flag and now references a direct YAML file URL. In package.json, a new dependency react-i18next is added. Additionally, the CLI page text is expanded to describe broader capabilities beyond generating a single AsyncAPI file.

Changes

File(s) Change Summary
components/GeneratorInstallation.tsx Updated the initial state by removing the -o example flag, now using only --use-new-generator and replacing a shortened URL with a direct GitHub URL for the AsyncAPI YAML specification.
pages/tools/cli.tsx Modified the user-facing description text to expand the CLI functionality from creating a single file to including projects, specification files, and client/application templates.
package.json Added a new dependency "react-i18next": "^15.4.1" to support internationalization.
.github/workflows/lighthouse-ci.yml Streamlined conditional logic in the workflow while maintaining the same checks for PR title and actor identity.

Possibly related PRs

  • docs(generator): update latest generator documentation #3785: The changes in the main PR, specifically the addition of the --use-new-generator flag in the GeneratorInstallation component, are directly related to the modifications in the retrieved PR that also involve the use of the --use-new-generator flag in the command for generating HTML with the AsyncAPI CLI.
  • docs: update commands for generator features preview #3545: The changes in the main PR are related to the modifications of the params state variable in the GeneratorInstallation.tsx component, which aligns with the updates made to the same variable in the retrieved PR.
  • docs(cli): update latest cli documentation #3713: The changes in the main PR regarding the GeneratorInstallation component's state variables directly relate to the updated command usage in the retrieved PR, which includes the --use-new-generator flag.

Suggested labels

autoapproved, autoupdate

Suggested reviewers

  • derberg
  • akshatnema
  • anshgoyalevil
  • Mayaleeeee
  • asyncapi-bot-eve

Poem

I'm a little rabbit typing code,
Hopping through changes on this bright road,
New flags and URLs, oh what fun to see,
With fresh dependencies for you and me,
My whiskers twitch with each joyful update spree!
🐰💻


📜 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 0a94957 and 8338c4a.

📒 Files selected for processing (1)
  • .github/workflows/lighthouse-ci.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/lighthouse-ci.yml

🪧 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.
  • @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

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@netlify
Copy link

netlify bot commented Mar 20, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 6ec39fb
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/67dc2b6a9fa0ce00085d62dc
😎 Deploy Preview https://deploy-preview-3923--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 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: 0

🧹 Nitpick comments (1)
components/GeneratorInstallation.tsx (1)

1-98: Consider adding context to the code comments.

While the code changes are correct, it would be helpful to update the comments on line 25-26 to reflect the new approach. Currently, the comment mentions an output folder flag which is no longer included in the default parameters.

-  // By default we will have output folder flag so its set here.
+  // By default we use the new generator flag, which is needed for HTML Template v3.0.0
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 483cd82 and 3c055a2.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • components/GeneratorInstallation.tsx (1 hunks)
  • package.json (1 hunks)
  • pages/tools/cli.tsx (1 hunks)
🔇 Additional comments (4)
package.json (1)

101-101:

Details

✅ Verification successful

Verify compatibility with existing i18n packages.

The addition of react-i18next is appropriate for internationalization support. However, ensure it's compatible with the existing i18next (line 79) and next-i18next (line 90) packages already in the dependencies.


🏁 Script executed:

#!/bin/bash
# Check compatibility between i18next-related packages
npm info i18next@23.12.2 peerDependencies
npm info next-i18next@15.3.0 peerDependencies
npm info react-i18next@15.4.1 peerDependencies
echo "Checking for any compatibility warnings if these packages were installed together:"
npm install --package-lock-only --no-package-lock i18next@23.12.2 next-i18next@15.3.0 react-i18next@15.4.1

Length of output: 1265


Compatibility Verified: No Action Required

The dependency versions are compatible:

  • react-i18next@15.4.1 requires i18next ≥ 23.2.3, which is met by i18next@23.12.2.
  • next-i18next@15.3.0 requires i18next ≥ 23.7.13 and compatible React versions, which are satisfied.
  • The npm installation simulation did not raise any conflicts related to these packages (aside from minor, unrelated engine warnings).

Please proceed with the current dependency configuration.

pages/tools/cli.tsx (1)

158-158: Great enhancement to CLI description.

This update provides a more comprehensive explanation of the CLI's capabilities, accurately reflecting that it can create not just files but complete projects and templates. This aligns with the PR objective to update outdated information.

components/GeneratorInstallation.tsx (2)

26-27: Appropriate update to the generator parameters and specification path.

The changes properly address the PR objectives by:

  1. Simplifying parameters to only include the essential --use-new-generator flag
  2. Replacing the shortened URL with a direct link to the current AsyncAPI specification example

These changes ensure compatibility with HTML Template version 3.0.0 as intended.


55-58:

Details

✅ Verification successful

Verify template functionality.

The updated specification path and parameters will affect the generated command. Let's ensure the rendered command works correctly with the updated values.


🏁 Script executed:

#!/bin/bash
# Verify the AsyncAPI spec URL is accessible
curl -s -I "https://raw.githubusercontent.com/asyncapi/spec/refs/heads/master/examples/streetlights-kafka-asyncapi.yml" | head -n 1

# Verify the spec content is valid YAML
curl -s "https://raw.githubusercontent.com/asyncapi/spec/refs/heads/master/examples/streetlights-kafka-asyncapi.yml" | grep -q "asyncapi:" && echo "Valid AsyncAPI spec found" || echo "Invalid or missing AsyncAPI spec"

# Test if the HTML template can be found on npm
npm view @asyncapi/html-template@3.0.0 version

Length of output: 397


Template functionality verified:
The verification steps confirm that the AsyncAPI spec URL is accessible (HTTP/2 200), returns valid YAML (contains the "asyncapi:" keyword), and the HTML template is available on npm at version 3.0.0. This ensures that the generated command in components/GeneratorInstallation.tsx works as expected with the updated specification path and parameters.

No further changes are required.

@Arijit-Char Arijit-Char changed the title fix: Issue #3721, fixed Few outdated info on /tools/generator and /tools/cli fix: update outdated information on /tools/generator and /tools/cli Mar 20, 2025
@Arijit-Char
Copy link
Author

Hi @derberg @akshatnema @anshgoyalevil @Mayaleeeee @asyncapi-bot-eve,
This PR updates outdated information in the generator and CLI docs as per issue #3721.
Kindly review when you get a chance. Thanks! 😊

@Arijit-Char
Copy link
Author

Hi @derberg @akshatnema @anshgoyalevil @Mayaleeeee,

PR #3923 is failing due to 4 failing checks.
Could you check and guide me on the fixes? Thanks! 😊

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.

1 participant