Skip to content

Commit

Permalink
fix: custom data address for EDC 0 (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardtreier committed Oct 11, 2023
1 parent f7bd8e8 commit 7eecb5f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/app/core/services/http-params-mapper.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/models/data-address-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ <h1 mat-dialog-title>Create New Asset</h1>
<mat-label>Custom Datasource Config (JSON)</mat-label>
<textarea
matInput
placeholder='{"properties": {"type": "HttpData", ...}}'
placeholder='{"https://w3id.org/edc/v0.0.1/ns/type": "HttpData", ...}'
[formControl]="ctrl"></textarea>
<mat-error *ngIf="ctrl.invalid && ctrl.errors?.jsonInvalid">
{{ validationMessages.invalidJsonMessage }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h1 mat-dialog-title>Initiate Transfer</h1>
<mat-label>Custom Datasink Config (JSON)</mat-label>
<textarea
matInput
placeholder='{"properties": {"type": "HttpData", ...}}'
placeholder='{"https://w3id.org/edc/v0.0.1/ns/type": "HttpData", ...}'
[formControl]="ctrl"></textarea>
<mat-error *ngIf="ctrl.invalid && ctrl.errors?.jsonInvalid">
{{ validationMessages.invalidJsonMessage }}
Expand All @@ -44,8 +44,8 @@ <h1 mat-dialog-title>Initiate Transfer</h1>
{{ validationMessages.invalidJsonMessage }}
</mat-error>
<mat-hint>
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.
</mat-hint>
</mat-form-field>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 7eecb5f

Please sign in to comment.