Description
License Objects should have an identifier
field, which can hold Software Package Data Exchange license identifiers 😄
From the SPDX Specification:
Identifying the license for open source software is critical for both reporting purposes and license compliance. However, determining the license can sometimes be difficult due to a lack of information or ambiguous information. Even when licensing information is present, a lack of consistent notation can make automating the task of license detection very difficult, thus requiring vast amounts of human effort.
https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b
Rationale
The OpenAPI Specification, as we all know, is meant to be machine and human readable1.
Adding a standardized, machine-readable license field would allow for the following:
- more precision w/r/t specific licenses, without the brittleness of a
url
field (URL rot is a thing!) - automatic linking to common licenses in documentation tools, even if the author omits a link
- an index that categorizes APIs by license without relying on
license.name
string comparison - an OpenAPI client that automatically checks for compliance with services it interacts with