finds.dev

JSONAPI-Resources/jsonapi-resources

A resource-focused Rails library for developing JSON:API compliant servers.

View on GitHubHomepage ↗

★ 2,324RubyMITupdated Mar 2026

// the take

JSONAPI::Resources is a Rails gem that wires up JSON:API compliant endpoints from resource class definitions — you declare attributes, relationships, and filters on a resource class, and it generates routes, controllers, and serialization. It targets Rails 5.1+ API servers that want strict JSON:API compliance without hand-rolling every endpoint. The spec is fully supported: sparse fieldsets, compound documents, filtering, sorting, pagination, and relationship endpoints.

The resource-centric model maps cleanly onto ActiveRecord — defining a resource is mostly declarative and the framework handles the HTTP plumbing. Relationship endpoints (GET/POST/PATCH/DELETE on `/articles/1/relationships/tags`) are first-class, which most hand-rolled implementations skip. The fixture set in tests is unusually thorough — 40+ models covering STI, namespaced routes, polymorphic relationships, and custom resource backing objects, so edge cases are actually tested. Response fragment caching exists as an explicit layer (`cached_response_fragment.rb`), which matters for read-heavy APIs where serializing large compound documents is the bottleneck.

The last real activity appears to be mid-2021 (copyright in the README ends there); the 2026-03 push is almost certainly a dependency bump or CI fix, not active development. JSON:API itself stalled at 1.0 and JR never shipped a stable v1 — the guide linked in the README is still labeled 'v0.10 alpha'. The Travis CI badge points to a dead service. If you're starting a new Rails API today, jsonapi-serializer (the JSONAPI::Serializers fork) combined with a lighter controller layer is a more maintainable choice than taking on a gem in maintenance-only mode.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
2,324
Forks
543
Language
Ruby
License
MIT
Last commit
4 Mar 2026

// nearby

If jsonapi-resources isn't quite it.

All repos →