Thanks for your interest in contributing! This document describes how to set up your environment, the expected workflow, and the standards your change should meet before it can be merged.
- Code of Conduct
- Ways to Contribute
- Project Layout
- Local Setup
- Development Workflow
- Coding Standards
- Testing
- Documentation
- Commit & Pull Request Guidelines
- Release Process
- Reporting Issues
Be respectful, constructive, and inclusive. Harassment or exclusionary behavior will not be tolerated in issues, pull requests, or any other project space.
- Report bugs or request features via GitHub Issues
- Improve documentation (README, CHANGELOG, DartDoc comments, skills)
- Add tests or improve existing coverage
- Fix bugs or implement features listed in open issues
- Suggest new annotations, transports, or generator capabilities
If you plan a large change, please open an issue first so we can align on scope and design before you invest time in a pull request.
This repo is a Melos-managed monorepo:
packages/
├── easy_api_annotations/ # Annotation definitions (@Server, @Tool, @Parameter)
└── easy_api_generator/ # build_runner generator producing MCP / OpenAPI output
example/ # Runnable sample that exercises the generator
See AGENTS.md for a deeper breakdown of the package contents.
- Dart SDK ^3.11.0
- Melos for workspace management
dart pub global activate melos
- Node.js (only required if you are working on Code Mode features)
git clone https://github.com/cdavis-code/easy_api_workplace.git
cd easy_api_workplace
melos bootstrapmelos bootstrap installs dependencies and links the workspace packages so
example/ picks up your local changes in packages/.
- Create a feature branch from
main:git checkout -b feat/<short-description>
- Make your changes inside
packages/easy_api_annotations/,packages/easy_api_generator/, orexample/. - Regenerate code when generator or annotation changes affect the example:
cd example dart run build_runner build --delete-conflicting-outputs - Run the full verification suite before opening a PR:
melos run format melos run analyze melos run test - If you touched shared dependencies (e.g.
analyzer), also run:melos run deps:check melos run pana
- Follow standard Dart conventions;
dart formatmust pass. - Use PascalCase for annotation classes:
@Server,@Tool,@Parameter. - Prefer
peek()overread()for optional annotation fields in the generator. - Always escape backslashes and dollar signs in generated string literals.
- Add DartDoc comments to every public API.
- Do not expose internal error details in generated code — use generic messages
like
"An error occurred while processing the request".
Refer to AGENTS.md for the full style guide used by both humans and AI agents working on this repo.
- Unit tests live next to the code they exercise, under each package's
test/folder. - Generator changes must include at least one test covering the new output shape.
- Run tests with:
melos run test - When changing the example's annotations, verify the generated artifacts
(
example.mcp.dart,example.mcp.json,example.openapi.json) still match expectations and include the regenerated files in your commit.
- Update the root
README.mdwhen user-facing behavior, flags, or annotations change. - Update
CHANGELOG.mdwith a short entry under the upcoming version for every user-visible change. - Keep DartDoc comments accurate — they feed the annotation docs and help AI agents consume the skills.
Commit messages
- Use imperative mood: "Add HTTP transport test", not "Added" or "Adds".
- Keep the subject line ≤72 characters; add a blank line and a longer body if context is useful.
- Reference issues with
Fixes #123orRefs #123when applicable.
Pull requests
- Target the
mainbranch. - Include a clear description of what changed and why.
- Link any related issues.
- Confirm the verification checklist in the PR description:
-
melos run format -
melos run analyze -
melos run test - Updated
CHANGELOG.md(if user-visible) - Updated
README.md/ DartDoc (if behavior changed)
-
- Keep PRs focused; split unrelated changes into separate PRs.
Releases are cut by maintainers. The high-level checklist is:
- Bump the version in both
packages/*/pubspec.yamlfiles together. - Update
CHANGELOG.mdwith the new version entry. - Run
melos run deps:check,dart analyze,melos run pana, anddart pub publish --dry-run. - Commit, tag, and publish both packages with
dart pub publish --force. - Push the tag to GitHub.
See the Publishing Checklist and Shared Dependency Strategy sections in AGENTS.md for the detailed policy.
When filing a bug, please include:
- Dart SDK version (
dart --version) easy_api_annotationsandeasy_api_generatorversions- A minimal reproduction (annotated Dart source + generated output if relevant)
- Expected vs actual behavior
- Any build_runner or analyzer errors printed to the console
Thanks again for helping make Easy API better!