Putting additional metadata in the licenses.json index is a slippery-slope. This commit strips it down to an array of IDs, and all per-license metadata must be fetched via a single-license endpoint.
The new per-scheme links allow folks to retrieve per-license metadata using their chosen scheme (assuming they trust the mapping maintained in this API) without having to iterate over licenses.json retrieving {FSF-id}.json until they find a match. The OSI API uses the same approach, although they currently haveafatterindex.
This is the “thin index” alternative to #5; the index-fattness discussion is in #1.
And for what it's worth, this change moves licenses.json from 13kB down to 2.2kB, although the spdx/tools implementation in flight with spdx/tools#112 would no longer need to hit licenses.json at all.
Putting additional metadata in the
licenses.json
index is a slippery-slope. This commit strips it down to an array of IDs, and all per-license metadata must be fetched via a single-license endpoint.The new per-scheme links allow folks to retrieve per-license metadata using their chosen scheme (assuming they trust the mapping maintained in this API) without having to iterate over
licenses.json
retrieving{FSF-id}.json
until they find a match. The OSI API uses the same approach, although they currently have a fatter index.os.link
is implemented on Unix and Windows. The**
recursive glob pattern is new in Python 3.5; for older Pythons I'm falling back to two non-recursiveglob
calls.This is the “thin index” alternative to #5; the index-fattness discussion is in #1.
And for what it's worth, this change moves
licenses.json
from 13kB down to 2.2kB, although the spdx/tools implementation in flight with spdx/tools#112 would no longer need to hitlicenses.json
at all.