Web API: make endpoints that expose extracted metadata return *lists* of factual information
We are currently following quite closely our principles of "storing only facts" in the archive, so we never report just statements like "the licence is GPL", but qualified statements like "according to tool X, the licence is GPL".
See for example https://archive.softwareheritage.org/api/1/content/sha1:2d8280fbabf9a1eabbcbc562b9763cb07952118b/license/
{ "content_url": "/api/1/content/sha1:2d8280fbabf9a1eabbcbc562b9763cb07952118b/", "id": "2d8280fbabf9a1eabbcbc562b9763cb07952118b", "licenses": [ "Dual-license", "GPL", "MIT", "MIT-style" ], "tool": { "configuration": { "command_line": "nomossa " }, "id": 1, "name": "nomos", "version": "3.1.0rc2-31-ga2cbb8c" } }
The JSON format in the above example, though, is not general enough. In the future, we will store several qualified statements for the same property, like "according to tool X, licence is GPL, and according to tool Y, licence is MPL".
Migrated from T782 (view on Phabricator)