From f1b8efd14b4849c5879be73add2c0f65e1639331 Mon Sep 17 00:00:00 2001 From: Andrew Brain <61482022+ABrain7710@users.noreply.github.com> Date: Fri, 20 Aug 2021 12:34:01 -0500 Subject: [PATCH] Add undocumented endpoint (licenses-declared by repo_id) Signed-off-by: Andrew Brain <61482022+ABrain7710@users.noreply.github.com> --- docs/source/rest-api/spec.yml | 43 +++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/docs/source/rest-api/spec.yml b/docs/source/rest-api/spec.yml index a03581058d..51b52d9fd6 100644 --- a/docs/source/rest-api/spec.yml +++ b/docs/source/rest-api/spec.yml @@ -99,7 +99,7 @@ paths: /owner/:owner/repo/:repo: get: description: Get the repo_group_id and repo_id of a particular repo. - operationId: Get Repo by Owner and Repo + operationId: Get Repo by Owner and Repo Name responses: '200': description: OK @@ -834,6 +834,45 @@ paths: type: array tags: - risk + /repo-groups/:repo_id/license-count: + get: + description: 'The declared software package license (fetched from CII Best Practices + badging data). ' + externalDocs: + description: CHAOSS Metric Definition + url: https://github.com/chaoss/wg-risk/blob/master/focus-areas/licensing.md + operationId: License Count (Repo) + parameters: + - description: Repository Group ID + in: path + name: repo_group_id + schema: + type: string + type: string + - description: Repository ID. + in: path + name: repo_id + schema: + type: string + type: string + responses: + '200': + description: OK + schema: + items: + properties: + file_without_licenses: + description: 'Example: True' + type: string + name: + description: 'Example: ActorServiceRegistry' + type: string + number_of_license: + description: 'Example: 2' + type: integer + type: array + tags: + - risk @@ -4240,7 +4279,7 @@ paths: - value - + #visualization endpoints /contributor_reports/new_contributors_bar/: get: