Thank you for your interest in contributing to the JSON/YAML Validator Maven Plugin! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Submitting Changes
- Coding Standards
- Testing Guidelines
- Documentation
We are committed to providing a welcoming and inspiring community for all. Please be respectful and constructive in your interactions with other contributors.
- Fork the repository on GitHub
- Clone your fork locally
- Create a new branch for your feature or bugfix
- Make your changes
- Submit a pull request
- Java 11 or higher
- Maven 3.6.0 or higher
- Git
# Clone your fork
git clone https://github.com/YOUR_USERNAME/json-yaml-validator-maven-plugin.git
cd json-yaml-validator-maven-plugin
# Build the project
mvn clean install
# Run tests
mvn test- Feature branches:
feature/description-of-feature - Bugfix branches:
fix/description-of-bug - Documentation:
docs/description-of-change
Follow the conventional commits specification:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Test additions or modificationsrefactor:- Code refactoringchore:- Maintenance tasks
Example:
feat: add support for JSON Schema draft 2020-12
fix: handle empty YAML files correctly
docs: update README with new configuration options
- Ensure all tests pass:
mvn test - Update documentation if needed
- Add tests for new functionality
- Update CHANGELOG.md with your changes (if applicable)
- Create a pull request with a clear description
When creating a PR, please include:
- Description: What does this PR do?
- Type: Bug fix, feature, documentation, etc.
- Breaking Changes: Yes/No
- Testing: How has this been tested?
- Checklist:
- Tests pass
- Documentation updated
- CHANGELOG.md updated (if applicable)
- Code follows project style
- Use 4 spaces for indentation (no tabs)
- Maximum line length: 120 characters
- Use meaningful variable and method names
- Add Javadoc for all public methods
- Follow standard Java naming conventions
/**
* Validates JSON/YAML files against a schema.
*
* @param file the file to validate
* @param schema the JSON schema
* @return validation result
* @throws ValidationException if validation fails
*/
public ValidationResult validateFile(File file, JsonSchema schema)
throws ValidationException {
// Implementation
}- Write unit tests for all new functionality
- Maintain test coverage above 80%
- Use descriptive test method names
- Test both success and failure cases
@Test
public void validateFile_withValidJson_shouldReturnSuccess() {
// Given
File validFile = new File("valid.json");
// When
ValidationResult result = validator.validateFile(validFile, schema);
// Then
assertTrue(result.isValid());
}- Test plugin execution with different configurations
- Test various JSON Schema versions
- Test error scenarios
- Add Javadoc to all public classes and methods
- Include @param, @return, and @throws tags
- Provide examples in complex methods
- Update README.md for new features
- Add examples for new configuration options
- Document breaking changes clearly
If you have questions or need help:
- Check existing issues on GitHub
- Read the documentation
- Create a new issue with the question label
- Join our discussions (if available)
Contributors will be recognized in:
- The project's contributors list
- Release notes for their contributions
- Special mentions for significant contributions
Thank you for contributing to the JSON/YAML Validator Maven Plugin!