Skip to content

fix: correct displayName type in Sneak Peek example - #5662

Closed
swarupasaroogumma wants to merge 3 commits into
asyncapi:masterfrom
swarupasaroogumma:fix/displayname-type-example
Closed

fix: correct displayName type in Sneak Peek example#5662
swarupasaroogumma wants to merge 3 commits into
asyncapi:masterfrom
swarupasaroogumma:fix/displayname-type-example

Conversation

@swarupasaroogumma

@swarupasaroogumma swarupasaroogumma commented Jul 28, 2026

Copy link
Copy Markdown

Description

This PR updates the displayName field type in the AsyncAPI document shown in the Sneak Peek example.

Before:

displayName:
  type: object
  description: Name of the User

After:

displayName:
  type: string
  description: Name of the User

The AsyncAPI document example represents displayName as an object, while the generated TypeScript and documentation preview both represent it as a string. This change makes the three previews consistent.

Type of change

  • Bug fix

Testing

  • Verified the Sneak Peek example renders correctly locally.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected the displayed type for the displayName payload property in AsyncAPI document previews.
    • The property is now accurately identified as a string instead of an object.
    • No changes were made to preview navigation, tabs, or other interface behavior.

@netlify

netlify Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 52bb6b5
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/6a692cc278568c000815ce7b
😎 Deploy Preview https://deploy-preview-5662--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR corrects the rendered AsyncAPI displayName payload type from object to string and adds @xyflow/react and react-i18next as runtime dependencies.

Changes

Schema and runtime dependency updates

Layer / File(s) Summary
Correct displayName payload type
components/SneakPeek.tsx
The rendered AsyncAPI schema snippet now declares displayName as a string.
Add runtime dependencies
package.json
Adds @xyflow/react and react-i18next to the runtime dependencies.ة

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested reviewers: derberg, princerajpoot20, akshatnema, sambhavgupta0705, anshgoyalevil

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: correcting the displayName type in the Sneak Peek example.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
🔧 Fix failing CI
  • Fix failing CI in branch fix/displayname-type-example

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.

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
package.json (1)

66-66: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Avoid unconstrained minor-version drift for newly added dependencies.

Both dependencies use caret ranges, allowing automatic minor-version updates. Pin exact versions or use conservative ranges, and verify the committed lockfile resolves the intended React-compatible versions.

  • package.json#L66-L66: constrain @xyflow/react instead of using ^12.11.2.
  • package.json#L102-L102: constrain react-i18next instead of using ^16.6.5.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 66, Constrain the newly added `@xyflow/react` dependency
in package.json at lines 66-66 and react-i18next at lines 102-102 by replacing
caret ranges with exact versions or conservative ranges; update and verify the
committed lockfile resolves the intended React-compatible versions.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@package.json`:
- Line 66: Constrain the newly added `@xyflow/react` dependency in package.json at
lines 66-66 and react-i18next at lines 102-102 by replacing caret ranges with
exact versions or conservative ranges; update and verify the committed lockfile
resolves the intended React-compatible versions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 873f9b03-bbd0-49d1-bf8c-8b082f328883

📥 Commits

Reviewing files that changed from the base of the PR and between 20216fd and 52bb6b5.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • components/SneakPeek.tsx
  • package.json

@asyncapi-bot

Copy link
Copy Markdown
Contributor

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 43
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on https://deploy-preview-5662--asyncapi-website.netlify.app/

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants