Currently the fruits service gets the list of all available nutritions to search on from a list that gets populated by hand. It would be ideal to not have to make a list, but instead have the list be generated from the interface itself.
One solution is to use the npm package ts-transformer-keys. The code I would have to write using this package looks very easy to use and to understand. The problem is that typescript itself does not allow an easy way to use custom transformers. This is important to the functioning of the npm package. There are several other options to allow the usage of custom transformers, but investigating them right now would take away from the purpose of this project.
Currently the fruits service gets the list of all available nutritions to search on from a list that gets populated by hand. It would be ideal to not have to make a list, but instead have the list be generated from the interface itself.
One solution is to use the npm package ts-transformer-keys. The code I would have to write using this package looks very easy to use and to understand. The problem is that typescript itself does not allow an easy way to use custom transformers. This is important to the functioning of the npm package. There are several other options to allow the usage of custom transformers, but investigating them right now would take away from the purpose of this project.