aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.ts')
-rw-r--r--sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.ts b/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.ts
index f2d802c2..a50cc1be 100644
--- a/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task-parameters/rest-task-parameters.component.ts
@@ -18,6 +18,7 @@ import { RestTask } from '../../../../model/workflow/rest-task';
import { BroadcastService } from '../../../../services/broadcast.service';
import { RestParameter } from "../../../../model/workflow/rest-parameter";
import { ValueSource } from "../../../../model/value-source.enum";
+import { SwaggerTreeConverterService } from "../../../../services/swagger-tree-converter.service";
/**
* property component presents information of a workflow node.
@@ -39,7 +40,7 @@ export class RestTaskParametersComponent implements OnInit {
private index = 1;
- constructor(private broadcastService: BroadcastService) {
+ constructor(private broadcastService: BroadcastService, private swaggerTreeConverterService: SwaggerTreeConverterService) {
}
public ngOnInit() {
@@ -55,8 +56,10 @@ export class RestTaskParametersComponent implements OnInit {
this.task.parameters.forEach(param => {
if (param.position === 'body') {
- // TODO add body parameter handler
- // this.bodyParameter.push(param);
+ const requestTreeNode = this.swaggerTreeConverterService
+ .schema2TreeNode('Request Param', this.task.serviceName, this.task.serviceVersion, param.schema);
+ param.value = param.schema.value;
+ this.bodyParameter.push(requestTreeNode);
} else {
this.requestParameters.push(param);
}