diff --git a/CHANGELOG.md b/CHANGELOG.md index 37eb95678..9de406e55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## 1.22.1 - 2023-11-10 +### Unreleased +- Added License details in dataset object response + ### Fixed - Fixed hearthbeat bug where if the owner was not set in extractors_info.json clowder would throw and error and the extractor would not get registered. diff --git a/app/models/Dataset.scala b/app/models/Dataset.scala index 4c682963c..066331a1a 100644 --- a/app/models/Dataset.scala +++ b/app/models/Dataset.scala @@ -110,7 +110,17 @@ object Dataset { "thumbnail" -> datasetThumbnail, "authorId" -> dataset.author.id, "spaces" -> dataset.spaces, - "resource_type" -> "dataset") + "resource_type" -> "dataset", + "license" -> Json.obj( + "license_type" -> dataset.licenseData.m_licenseType, + "license_url" -> dataset.licenseData.m_licenseUrl, + "license_text" -> dataset.licenseData.m_licenseText, + "holders" -> dataset.licenseData.m_rightsHolder, + "ccAllowCommercial" -> dataset.licenseData.m_ccAllowCommercial, + "ccAllowDerivative" -> dataset.licenseData.m_ccAllowDerivative, + "ccRequireShareAlike" -> dataset.licenseData.m_ccRequireShareAlike + ) + ) } } }