Thank you for your interest in contributing to AshOaskit! This guide will help you get started.
Before submitting a bug report:
- Check existing issues first
- Include your Elixir and OTP versions (
elixir --version) - Provide minimal reproduction steps
- Include the full error message and stacktrace
- Open an issue describing the enhancement
- Explain the use case and benefits
- Consider how it fits with existing functionality
- Fork the repository
- Create a feature branch (
git checkout -b feat/amazing-feature) - Make your changes
- Run quality checks (
mix check) - Commit using conventional commits
- Push and open a PR
git clone https://github.com/futhr/ash_oaskit.git
cd ash_oaskit
mix deps.get
mix testmix test # Run tests
mix coveralls.html # Run tests with coverage
mix check # Run full quality suite
mix docs # Generate documentation
mix dialyzer # Run dialyzer
mix credo --strict # Run credoAll contributions must:
- Pass
mix format --check-formatted - Pass
mix credo --strict - Pass
mix dialyzer - Have 100% test coverage for new code
- Include
@specfor all public functions - Include
@docwith examples for public functions
We use Conventional Commits:
feat:New featuresfix:Bug fixesdocs:Documentation changesrefactor:Code refactoring (no functional changes)test:Test additions or changeschore:Maintenance tasks (deps, CI, etc.)
Examples:
feat: add support for custom type mappings
fix: handle nil values in constraint processing
docs: improve TypeMapper documentation
test: add coverage for edge cases in V31 generator
lib/
├── ash_oaskit.ex # Main module with public API
├── ash_oaskit/
│ ├── controller.ex # Phoenix controller
│ ├── generators/
│ │ ├── v30.ex # OpenAPI 3.0 generator
│ │ └── v31.ex # OpenAPI 3.1 generator
│ ├── open_api.ex # Core spec generation logic
│ └── type_mapper.ex # Ash type to JSON Schema mapping
└── mix/
└── tasks/
├── ash_oaskit.generate.ex # Mix task for CLI generation
└── ash_oaskit.install.ex # Igniter installation task
- Write tests for all new functionality
- Use descriptive test names that explain the behavior
- Group related tests with
describeblocks - Use property-based assertions when exact output varies
- Test both success and error cases
Example test structure:
describe "feature_name/1" do
test "handles normal input" do
# Arrange
input = ...
# Act
result = Module.feature_name(input)
# Assert
assert result == expected
end
test "raises on invalid input" do
assert_raise ArgumentError, fn ->
Module.feature_name(invalid_input)
end
end
end- All public modules must have
@moduledoc - All public functions must have
@docand@spec - Include usage examples in documentation
- Use markdown formatting in docs
Releases are managed by maintainers using git_ops:
- Ensure all tests pass:
mix check - Run
mix release(alias formix git_ops.release) — updates changelog, bumps version, commits, and tags - Push with tags:
git push --follow-tags - CI will publish to Hex.pm on the
v*tag
Feel free to open an issue for questions or join discussions in existing issues.