REST API for Getting the license for a repository... #38797
Replies: 2 comments
-
Hi there @shissam and welcome to our community! Thank you for asking a great question 🙂 To get started, introduce yourself in our official introduction thread |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
The documentation page to Get the license for a repository is very clear about the mechanics for this REST API call--thank you for that.
What I cannot seem to find is the semantics for the response for a License. The response schema tells the data types, but in some cases not what it is that is being returned (and likely expected values). For example:
"type" (which in the schema says it is "object", but what other possible answer besides "file" could it be?)
"key" (type is string) is most often (but not always) simply the lowercase form of "spdx_id"--which is the authoritative answer?
"spdx_id" (again string) I believe is sources from Ruby Gem Licensee so I believe the possible values are from there, with the exception of "NOASSERTION" (when the API is used again
torvalds/linux
repo) which is the only time I foundkey != strings.toLower(spdx_id)
(pls forgive the loose syntax approach here)other key/value pairs in the response are "self-defined" (like those dealing with urls, titles, etc.) - but some fields (like "type" and "key" are a bit more vague w.r.t. knowing what to expect when developing code against this API.
if there is a place which provides this info -- it would be greatly appreciated.
thanks!
Beta Was this translation helpful? Give feedback.
All reactions