https://github.com/ditschedev/teki
Fluent schema validation for Java. Define rules with a builder API or annotations. Validate DTOs, records, and nested objects with structured error reporting.
https://github.com/ditschedev/teki
annotations dto fluent-api java records schema validation validator
Last synced: 11 days ago
JSON representation
Fluent schema validation for Java. Define rules with a builder API or annotations. Validate DTOs, records, and nested objects with structured error reporting.
- Host: GitHub
- URL: https://github.com/ditschedev/teki
- Owner: ditschedev
- License: mit
- Created: 2026-04-23T01:01:34.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-16T07:24:23.000Z (18 days ago)
- Last Synced: 2026-05-16T09:37:48.595Z (18 days ago)
- Topics: annotations, dto, fluent-api, java, records, schema, validation, validator
- Language: Java
- Homepage: https://teki.ditsche.dev
- Size: 292 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Teki
**Fluent schema validation for Java.**
Teki is an open source Java library for validating objects with a fluent builder API or annotations.
Define field-level constraints on DTOs, records, and nested objects and get structured, human-readable errors back without framework dependencies.
[Read the documentation](https://teki.ditsche.dev) • [Getting Started](https://teki.ditsche.dev/docs/getting-started) • [GitHub Releases](https://github.com/ditschedev/teki/releases)
## Why Teki
- Fluent builder API and annotation-based validation in one library
- Structured field errors with stable type identifiers
- Nested objects, arrays, and conditional rules
- Value normalization — trim, default, and transform during validation
- No framework dependencies, works with plain Java, Spring Boot, and more
## Installation
```xml
dev.ditsche
teki
1.0.1
```
Requires Java 17+.
## Quick Example
```java
import static dev.ditsche.teki.rule.builder.Rules.*;
Teki schema = Teki.fromRules(
string(Request::getEmail).required().email().trim(),
string(Request::password).required().min(8),
number("age").required().positive()
);
Request result = schema.validate(request);
// or
ValidationOutcome result = schema.check(request);
```
## Development
Contributions are welcome.
- Run the Java tests with `mvn test`
- Start the docs app with `cd docs && pnpm dev`
- Use the docs site for the full guides and API explanations: [teki.ditsche.dev](https://teki.ditsche.dev)
If you want to contribute, opening an issue or pull request with a small focused change is the easiest way to get started.