diff --git a/augur/datasources/augur_db/routes.py b/augur/datasources/augur_db/routes.py index f928be7d8b..550e5485ce 100644 --- a/augur/datasources/augur_db/routes.py +++ b/augur/datasources/augur_db/routes.py @@ -788,3 +788,39 @@ def downloaded_repos(): ] """ server.addRepoMetric(augur_db.languages, 'languages') + + """ + @api {get} /repo-groups/:repo_group_id/license-declared License Declared + @apiName license-declared + @apiGroup Risk + @apiDescription CHAOSS Metric Definition + @apiParam {String} repo_group_id Repository Group ID + @apiSuccessExample {json} Success-Response: + [ + { + "repo_id": 21277, + "license": "Apache-2.0" + }, + { + "repo_id": 21252, + "license": "Apache-2.0" + } + ] + """ + server.addRepoGroupMetric(augur_db.license_declared, 'license-declared') + + """ + @api {get} /repo-groups/:repo_group_id/license-declared License Declared + @apiName license-declared + @apiGroup Risk + @apiDescription CHAOSS Metric Definition + @apiParam {String} repo_group_id Repository Group ID. + @apiParma {String} repo_id Repository ID. + @apiSuccessExample {json} Success-Response: + [ + { + "license": "Apache-2.0" + } + ] + """ + server.addRepoMetric(augur_db.license_declared, 'license-declared')