diff --git a/packages/core/locales/en.json b/packages/core/locales/en.json index 29c213a994..12ee997a94 100644 --- a/packages/core/locales/en.json +++ b/packages/core/locales/en.json @@ -23,5 +23,14 @@ "Pubnub returned with error ! {\"name\"": "\"PubNubError\",\"status\":{\"message\":\"Missing Channel\",\"type\":\"validationError\",\"error\":true}}", "AWS SES Config missing !": "AWS SES Config missing !", "invalid input syntax for type uuid": " \"{\"to\":[{\"id\":\"14335492-38b6-2520-f1ab-b1b73aa5214c\",\"name\":\"Admin User\",\"type\":0}]}\"", - "EntityNotFound": "EntityNotFound" + "EntityNotFound": "EntityNotFound", + "Invalid Credentials": "Invalid Credentials", + "Token Invalid": "Token Invalid", + "User not found !": "User not found !", + "Required parameter token is missing!": "Required parameter token is missing!", + "Token Expired": "Token Expired", + "Not Found": "Not Found", + "WorkflowVersionNotFound": "WorkflowVersionNotFound", + "[{\"instancePath\"": "\"/valueB\",\"schemaPath\":\"#/properties/valueB/type\",\"keyword\":\"type\",\"params\":{\"type\":\"string\"},\"message\":\"must be string\"}]", + "WorkflowNotFound": "WorkflowNotFound" } \ No newline at end of file diff --git a/services/bpmn-service/openapi.json b/services/bpmn-service/openapi.json index 3bf90103c9..db0eef9842 100644 --- a/services/bpmn-service/openapi.json +++ b/services/bpmn-service/openapi.json @@ -348,6 +348,9 @@ }, "inputSchema": { "type": "object" + }, + "description": { + "type": "string" } }, "required": [ @@ -370,6 +373,9 @@ }, "inputSchema": { "type": "object" + }, + "description": { + "type": "string" } }, "required": [ @@ -392,6 +398,9 @@ }, "inputSchema": { "type": "object" + }, + "description": { + "type": "string" } }, "additionalProperties": true, diff --git a/services/bpmn-service/openapi.md b/services/bpmn-service/openapi.md index 0b50ac6492..2ac1860957 100644 --- a/services/bpmn-service/openapi.md +++ b/services/bpmn-service/openapi.md @@ -193,7 +193,8 @@ HTTPBearer const inputBody = '{ "name": "string", "bpmnFile": "string", - "inputSchema": {} + "inputSchema": {}, + "description": "string" }'; const headers = { 'Content-Type':'application/json', @@ -219,7 +220,8 @@ const fetch = require('node-fetch'); const inputBody = { "name": "string", "bpmnFile": "string", - "inputSchema": {} + "inputSchema": {}, + "description": "string" }; const headers = { 'Content-Type':'application/json', @@ -248,7 +250,8 @@ fetch('/workflow/{id}', { "name": "string", "bpmnFile": "string", - "inputSchema": {} + "inputSchema": {}, + "description": "string" } ``` @@ -412,7 +415,8 @@ HTTPBearer const inputBody = '{ "name": "string", "bpmnFile": "string", - "inputSchema": {} + "inputSchema": {}, + "description": "string" }'; const headers = { 'Content-Type':'application/json', @@ -439,7 +443,8 @@ const fetch = require('node-fetch'); const inputBody = { "name": "string", "bpmnFile": "string", - "inputSchema": {} + "inputSchema": {}, + "description": "string" }; const headers = { 'Content-Type':'application/json', @@ -469,7 +474,8 @@ fetch('/workflow', { "name": "string", "bpmnFile": "string", - "inputSchema": {} + "inputSchema": {}, + "description": "string" } ``` @@ -690,7 +696,8 @@ Workflow { "name": "string", "bpmnFile": "string", - "inputSchema": {} + "inputSchema": {}, + "description": "string" } ``` @@ -704,6 +711,7 @@ NewWorkflow |name|string|true|none|none| |bpmnFile|string|true|none|none| |inputSchema|object|true|none|none| +|description|string|false|none|none|

WorkflowDto

@@ -716,7 +724,8 @@ NewWorkflow { "name": "string", "bpmnFile": "string", - "inputSchema": {} + "inputSchema": {}, + "description": "string" } ``` @@ -730,6 +739,7 @@ WorkflowDto |name|string|true|none|none| |bpmnFile|string|true|none|none| |inputSchema|object|true|none|none| +|description|string|false|none|none|

WorkflowDtoPartial

@@ -742,7 +752,8 @@ WorkflowDto { "name": "string", "bpmnFile": "string", - "inputSchema": {} + "inputSchema": {}, + "description": "string" } ``` @@ -756,6 +767,7 @@ WorkflowDtoPartial |name|string|false|none|none| |bpmnFile|string|false|none|none| |inputSchema|object|false|none|none| +|description|string|false|none|none|

ExecuteWorkflowDto

diff --git a/services/bpmn-service/src/__tests__/const.ts b/services/bpmn-service/src/__tests__/const.ts index c2534d0015..2baf6a155b 100644 --- a/services/bpmn-service/src/__tests__/const.ts +++ b/services/bpmn-service/src/__tests__/const.ts @@ -5,6 +5,7 @@ export const MOCK_CAMUNDA = 'https://mock-camunda.api/engine-rest'; export const firstTestBpmn: WorkflowDto = new WorkflowDto({ name: 'first-bpmn', bpmnFile: JSON.stringify(['topic1', 'topic2']), + description: 'test description', inputSchema: { type: 'object', properties: {valueA: {type: 'string'}, valueB: {type: 'string'}}, diff --git a/services/bpmn-service/src/controllers/workflow.controller.ts b/services/bpmn-service/src/controllers/workflow.controller.ts index adca3a8c22..2feba6666f 100644 --- a/services/bpmn-service/src/controllers/workflow.controller.ts +++ b/services/bpmn-service/src/controllers/workflow.controller.ts @@ -86,6 +86,7 @@ export class WorkflowController { name: workflowDto.name, provider: workflowResponse.provider, inputSchema: workflowDto.inputSchema, + description: workflowDto.description, }); const newWorkflow = await this.workflowRepository.create(entity); @@ -136,6 +137,7 @@ export class WorkflowController { name: workflowDto.name, provider: workflowResponse.provider, inputSchema: workflowDto.inputSchema, + description: workflowDto.description, }); await this.workflowRepository.updateById(id, entity); diff --git a/services/bpmn-service/src/models/workflow-dto.model.ts b/services/bpmn-service/src/models/workflow-dto.model.ts index 6edf575511..d2b824a205 100644 --- a/services/bpmn-service/src/models/workflow-dto.model.ts +++ b/services/bpmn-service/src/models/workflow-dto.model.ts @@ -24,6 +24,11 @@ export class WorkflowDto extends Model { }) inputSchema: AnyObject; + @property({ + type: 'string', + }) + description: string; + constructor(data?: Partial) { super(data); }