Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.23.0
-
None
Description
The Swagger file for the uploadProcessGroup function contains multiple 'body' parameters, which prevents correct documentation and usage. This issue seems to stem from the following method in the flow.service.ts file:
uploadProcessGroup(processGroupId = 'root', uploadProcessGroup: UploadProcessGroupRequest): Observable<any> { const payload = new FormData(); payload.append('id', processGroupId); payload.append('groupName', uploadProcessGroup.name); payload.append('positionX', uploadProcessGroup.position.x.toString()); payload.append('positionY', uploadProcessGroup.position.y.toString()); payload.append('clientId', uploadProcessGroup.revision.clientId); payload.append( 'disconnectedNodeAcknowledged', String(this.clusterConnectionService.isDisconnectionAcknowledged()) ); payload.append('file', uploadProcessGroup.flowDefinition); return this.httpClient.post( `${FlowService.API}/process-groups/${processGroupId}/process-groups`, payload ); }
Currently the resulting parameters look like this, note the 'name' fields:
"parameters" : [
, {
"in" : "body",
"name" : "body",
"description" : "The process group name.",
"required" : true,
"schema" :
}, {
"in" : "body",
"name" : "body",
"description" : "The process group X position.",
"required" : true,
"schema" :
}, {
"in" : "body",
"name" : "body",
"description" : "The process group Y position.",
"required" : true,
"schema" :
}, {
"in" : "body",
"name" : "body",
"description" : "The client id.",
"required" : true,
"schema" :
}, {
"in" : "body",
"name" : "body",
"description" : "Acknowledges that this node is disconnected to allow for mutable requests to proceed.",
"required" : false,
"schema" :
}
To resolve this issue, each property should have a unique and descriptive name in the FormData payload. This change will ensure that the Swagger file correctly documents these properties.