Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Ability to cache for offline usage

Aperta
#43 1 commento 0 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
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
api

Direzione di ricerca

Inizia leggendo src/hydra/parseHydraDocumentation.js, in particolare la sezione di parsing collegata alle righe 196-442, e rivedi i test esistenti che usano JSON.stringify(). Definisci il confine tra il recupero e il parsing, quindi verifica che le specifiche API possano essere ripristinate per l’uso offline senza perdere riferimenti; raggiungere un accordo sul design fa parte del completamento.

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

Descrizione

Hacktoberfest

Hi,

I'd like to be able to initialize the API specs from an existing cache in order to get the most recently known state of the api docs in case of offline usage.

Basically I need to be able to serialize the specs into JSON and deserialize from JSON. As far as I can see the tests currently utilize JSON.stringify() already which is nice but in my case I'm getting issues with an API spec which has circular references internally (e.g. a Resource is referencing another Resource its Field.reference property).

As the parseHydraDocumentation is capable of creating those references properly based on the api docs I'm currently thinking that utilizing the collected response(s) for caching and instantiate a new instance of Api with its belongings from that state.

If I see it correctly it should be sufficient to separate the "fetch" and "parse" capabilities that are currently handled implicitly in the parseHydraDocumentation - like having one separately exported function that does only the parsing which is currently done here:

https://github.com/api-platform/api-doc-parser/blob/a9e097339ecd88b0515238c49e504ff17edcc1c3/src/hydra/parseHydraDocumentation.js#L196-L442

I could try to come up with a PR for this but I'd like to get some opinions on that first.

Best

Lingua principale
TypeScript
Stelle
113
Fork
80
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 api-platform/api-doc-parser

Tutte le issue di api-platform/api-doc-parser

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.