Add readme to translators folder

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-08-04 00:38:44 +01:00
parent 1c0081b570
commit 23ad8969f9

View File

@ -0,0 +1,7 @@
# Translators
The utilities in the `translators` folder translate the upstream API into the downstream API.
The aim of the translators is to ensure a consistent data format while removing any unused data to keep the response sizes as small as possible.
Translators are kept in separate files so changes can be made in one place. Each translator exports a single function 'transform()'. This function accepts data from the upstream API and uses other functions in the file to build the API response object before returning that object to the caller.