JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources

resource/scaffold generator

Open
#1,241 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This issue is a (choose one):

  • [X ] Feature request.

Checklist before submitting:

  • [X ] I've searched for an existing issue.

Description

Is there or could there be something like a scaffold and/or resource generator?

In particular it would be very convenient if a simple generator that did the following:

create a model
create a generic "empty" controller that used JR
create create a resource with the same attributes as model
create a jsonapi_resources namespace in the router.rb

bonus points...

a generator that was relationship aware for sideloading and or able to do stub out basic filtering and pagination features.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by inspecting the project’s generator-related entry points and router.rb to determine whether generator support already exists. Define the initial scope before implementation: model, generic JR controller, matching resource attributes, and a jsonapi_resources namespace; treat relationship-aware sideloading, filtering, and pagination as separate bonus work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.