Extend get module artifacts API by download URL (#1390)

* Introduce request parameter to request download URLs when retrieving list of artifacts for a specific software module.

* Fix DDI integration test by aligning download path to new config

* Make use of mgmt representation mode in sw-module mgmt api

* Changed path

* refactor test names
This commit is contained in:
Michael Herdt
2023-07-12 15:50:59 +02:00
committed by GitHub
parent 593a0bb146
commit 160e44f0ef
9 changed files with 152 additions and 58 deletions

View File

@@ -276,7 +276,6 @@ public final class MgmtRestConstants {
*/
public static final String REQUEST_PARAMETER_USE_ARTIFACT_URL_HANDLER = "useartifacturlhandler";
// constant class, private constructor.
private MgmtRestConstants() {

View File

@@ -82,7 +82,9 @@ public interface MgmtSoftwareModuleRestApi {
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
+ "/{softwareModuleId}/artifacts", produces = { MediaTypes.HAL_JSON_VALUE,
MediaType.APPLICATION_JSON_VALUE })
ResponseEntity<List<MgmtArtifact>> getArtifacts(@PathVariable("softwareModuleId") final Long softwareModuleId);
ResponseEntity<List<MgmtArtifact>> getArtifacts(@PathVariable("softwareModuleId") final Long softwareModuleId,
@RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE_DEFAULT) String representationModeParam,
@RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_USE_ARTIFACT_URL_HANDLER, required = false) final Boolean useArtifactUrlHandler);
/**
* Handles the GET request of retrieving a single Artifact meta data