SciCatProject / scicat-backend-next

SciCat Data Catalogue Backend
https://scicatproject.github.io/documentation/
BSD 3-Clause "New" or "Revised" License
19 stars 23 forks source link

Parse config files as YAML #1120

Open sbliven opened 7 months ago

sbliven commented 7 months ago

Since YAML is a strict superset of JSON, we can accept YAML for all config files in a fully backwards-compatible manner. This is also fully supported by NestJS.

  1. Add js-yaml and @types/js-yaml packages
  2. Replace json.load with yaml.load
  3. Accept .json, .yaml, and .yml file extensions for the config files (stopping with the first one found)
bpedersen2 commented 7 months ago

Good idea! :+1:

despadam commented 3 weeks ago

As seen also in the comment here: https://github.com/SciCatProject/scicat-backend-next/issues/841#issuecomment-2391485867