Extract REST Resources into standalone Gem

Aperta
#1,194 4 commenti 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
28/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
ruby

Direzione di ricerca

Inizia esaminando le risorse generate in lib/shopify_api/rest e l’architettura del gem proposta in questa issue. Definisci il confine dell’estrazione e il rapporto tra il gem standalone e il gem Shopify API esistente; il lavoro è completato quando le risorse REST sono separate senza perdere le relative interfacce degli endpoint, il response casting e gli attributi e metodi definiti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The REST resources have key roles as they provide an interface in interacting with every endpoint of the API as well as casting responses into objects with defined attributes and methods.

These files are all generated from an OpenAPI schema that, ironically, are not yet open to the public. Given how many files are generated across many different versions of the API, this surface area brings a large amount of bugs and the root causes are found upstream in processes the community doesn't have access to. We have immediate plans to move those schemas/logic into the open source sphere, but we'd also like to take this time to extract the resources into their own gem separate from this Gem.

Why extract these resources into their own gem

  1. Fewer breaking changes to the foundational authentication/client level gem.
  2. Encourage more customization. Many of our users were upset about the direction of removing ActiveModel from our resources. By uncoupling these files from the foundational API we open the community up to add features, create their own gems, and better customize their development experience without having to fork the core authentication/client logic of this root gem.
  3. Open up the path for similar GraphQL types / interfaces.

Gem Architecture

Gem Name Job
Shopify API (this gem) Obtain a session, clients for APIs (REST, GraphQL), error handling, webhook management
REST Resources Interfaces to the APIs. Response casting into defined objects with attributes/methods
Shopify App Build Shopify app using Rails conventions. Oauth, webhook processing, persistence, etc
App Template Template demonstrating how to use all these components in one starting boilerplate application
Lingua principale
Ruby
Stelle
1.1k
Fork
484
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Shopify/shopify-api-ruby

Tutte le issue di Shopify/shopify-api-ruby

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.