JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources
Add full scaffold generator support
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Ruby
- Sterne
- 2.3k
- Forks
- 546
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Features:
note: this issue (or something similar to it) was brought up by @eccegordo in https://github.com/cerebris/jsonapi-resources/issues/1241. I opened this issue because I did not want to automatically close his in case our requests diverged, but will follow up with that issue if this issue is resolved with my PR.
As a developer, I need to be able to spin up new services, collect feedback, and validate those proofs-of-concepts as quickly as possible. Any time I spend writing boilerplate code is time not spent working on real value-adding features or concepts.
As such, I would like a way to quickly, consistently, and safely generate all of the required base file structures to get a jsonapi resource/endpoint working. Further, I would like these generated files to be opinionated, and help me fall into a "pit of success" / good practices.
In scope:
- generate (flat or name-spaced) base controllers
- generate (flat or name-spaced) controllers
- generate (flat or name-spaced) base resources
- generate (flat or name-spaced) resources
- generate (flat or name-spaced) base models
- generate (flat or name-spaced) models
- generate (flat or name-spaced) routes
Out of scope:
- declare attributes, associations, or other defining characteristics during generation
- parameterized generation options (e.g. "don't generate base classes")
- generate (flat or name-spaced) tests (future PR)
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die vorhandenen Generator-Einstiegspunkte und Konventionen des Repositorys mit der Liste im Scope abzugleichen: Controller, Ressourcen, Modelle und Routen, jeweils in flachen und namespaceten Formen. Als erledigt gilt die konsistente Generierung der angeforderten Basis- und konkreten Dateien, während Attribute, Assoziationen, parametrisierte Optionen und Tests nicht im Scope sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rails, ruby
- Bereich
- api, backend, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100