Skip to content

Commit

Permalink
fix: allow method parameterization to be skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
richardtreier committed Apr 10, 2024
1 parent 53bf959 commit 434d591
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ the detailed section referring to by linking pull requests or issues.
- Fixed an asset select issue resulting from a bad compare function
- Asset: Fix double encoding of query params by disallowing '&' and '=' chars in
form field and sending them unencoded
- Fixed Method Parameterization always showing "GET", added unselected option.

#### Deployment Migration Notes

Expand Down
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 @@ -48,7 +48,7 @@ export class HttpRequestParamsMapper {
asset.httpDatasourceHintsProxyBody;

return removeNullValues({
[DataAddressProperty.method]: proxyMethod ? method : null,
[DataAddressProperty.method]: proxyMethod && method ? method : null,
[DataAddressProperty.pathSegments]: proxyPath ? pathSegments : null,
[DataAddressProperty.queryParams]: proxyQueryParams ? queryParams : null,
[DataAddressProperty.body]: proxyBody ? body : null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class ContractAgreementTransferDialogForm {
showAllHttpParameterizationFields: [false],

httpProxiedPath: [''],
httpProxiedMethod: ['GET'],
httpProxiedMethod: [''],
httpProxiedQueryParams: this.formBuilder.array(
new Array<FormGroup<HttpDatasourceQueryParamFormModel>>(),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ <h1 mat-dialog-title>Initiate Transfer</h1>
*ngIf="form.all.controls.httpProxiedMethod; let ctrl"
[ngClass]="{'w-1/3': proxyPath}">
<mat-label>Custom Method</mat-label>
<mat-select [formControl]="ctrl">
<mat-select placeholder="Custom Method" [formControl]="ctrl">
<mat-option></mat-option>
<mat-option
*ngFor="let method of dataSourceMethods"
[value]="method"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,28 @@ export class ContractAgreementTransferDialogComponent implements OnDestroy {
get proxyMethod(): boolean {
return (
this.showAllHttpParameterizationFields ||
this.data.asset.httpDatasourceHintsProxyMethod == true
this.data.asset.httpDatasourceHintsProxyMethod === true
);
}

get proxyPath(): boolean {
return (
this.showAllHttpParameterizationFields ||
this.data.asset.httpDatasourceHintsProxyPath == true
this.data.asset.httpDatasourceHintsProxyPath === true
);
}

get proxyQueryParams(): boolean {
return (
this.showAllHttpParameterizationFields ||
this.data.asset.httpDatasourceHintsProxyQueryParams == true
this.data.asset.httpDatasourceHintsProxyQueryParams === true
);
}

get proxyBody(): boolean {
return (
this.showAllHttpParameterizationFields ||
this.data.asset.httpDatasourceHintsProxyBody == true
this.data.asset.httpDatasourceHintsProxyBody === true
);
}

Expand Down

0 comments on commit 434d591

Please sign in to comment.