Implementacion de endpoint que filtra explorers por stack #177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Para la implementacion de esta nueva funcionalidad se hizo lo siguiente:
Instalacion de dependencias,
1.1 Ligero cambio en la ruta del script de test para Windows en package.json
1.2 Instalacion de jest version 26 para que puedan ejecutarse las pruebas unitarias en github actions
Se agrego un metodo estatico filterByStack en la class ExplorerService, que recibe dos parametros (explorers, stack). Este metodo busca que un stack determinado esta en la propiedad stacks del array explorers.
Se agrego un metodo estatico getExplorerByStack en la clase ExplorerController, el cual recibe el parametro stack. Este metodo utiliza el metodo ReadJsonFile previamente implementado y el metodo filterByStack de ExplorerService.
Se actualizo el server, con un nuevo endpoint con la url "/v1/explorers/stack/:stack", el cual toma el parametro dinamico stack via query params. Finalmente el endpoint despliega la lista de explorers que cumplan la condicion
Se crearon pruebas unitarias para los dos metodos implementados en ExplorerController y ExplorerService.
Se ejecuto linter para mantener estilo en codigo