generator icon indicating copy to clipboard operation
generator copied to clipboard

docs: enhanced development guide with comprehensive documentation on project scripts, development workflows, generator architecture, hook lifecycle, testing procedures, and release processes for contributors.

Open saishmungase opened this issue 1 week ago • 4 comments

Description

Enhances the Development.md guide to help new contributors understand the AsyncAPI Generator project structure and development workflow more quickly.

Changes included in this PR:

  • Scripts for Individual Packages: Documented how to run tests and linting for specific packages using Turborepo.
  • Developing with Watch Mode: Explained the npm run dev command for active development.
  • How the Generator Works: Added an ASCII diagram showing the 5-step generation flow (parse → template loading → file processing → output).
  • Understanding Hook Execution: Documented the 3 available hooks (generate:before, setFileTemplateName, generate:after) with a lifecycle diagram.
  • Turborepo Note: Added a brief explanation of how Turborepo orchestrates scripts across packages.

New Structure :-

Development guide

│ ├─ ## Before You Begin - New Contributor Onboarding │ └─ ### What you'll learn ├─ ## Getting started ├─ ## Scripts for Individual Packages ├─ ## Developing with Watch Mode ( Added ✅ ) ├─ ## How the Generator Works ( Added ✅ ) ├─ ## Running tests │ ├─ ### Local testing │ ├─ ### Adding tests │ └─ ### Understanding Hook Execution ( Added ✅ ) ├─ ## Docker isolated testing │ └─ ### Manually testing with test templates ( Small Note Added ✅ ) ├─ ## Release process │ ├─ ### Conventional Commits │ ├─ ### Pull Request Title Guidelines │ ├─ #### Manual │ ├─ #### Using CLI │ └─ ### Release Flow ├─ ## Additional commands └─ ## Troubleshooting

Verification:

  • ✅ All npm scripts verified against package.json.
  • ✅ Generation flow description matches generator.js implementation.
  • ✅ Hook descriptions align with official hooks.md documentation.
  • ✅ ASCII diagrams verified to render correctly on GitHub.

Related issue(s) Closes #1759

Summary by CodeRabbit

  • Documentation
    • Enhanced development guide with comprehensive documentation on project scripts, development workflows, generator architecture, hook lifecycle, testing procedures, and release processes for contributors.

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

saishmungase avatar Dec 11 '25 14:12 saishmungase

⚠️ No Changeset found

Latest commit: 24c051c8c7858a8f1675cb9e032ce3e45fde3ece

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

changeset-bot[bot] avatar Dec 11 '25 14:12 changeset-bot[bot]

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.

asyncapi-bot avatar Dec 11 '25 14:12 asyncapi-bot

Walkthrough

This PR updates Development.md with expanded onboarding and developer documentation: package scripts and Turborepo usage, watch/dev commands, a detailed "How the Generator Works" flow, hook lifecycle and available hooks, Docker/local testing instructions, and release/testing guidance. No code changes.

Changes

Cohort / File(s) Summary
Documentation: Development Guide Expansion
Development.md
Adds detailed guidance on Turborepo package scripts and targeted npm commands, watch/dev workflow, a step-by-step "How the Generator Works" flow (AsyncAPI parsing → template loading → rendering → file generation → hooks), formal hook lifecycle docs (generate:before, setFileTemplateName, generate:after), Docker-isolated and manual testing procedures, and updated testing/release instructions (conventional commits, changesets).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10–15 minutes

  • Verify accuracy of the generator workflow and hook lifecycle descriptions against implementation.
  • Confirm listed npm/Turborepo commands match package.json scripts.
  • Check Docker and testing instructions for reproducibility.

Possibly related PRs

  • asyncapi/generator#1753 — Related documentation changes to Development.md onboarding and developer workflow, overlapping on hook execution and contributor setup.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly and comprehensively summarizes the main changes: documentation enhancements to the development guide covering project scripts, workflows, generator architecture, hook lifecycle, testing, and release processes.
Linked Issues check ✅ Passed The PR fully addresses all coding-related objectives from issue #1759: adds monorepo package overview, documents Turborepo orchestration, explains npm scripts for individual packages, recommends npm run dev for watch mode, and provides clear generator flow and hook lifecycle documentation.
Out of Scope Changes check ✅ Passed All changes are scoped to Development.md documentation enhancements aligned with issue #1759 objectives; no unrelated functional code modifications or out-of-scope alterations are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fa851f78da66c5cc038411611120cf27e71e3dc1 and 24c051c8c7858a8f1675cb9e032ce3e45fde3ece.

📒 Files selected for processing (1)
  • Development.md (3 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
Development.md

69-69: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


122-122: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (2)
Development.md (2)

41-65: Well-structured guidance on package scripts and dev workflow.

The introduction of scoped Turborepo commands and watch mode is clear and directly addresses contributor onboarding. The examples are practical and the reference to README.md is helpful for context.


94-101: Well-organized documentation that addresses onboarding objectives effectively.

The guide now provides a clear progression from getting started through hook execution and testing. The new sections ("How the Generator Works," "Understanding Hook Execution," "Scripts for Individual Packages") directly support faster contributor onboarding as intended in #1759. The Turborepo note and cross-references enhance clarity.

Also applies to: 147-184


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.

coderabbitai[bot] avatar Dec 11 '25 14:12 coderabbitai[bot]

@derberg, Can You please review this PR?

saishmungase avatar Dec 18 '25 07:12 saishmungase