Skip to content

fix(docs): correct broken' AsyncAPI' reference link#1889

Closed
SHUBHANSHU602 wants to merge 1 commit intoasyncapi:masterfrom
SHUBHANSHU602:fix/asyncapi-doc-link
Closed

fix(docs): correct broken' AsyncAPI' reference link#1889
SHUBHANSHU602 wants to merge 1 commit intoasyncapi:masterfrom
SHUBHANSHU602:fix/asyncapi-doc-link

Conversation

@SHUBHANSHU602
Copy link
Contributor

@SHUBHANSHU602 SHUBHANSHU602 commented Jan 30, 2026

What this PR does

Fixes a broken "AsyncAPI" documentation link that currently points to a non-existent path.

Root cause

The link was resolving to:
generator/asyncapi-document
which results in a 404 due to duplicated path segments.

Solution

Updated the link to the correct one:
/generator/apps/generator/docs/asyncapi-document

Related issue #1836

Summary by CodeRabbit

  • Documentation
    • Updated internal documentation links and references for improved organization and accessibility.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Jan 30, 2026

⚠️ No Changeset found

Latest commit: 7f4ff98

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@asyncapi-bot
Copy link
Contributor

What reviewer looks at during PR review

The following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.

  1. PR Title: Use a concise title that follows our Conventional Commits guidelines and clearly summarizes the change using imperative mood (it means spoken or written as if giving a command or instruction, like "add new helper for listing operations")

    Note - In Generator, prepend feat: or fix: in PR title only when PATCH/MINOR release must be triggered.

  2. PR Description: Clearly explain the issue being solved, summarize the changes made, and mention the related issue.

    Note - In Generator, we use Maintainers Work board to track progress. Ensure the PR Description includes Resolves #<issue-number> or Fixes #<issue-number> this will automatically close the linked issue when the PR is merged and helps automate the maintainers workflow.

  3. Documentation: Update the relevant Generator documentation to accurately reflect the changes introduced in the PR, ensuring users and contributors have up-to-date guidance.

  4. Comments and JSDoc: Write clear and consistent JSDoc comments for functions, including parameter types, return values, and error conditions, so others can easily understand and use the code.

  5. DRY Code: Ensure the code follows the Don't Repeat Yourself principle. Look out for duplicate logic that can be reused.

  6. Test Coverage: Ensure the new code is well-tested with meaningful test cases that pass consistently and cover all relevant edge cases.

  7. Commit History: Contributors should avoid force-pushing as much as possible. It makes it harder to track incremental changes and review the latest updates.

  8. Template Design Principles Alignment: While reviewing template-related changes in the packages/ directory, ensure they align with the Assumptions and Principles. If any principle feels outdated or no longer applicable, start a discussion these principles are meant to evolve with the project.

  9. Reduce Scope When Needed: If an issue or PR feels too large or complex, consider splitting it and creating follow-up issues. Smaller, focused PRs are easier to review and merge.

  10. Bot Comments: As reviewers, check that contributors have appropriately addressed comments or suggestions made by automated bots. If there are bot comments the reviewer disagrees with, react to them or mark them as resolved, so the review history remains clear and accurate.

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

Updated an internal documentation link in the model generation guide, changing an AsyncAPI reference from a relative path to point to an internal AsyncAPI document path within the generator application structure.

Changes

Cohort / File(s) Summary
Documentation Link Update
apps/generator/docs/model-generation.md
Updated AsyncAPI hyperlink reference to point to internal document path /generator/apps/generator/docs/asyncapi-document.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title follows Conventional Commits guidelines with the 'fix:' prefix and clearly describes the change in imperative mood - correcting a broken AsyncAPI reference link.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

Copy link

@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

🤖 Fix all issues with AI agents
In `@apps/generator/docs/model-generation.md`:
- Line 8: Summary: The internal documentation link target exposes repo structure
and should use the site's routing pattern; replace the current
"/generator/apps/generator/docs/asyncapi-document" link target. Locate the
Markdown line containing the link text "[AsyncAPI]" and change its target to the
relative doc route "(asyncapi-document)" (or "(generator/asyncapi-document)" if
you prefer the index-style pattern) so the link matches other docs like
versioning.md/template.md; ensure only the URL portion inside the parentheses is
changed and the visible link text "[AsyncAPI]" remains unchanged.

This guide will walk you through the process of enabling models/types generation in a template by using [Modelina](https://www.asyncapi.com/tools/modelina).

Modelina is an AsyncAPI library designed for generating data models using inputs such as [AsyncAPI](generator/asyncapi-document), OpenAPI, or JSON schema inputs. Its functionality revolves around creating data models from the provided AsyncAPI document and the model template, which defines message payloads. It is better to use Modelina in your template to handle model generation rather than providing custom templates.
Modelina is an AsyncAPI library designed for generating data models using inputs such as [AsyncAPI](/generator/apps/generator/docs/asyncapi-document), OpenAPI, or JSON schema inputs. Its functionality revolves around creating data models from the provided AsyncAPI document and the model template, which defines message payloads. It is better to use Modelina in your template to handle model generation rather than providing custom templates.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find files related to asyncapi-document
fd -H "asyncapi-document" apps/generator/docs/ 2>/dev/null || echo "No exact match found"

# List the docs structure to understand organization
find apps/generator/docs -type f -name "*.md" | head -20

# Check if the file exists with common extensions
ls -la apps/generator/docs/ 2>/dev/null | grep -i asyncapi || echo "No asyncapi files in directory listing"

Repository: asyncapi/generator

Length of output: 924


🏁 Script executed:

#!/bin/bash
# Check front-matter of asyncapi-document.md
head -20 apps/generator/docs/asyncapi-document.md

# Check the model-generation.md file to see the exact link format
cat -n apps/generator/docs/model-generation.md | head -15

# Look for docs site configuration
fd -H "docusaurus|sidebars|mkdocs|nextra|config" . 2>/dev/null | grep -E "(config|docusaurus|sidebars)" | head -10

# Check root level config files
ls -la | grep -E "(\.config|package\.json|docusaurus|mkdocs|sidebars)"

Repository: asyncapi/generator

Length of output: 3348


🏁 Script executed:

#!/bin/bash
# Check for website configuration
fd -H "website|site" . --type d | head -10

# Check other markdown files to see how internal links are formatted
rg -n '\[.*\]\(/' apps/generator/docs/ | head -20

# Look for docusaurus or other docs config in website dir
fd -H "config|docusaurus" website 2>/dev/null | head -10

# Check the main package.json for docs-related scripts
cat package.json | grep -A5 -B5 "doc\|site"

Repository: asyncapi/generator

Length of output: 2237


🏁 Script executed:

#!/bin/bash
# Search for all internal links in docs to understand the pattern
rg -n '\]\(/docs/tools/generator' apps/generator/docs/

# Search for any references to asyncapi-document
rg -n 'asyncapi-document' apps/generator/docs/

# Check if there's any route mapping or docs config
find . -name "*route*" -o -name "*config*" -o -name "*docusaurus*" | grep -E "(website|docs|config)" | head -15

Repository: asyncapi/generator

Length of output: 5308


Correct the internal documentation link path.

The link on line 8 uses /generator/apps/generator/docs/asyncapi-document, which exposes internal filesystem structure and doesn't match the documentation site's routing pattern.

Based on other links in the docs, this should be either:

  • (asyncapi-document) for a relative link (consistent with versioning.md, template.md, template-context.md)
  • (generator/asyncapi-document) for consistency with the pattern used in index.md

Update the link accordingly.

🤖 Prompt for AI Agents
In `@apps/generator/docs/model-generation.md` at line 8, Summary: The internal
documentation link target exposes repo structure and should use the site's
routing pattern; replace the current
"/generator/apps/generator/docs/asyncapi-document" link target. Locate the
Markdown line containing the link text "[AsyncAPI]" and change its target to the
relative doc route "(asyncapi-document)" (or "(generator/asyncapi-document)" if
you prefer the index-style pattern) so the link matches other docs like
versioning.md/template.md; ensure only the URL portion inside the parentheses is
changed and the visible link text "[AsyncAPI]" remains unchanged.

@SHUBHANSHU602 SHUBHANSHU602 deleted the fix/asyncapi-doc-link branch January 31, 2026 07:01
@SHUBHANSHU602
Copy link
Contributor Author

hey @coderabbitai can you please see the repo ,which are the deprecated dependencies ,which should be removed

@coderabbitai
Copy link

coderabbitai bot commented Feb 15, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@SHUBHANSHU602, I'll analyze the repository to identify deprecated dependencies that should be removed.


🏁 Script executed:

#!/bin/bash

# Find all package.json files in the repository
echo "=== Finding all package.json files ==="
fd -t f "package.json"

echo -e "\n=== Checking root package.json dependencies ==="
if [ -f "package.json" ]; then
  cat package.json | jq -r '.dependencies // {}, .devDependencies // {}' | jq -r 'keys[]' | sort
fi

Length of output: 897


🏁 Script executed:

#!/bin/bash

# Check for deprecated packages using npm
echo "=== Checking for deprecated packages in root ==="
if [ -f "package.json" ]; then
  # Install npm-check if not available and check for deprecated packages
  npm deprecate --help 2>/dev/null || echo "Checking with available tools..."
  
  # Use npm outdated to check for updates and deprecated info
  echo -e "\n--- NPM Outdated Check ---"
  npm outdated 2>&1 || echo "No outdated packages or npm not initialized"
  
  # Try to extract package names and check each one
  echo -e "\n--- Checking individual packages for deprecation ---"
  cat package.json | jq -r '.dependencies // {} | keys[]' | while read pkg; do
    npm view "$pkg" 2>/dev/null | grep -i "deprecated" && echo "  Package: $pkg"
  done
  
  echo -e "\n--- Checking devDependencies for deprecation ---"
  cat package.json | jq -r '.devDependencies // {} | keys[]' | while read pkg; do
    npm view "$pkg" 2>/dev/null | grep -i "deprecated" && echo "  Package: $pkg"
  done
fi

Length of output: 360


🏁 Script executed:

#!/bin/bash

# Check package.json files in apps and packages directories
echo "=== Checking package.json in subdirectories ==="

for pkgjson in $(fd -t f "package.json"); do
  echo -e "\n--- File: $pkgjson ---"
  cat "$pkgjson" | jq '{name: .name, dependencies: .dependencies // {}, devDependencies: .devDependencies // {}}' 2>/dev/null
done

Length of output: 1093


🏁 Script executed:

#!/bin/bash

# Read the main package.json files to see dependencies
echo "=== Root package.json ==="
cat package.json

echo -e "\n\n=== apps/generator/package.json ==="
cat apps/generator/package.json

echo -e "\n\n=== apps/hooks/package.json ==="
cat apps/hooks/package.json

echo -e "\n\n=== apps/react-sdk/package.json ==="
cat apps/react-sdk/package.json

Length of output: 9130


🏁 Script executed:

#!/bin/bash

# Check for specific commonly deprecated packages
echo "=== Checking for known deprecated packages ==="

# List of commonly deprecated packages to check
deprecated_packages=(
  "request"
  "babel-preset-es2015"
  "gulp-util"
  "native-promise-only"
  "node-uuid"
  "uuid"
  "core-js"
  "babel-core"
  "@babel/polyfill"
  "coffee-script"
  "tslint"
  "eslint-loader"
  "har-validator"
  "request-promise"
  "request-promise-native"
  "formidable"
  "mkdirp"
  "rimraf"
  "glob"
)

# Search for these packages in all package.json files
for pkg in "${deprecated_packages[@]}"; do
  result=$(rg -l "\"$pkg\"" --glob "package.json" 2>/dev/null)
  if [ ! -z "$result" ]; then
    echo "Found potentially deprecated package: $pkg"
    echo "  Files: $result"
  fi
done

Length of output: 198


🏁 Script executed:

#!/bin/bash

# Check npm view for deprecation notices on actual dependencies
echo "=== Checking specific packages from generator app ==="

# Extract dependencies from apps/generator/package.json
deps=$(cat apps/generator/package.json | jq -r '.dependencies // {} | keys[]' 2>/dev/null | head -20)

echo "$deps" | while read pkg; do
  if [ ! -z "$pkg" ]; then
    deprecation=$(npm view "$pkg" deprecated 2>/dev/null)
    if [ ! -z "$deprecation" ]; then
      echo "DEPRECATED: $pkg"
      echo "  Reason: $deprecation"
    fi
  fi
done

Length of output: 389


@SHUBHANSHU602, I've analyzed the repository and found several deprecated dependencies that should be addressed:

🚨 Officially Deprecated Packages

1. @asyncapi/generator-hooks (apps/generator/package.json)

  • Status: Officially deprecated on npm
  • Reason: "Hooks are now part of generator repository and also out of the box integrated with the generator, so no need to set it as dependency any more"
  • Action: Remove this dependency as hooks are now built-in since generator v2.5.0

2. global-dirs (apps/generator/package.json)

  • Status: Officially deprecated on npm
  • Reason: Package has been renamed to global-directory
  • Action: Replace with global-directory

3. rimraf (found in 3 files)

  • Status: Not officially deprecated, but considered legacy
  • Found in:
    • apps/generator/package.json
    • apps/hooks/package.json
    • apps/generator/test/test-project/package.json
  • Reason: Node.js ≥14.14.0 has built-in fs.rm() and fs.rmSync() methods
  • Action: Consider replacing with native Node.js fs.rm() since you require Node.js ≥24.11

⚠️ Significantly Outdated Packages

4. eslint v6.8.0

  • Current version is v9+
  • Found in: apps/generator, apps/hooks (devDependencies)
  • Action: Upgrade to latest version (may require configuration updates)

5. commander v6.1.0

  • Current version is v12+
  • Found in: apps/generator/package.json
  • Action: Upgrade to latest version

6. node-fetch v2.6.0

  • v3 is available with ESM support
  • Found in: apps/generator/package.json
  • Action: Consider upgrading to v3 (note: breaking changes with ESM)

Would you like me to create an issue to track the removal/upgrade of these deprecated dependencies?


🧠 Learnings used
Learnt from: Adi-204
Repo: asyncapi/generator PR: 0
File: :0-0
Timestamp: 2026-01-31T12:46:18.835Z
Learning: In the asyncapi/generator repository, documentation-only PRs should use `docs:` prefix in the title (not `fix:` or `feat:`), as they should not trigger a new release version.

Learnt from: CR
Repo: asyncapi/generator PR: 0
File: .github/pr-review-checklist.md:0-0
Timestamp: 2026-01-05T09:57:34.800Z
Learning: Update relevant Generator documentation to accurately reflect PR changes introduced

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.

2 participants