Thank you for your interest in contributing to the Chargebee SDK Generator! This document provides guidelines and information for contributors.
- Java 17 or higher
- Gradle 7.0 or higher
- Git
-
Fork and clone the repository
git clone https://github.com/chargebee/sdk-generator.git cd sdk-generator -
Build the project
./gradlew build
-
Run tests
./gradlew test -
Set up pre-commit hooks
pre-commit install
This project uses Spotless for code formatting. Before submitting any changes:
# Check formatting
./gradlew spotlessCheck
# Apply formatting
./gradlew spotlessApply- Write unit tests for new functionality
- Ensure all existing tests pass
- Aim for good test coverage
# Run all tests
./gradlew test
# Generate coverage report
./gradlew jacocoTestReport# Build the project
./gradlew build
# Run the generator
./gradlew run --args="-i spec.json -l JAVA_V4 -o output/"We welcome various types of contributions:
- 🐛 Bug fixes
- ✨ New features
- 📚 Documentation improvements
- 🧪 Test improvements
- 🔧 Code refactoring
- 🌐 New language support
- Check existing issues - Look for existing issues or feature requests
- Create an issue - For significant changes, create an issue to discuss the approach
- Fork the repository - Create your own fork to work on
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed
-
Test your changes
./gradlew test ./gradlew spotlessCheck -
Commit your changes
git add . git commit -m "feat: add support for new language template"
-
Push to your fork
git push origin feature/your-feature-name
-
Create a Pull Request
- Use the provided PR template
- Provide a clear description of changes
- Link related issues
- Include testing instructions
We follow conventional commit format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Test improvementsrefactor:- Code refactoringchore:- Build/tooling changes
Examples:
feat: add support for Go SDK generation
fix: resolve template rendering issue for PHP arrays
docs: update README with new language support
test: add unit tests for Java template generator
sdk-generator/
├── src/
│ ├── main/
│ │ ├── java/ # Main application code
│ │ └── resources/ # Templates and resources
│ └── test/ # Test files
├── docs/ # Documentation
├── build.gradle # Build configuration
└── README.md # Project overview
- Templates: Language-specific code generation templates (Handlebars)
- Generators: Language-specific generator classes
- Models: Data models for OpenAPI parsing
- CLI: Command-line interface implementation
To add support for a new programming language:
- Create template files in
src/main/resources/templates/{language}/ - Implement generator class extending the base generator
- Add language enum to supported languages
- Create unit tests for the new language
- Update documentation including README.md
When reporting issues, please include:
- Clear description of the problem
- Steps to reproduce the issue
- Expected vs actual behavior
- Environment details (Java version, OS, etc.)
- Sample OpenAPI spec if relevant
- Error logs or stack traces
Use our issue templates when available.
- Keep PRs focused and atomic
- Write clear commit messages
- Add tests for new functionality
- Update documentation as needed
- Respond to review feedback promptly
- Be constructive and respectful
- Focus on code quality and maintainability
- Check for test coverage
- Verify documentation updates
- Test the changes locally when possible
If you discover a security vulnerability, please follow our Security Policy. Do not create public issues for security vulnerabilities.
By contributing to this project, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).
- Documentation: Check the README.md and docs/ folder
- Issues: Search existing issues or create a new one
- Discussions: Use GitHub Discussions for questions and ideas
Contributors are recognized in our:
- GitHub contributor graphs
- Release notes for significant contributions
- Project documentation
Thank you for contributing to the Chargebee SDK Generator! 🎉