API returns invalid IGV config
Background
The changes made to igvconfig.js during the process of creating pydantic request/response models inadvertently broke the data structure that is passed to igv.js
. Enum.name
was used rather than Enum
, so the all uppercase enum name was used in the structure rather than the appropriately cased value (e.g., config.NAME
, config.INDEXURL
instead of config.name
, config.indexURL
). Additionally, the pydantic models were not being used as expected, which allowed the bad structures to go unnoticed.
Implementation
Use enums as dict keys, not Enum.name
. Ideally this should be rewritten to use a pydantic model for loading the config file directly, but that is outside the scope until the frontend refactor is complete.
Edited by Tor Solli-Nowlan