Skip to content
Snapshot of the v0.1 release. Fixes and additions since then are not in it. Current documentation →
Documentation

Documentation

goninja turns an annotated Go struct into a complete REST resource: typed request and response schemas, net/http handlers, GORM-backed queries, validation, filtering, ordering, pagination and an OpenAPI fragment.

It does this by writing Go source. goninja generate reads your models and emits one <model>_generated.go file per model — ordinary code you can read, diff, and step through in a debugger. Nothing is resolved by reflection at request time, so a mistake in a struct tag surfaces as a failed build rather than a surprise in production.

goninja is pre-alpha. The API described here is implemented and tested, but it may change without notice and there is no compatibility guarantee yet.

Start here

Guides

Task-oriented walkthroughs for each part of the framework.

Reference

Also