pull: Add {scheme}/{id}.json hardlinks
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 [1], although they currently have a fatter index [2,3,4,5].
os.link is implemented on Unix and Windows [6]. The ** recursive glob
pattern is new in Python 3.5 [7]; for older Pythons I'm falling back
to two non-recursive glob calls.
[1]: https://github.com/OpenSourceOrg/api/blob/
c903651ef26c35202d6561b61b97d29ead1e08c5/doc/endpoints.md#licenseschemeidentifier
[2]: https://github.com/OpenSourceOrg/api/blob/
c903651ef26c35202d6561b61b97d29ead1e08c5/doc/endpoints.md#licenses
[3]: https://github.com/OpenSourceOrg/api/blob/
c903651ef26c35202d6561b61b97d29ead1e08c5/api.go#L52
[4]: https://github.com/OpenSourceOrg/api/blob/
c903651ef26c35202d6561b61b97d29ead1e08c5/reload.go#L28
[5]: https://github.com/OpenSourceOrg/api/blob/
c903651ef26c35202d6561b61b97d29ead1e08c5/license/license.go#L67
[6]: https://docs.python.org/3.6/library/os.html#os.link
[7]: https://docs.python.org/3.6/library/glob.html#glob.glob