From 7eecb5f7ea1fec59705af58fffed5a54f9ea12a5 Mon Sep 17 00:00:00 2001 From: Richard Treier Date: Wed, 11 Oct 2023 08:19:37 +0200 Subject: [PATCH] fix: custom data address for EDC 0 (#512) --- src/app/core/services/http-params-mapper.service.ts | 2 +- src/app/core/services/models/data-address-properties.ts | 2 +- .../asset-create-dialog/asset-create-dialog.component.html | 2 +- .../contract-agreement-transfer-dialog.component.html | 6 +++--- .../contract-agreement-transfer-dialog.component.ts | 3 --- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/app/core/services/http-params-mapper.service.ts b/src/app/core/services/http-params-mapper.service.ts index c440be0ec..5b20cc4e9 100644 --- a/src/app/core/services/http-params-mapper.service.ts +++ b/src/app/core/services/http-params-mapper.service.ts @@ -51,7 +51,7 @@ export class HttpRequestParamsMapper { [DataAddressProperty.pathSegments]: proxyPath ? pathSegments : null, [DataAddressProperty.queryParams]: proxyQueryParams ? queryParams : null, [DataAddressProperty.body]: proxyBody ? body : null, - [DataAddressProperty.mediaType]: proxyBody ? contentType : null, + [DataAddressProperty.contentType]: proxyBody ? contentType : null, }); } diff --git a/src/app/core/services/models/data-address-properties.ts b/src/app/core/services/models/data-address-properties.ts index f02cc36d7..d92f3cf2f 100644 --- a/src/app/core/services/models/data-address-properties.ts +++ b/src/app/core/services/models/data-address-properties.ts @@ -6,7 +6,7 @@ export const DataAddressProperty = { baseUrl: `${EDC}baseUrl`, body: `${EDC}body`, header: `${EDC}header`, - mediaType: `${EDC}mediaType`, + contentType: `${EDC}contentType`, method: `${EDC}method`, pathSegments: `${EDC}pathSegments`, proxyBody: `${EDC}proxyBody`, diff --git a/src/app/routes/connector-ui/asset-page/asset-create-dialog/asset-create-dialog.component.html b/src/app/routes/connector-ui/asset-page/asset-create-dialog/asset-create-dialog.component.html index 07342e2d1..9aff4d102 100644 --- a/src/app/routes/connector-ui/asset-page/asset-create-dialog/asset-create-dialog.component.html +++ b/src/app/routes/connector-ui/asset-page/asset-create-dialog/asset-create-dialog.component.html @@ -190,7 +190,7 @@

Create New Asset

Custom Datasource Config (JSON) {{ validationMessages.invalidJsonMessage }} diff --git a/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.html b/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.html index 60ca125cc..c504c65ba 100644 --- a/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.html +++ b/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.html @@ -23,7 +23,7 @@

Initiate Transfer

Custom Datasink Config (JSON) {{ validationMessages.invalidJsonMessage }} @@ -44,8 +44,8 @@

Initiate Transfer

{{ validationMessages.invalidJsonMessage }}
- JSON Fields "assetId", "contractId" and "connectorAddress" will be - overridden. + JSON-LD values for "edc:connectorId", "edc:contractId", + "edc:connectorId" and "edc:connectorAddress" will be overridden. diff --git a/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.ts b/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.ts index da2259cd7..a23f7083a 100644 --- a/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.ts +++ b/src/app/routes/connector-ui/contract-agreement-page/contract-agreement-transfer-dialog/contract-agreement-transfer-dialog.component.ts @@ -122,9 +122,6 @@ export class ContractAgreementTransferDialogComponent implements OnDestroy { const customJson: any = JSON.parse( value.transferProcessRequest?.trim() ?? '', ); - customJson.assetId = this.data.asset.assetId; - customJson.contractId = this.data.contractId; - customJson.connectorAddress = this.data.asset.connectorEndpoint; return { type: 'CUSTOM_JSON',