Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Ability to cache for offline usage

Abierto
#43 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
typescript
Área
api

Línea de trabajo

Empieza leyendo src/hydra/parseHydraDocumentation.js, especialmente la sección de parsing enlazada en las líneas 196-442, y revisa las pruebas existentes que usan JSON.stringify(). Define el límite entre la obtención y el parsing, y después verifica que las especificaciones de API se puedan restaurar para su uso offline sin perder referencias; llegar a un acuerdo sobre el diseño forma parte de lo que se considera terminado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
113
Forks
80
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de api-platform/api-doc-parser

Todos los issues de api-platform/api-doc-parser

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.