DDI supports sha256 (#869)

* Add SHA256 file hash to ddi GET outputs

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Integrate review findings for SHA256 changes

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Renamed hashes to base16hases in store() parameters

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Added missing javadoc according to sonarqube findings

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
This commit is contained in:
Alexander Dobler
2019-07-29 14:11:40 +02:00
committed by Dominic Schabel
parent fba6cf9787
commit bde3548846
20 changed files with 131 additions and 53 deletions

View File

@@ -112,6 +112,8 @@ final class DdiApiModelProperties {
static final String ARTIFACT_HASHES_SHA1 = "SHA1 hash of the artifact in Base 16 format";
static final String ARTIFACT_HASHES_MD5 = "MD5 hash of the artifact";
static final String ARTIFACT_HASHES_SHA256 = "SHA-256 hash of the artifact in Base 16 format";
static final String ARTIFACT_SIZE = "size of the artifact";
static final String ACTION_HISTORY = "Optional GET parameter to retrieve a given number of messages which are previously provided by the device. "

View File

@@ -321,6 +321,8 @@ public class RootControllerDocumentationTest extends AbstractApiRestDocumentatio
.description(DdiApiModelProperties.ARTIFACT_HASHES_SHA1),
fieldWithPath("deployment.chunks[].artifacts[].hashes.md5")
.description(DdiApiModelProperties.ARTIFACT_HASHES_MD5),
fieldWithPath("deployment.chunks[].artifacts[].hashes.sha256")
.description(DdiApiModelProperties.ARTIFACT_HASHES_SHA256),
fieldWithPath("deployment.chunks[].artifacts[].size")
.description(DdiApiModelProperties.ARTIFACT_SIZE),
fieldWithPath("deployment.chunks[].artifacts[]._links.download")
@@ -451,6 +453,8 @@ public class RootControllerDocumentationTest extends AbstractApiRestDocumentatio
fieldWithPath("[]hashes").description(DdiApiModelProperties.ARTIFACTS),
fieldWithPath("[]hashes.sha1").description(DdiApiModelProperties.ARTIFACT_HASHES_SHA1),
fieldWithPath("[]hashes.md5").description(DdiApiModelProperties.ARTIFACT_HASHES_MD5),
fieldWithPath("[]hashes.sha256")
.description(DdiApiModelProperties.ARTIFACT_HASHES_SHA256),
fieldWithPath("[]size").description(DdiApiModelProperties.ARTIFACT_SIZE),
fieldWithPath("[]_links.download")
.description(DdiApiModelProperties.ARTIFACT_HTTPS_DOWNLOAD_LINK_BY_CONTROLLER),