Closed brunopacheco1 closed 1 month ago
This PR updates the distribution model by replacing the single 'uri' field with two new fields: 'accessUrl' and 'downloadUrl'. The changes are implemented across the OpenAPI specifications and their corresponding Java implementations, including necessary updates to the mapping logic and test cases.
classDiagram
class PackageShowMapper {
+RetrievedDistribution distribution(CkanResource ckanResource)
}
class RetrievedDistribution {
+String title
+String description
+ValueLabel format
+String accessUrl
+String downloadUrl
+String createdAt
+String modifiedAt
}
class CkanResource {
+String name
+String description
+String format
+String accessUrl
+String downloadUrl
+String created
+String lastModified
}
PackageShowMapper --> RetrievedDistribution
RetrievedDistribution --> ValueLabel
CkanResource --> RetrievedDistribution
Change | Details | Files |
---|---|---|
Updated OpenAPI specifications to replace 'uri' with 'accessUrl' and 'downloadUrl' |
|
src/main/openapi/discovery.yaml src/main/openapi/ckan.yaml |
Updated Java implementation to handle new URL fields |
|
src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanDatasetsRepository.java src/main/java/io/github/genomicdatainfrastructure/discovery/utils/PackageShowMapper.java src/test/java/io/github/genomicdatainfrastructure/discovery/services/PackageShowMapperTest.java |
Summary by Sourcery
Introduce 'accessUrl' and 'downloadUrl' fields to the distribution schema in the OpenAPI specification and update related tests to reflect these changes. Remove unnecessary 'title' attributes from schema components to streamline the specification.
New Features:
Enhancements:
Tests: