Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Compatibility with JSONAPI::Authorization (Resource Caching)

Open
#1,177 1 comment 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
api, backend

Research direction

Start at lib/jsonapi/cached_response_fragment.rb around line 87 and review how Cached Resource currently represents the resource. Check the linked JSONAPI::Authorization issue and the reported fork solution, then determine whether exposing the original model resolves the missing model key without adverse effects. Done means Cached Resource works with JSONAPI::Authorization resource caching.

Written by the indexing model from the issue text.

Description

This issue is a (choose one):

  • Feature request.

Checklist before submitting:

  • I've searched for an existing issue.
  • The feature I'm asking for is compliant with the JSON:API spec.

Description

JSONAPI::Authorization is a pundit based authorization tool that works out-of-the-box with jsonapi-resources' ActiveRecord backed resources.
The problem is with Cached Resource as it does not have a model key.

JSONAPI::Authorization's related issue https://github.com/venuu/jsonapi-authorization/issues/67

Features:

Exposing the original model into cache in CachedResourceFramgment(https://github.com/cerebris/jsonapi-resources/blob/master/lib/jsonapi/cached_response_fragment.rb#L87) would solve the problem easily – not sure about the cons.

I have a working solution in my fork so I can submit a PR If you are OK with the idea.

Dominant language
Ruby
Stars
2.3k
Forks
546
PR merge metrics
No merged PRs in 30d

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JSONAPI-Resources/jsonapi-resources

All issues in JSONAPI-Resources/jsonapi-resources

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.