Feature mgmtapi add sha256 to softwaremodules (#918)

* Add sha256 hash to softwaremodules in mgmt api

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Adapt rest docs

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Edit comments

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add proper license header

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
This commit is contained in:
Sebastian Firsching
2020-01-13 12:36:14 +01:00
committed by Dominic Schabel
parent 0e9caf3a88
commit 5feb5873c4
14 changed files with 134 additions and 33 deletions

View File

@@ -47,6 +47,7 @@ public final class MgmtApiModelProperties {
public static final String ARTIFACT_PROVIDED_FILENAME = "Filename of the artifact.";
public static final String ARTIFACT_HASHES_SHA1 = "SHA1 hash of the artifact.";
public static final String ARTIFACT_HASHES_MD5 = "MD5 hash of the artifact.";
public static final String ARTIFACT_HASHES_SHA256 = "SHA256 hash of the artifact.";
public static final String ARTIFACT_DOWNLOAD_LINK = "Download link of the artifact.";

View File

@@ -266,6 +266,8 @@ public class SoftwaremodulesDocumentationTest extends AbstractApiRestDocumentati
fieldWithPath("[].hashes.md5").description(MgmtApiModelProperties.ARTIFACT_HASHES_MD5),
fieldWithPath("[].hashes.sha1")
.description(MgmtApiModelProperties.ARTIFACT_HASHES_SHA1),
fieldWithPath("[].hashes.sha256")
.description(MgmtApiModelProperties.ARTIFACT_HASHES_SHA256),
fieldWithPath("[].providedFilename")
.description(MgmtApiModelProperties.ARTIFACT_PROVIDED_FILENAME),
fieldWithPath("[]._links.self").ignored())));
@@ -299,6 +301,8 @@ public class SoftwaremodulesDocumentationTest extends AbstractApiRestDocumentati
.description(MgmtApiModelProperties.ARTIFACT_DOWNLOAD_LINK),
fieldWithPath("hashes.md5").description(MgmtApiModelProperties.ARTIFACT_HASHES_MD5),
fieldWithPath("hashes.sha1").description(MgmtApiModelProperties.ARTIFACT_HASHES_SHA1),
fieldWithPath("hashes.sha256")
.description(MgmtApiModelProperties.ARTIFACT_HASHES_SHA256),
fieldWithPath("providedFilename")
.description(MgmtApiModelProperties.ARTIFACT_PROVIDED_FILENAME)))
@@ -374,6 +378,8 @@ public class SoftwaremodulesDocumentationTest extends AbstractApiRestDocumentati
fieldWithPath("lastModifiedAt").description(ApiModelPropertiesGeneric.LAST_MODIFIED_AT),
fieldWithPath("hashes.md5").description(MgmtApiModelProperties.ARTIFACT_HASHES_MD5),
fieldWithPath("hashes.sha1").description(MgmtApiModelProperties.ARTIFACT_HASHES_SHA1),
fieldWithPath("hashes.sha256")
.description(MgmtApiModelProperties.ARTIFACT_HASHES_SHA256),
fieldWithPath("providedFilename")
.description(MgmtApiModelProperties.ARTIFACT_PROVIDED_FILENAME),
fieldWithPath("_links.self").ignored(), fieldWithPath("_links.download")