From bd3442480314ec8cc6846b3b004125a8cb454695 Mon Sep 17 00:00:00 2001 From: Ankur Date: Mon, 18 Oct 2021 15:30:55 +0530 Subject: [PATCH] fix(bpmn-service): changed basePath changed basePath from '/workflow' to '/workflows' BREAKING CHANGE: changed basePath from '/workflow' to '/workflows' gh-382 --- services/bpmn-service/openapi.json | 8 ++-- services/bpmn-service/openapi.md | 42 +++++++++---------- .../workflow.controller.acceptance.ts | 2 +- .../src/controllers/workflow.controller.ts | 2 +- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/services/bpmn-service/openapi.json b/services/bpmn-service/openapi.json index db0eef9842..0a27268801 100644 --- a/services/bpmn-service/openapi.json +++ b/services/bpmn-service/openapi.json @@ -9,7 +9,7 @@ } }, "paths": { - "/workflow/{id}/execute": { + "/workflows/{id}/execute": { "post": { "x-controller-name": "WorkflowController", "x-operation-name": "startWorkflow", @@ -49,7 +49,7 @@ "operationId": "WorkflowController.startWorkflow" } }, - "/workflow/{id}/version/{version}": { + "/workflows/{id}/version/{version}": { "delete": { "x-controller-name": "WorkflowController", "x-operation-name": "deleteVersionById", @@ -87,7 +87,7 @@ "operationId": "WorkflowController.deleteVersionById" } }, - "/workflow/{id}": { + "/workflows/{id}": { "patch": { "x-controller-name": "WorkflowController", "x-operation-name": "updateById", @@ -182,7 +182,7 @@ "operationId": "WorkflowController.deleteById" } }, - "/workflow": { + "/workflows": { "post": { "x-controller-name": "WorkflowController", "x-operation-name": "create", diff --git a/services/bpmn-service/openapi.md b/services/bpmn-service/openapi.md index 2ac1860957..bc80571c00 100644 --- a/services/bpmn-service/openapi.md +++ b/services/bpmn-service/openapi.md @@ -48,7 +48,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow/{id}/execute', +fetch('/workflows/{id}/execute', { method: 'POST', body: inputBody, @@ -73,7 +73,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow/{id}/execute', +fetch('/workflows/{id}/execute', { method: 'POST', body: JSON.stringify(inputBody), @@ -87,7 +87,7 @@ fetch('/workflow/{id}/execute', ``` -`POST /workflow/{id}/execute` +`POST /workflows/{id}/execute` > Body parameter @@ -128,7 +128,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow/{id}/version/{version}', +fetch('/workflows/{id}/version/{version}', { method: 'DELETE', @@ -149,7 +149,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow/{id}/version/{version}', +fetch('/workflows/{id}/version/{version}', { method: 'DELETE', @@ -163,7 +163,7 @@ fetch('/workflow/{id}/version/{version}', ``` -`DELETE /workflow/{id}/version/{version}` +`DELETE /workflows/{id}/version/{version}`

Parameters

@@ -201,7 +201,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow/{id}', +fetch('/workflows/{id}', { method: 'PATCH', body: inputBody, @@ -228,7 +228,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow/{id}', +fetch('/workflows/{id}', { method: 'PATCH', body: JSON.stringify(inputBody), @@ -242,7 +242,7 @@ fetch('/workflow/{id}', ``` -`PATCH /workflow/{id}` +`PATCH /workflows/{id}` > Body parameter @@ -285,7 +285,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow/{id}', +fetch('/workflows/{id}', { method: 'GET', @@ -306,7 +306,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow/{id}', +fetch('/workflows/{id}', { method: 'GET', @@ -320,7 +320,7 @@ fetch('/workflow/{id}', ``` -`GET /workflow/{id}` +`GET /workflows/{id}`

Parameters

@@ -351,7 +351,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow/{id}', +fetch('/workflows/{id}', { method: 'DELETE', @@ -372,7 +372,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow/{id}', +fetch('/workflows/{id}', { method: 'DELETE', @@ -386,7 +386,7 @@ fetch('/workflow/{id}', ``` -`DELETE /workflow/{id}` +`DELETE /workflows/{id}`

Parameters

@@ -424,7 +424,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow', +fetch('/workflows', { method: 'POST', body: inputBody, @@ -452,7 +452,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow', +fetch('/workflows', { method: 'POST', body: JSON.stringify(inputBody), @@ -466,7 +466,7 @@ fetch('/workflow', ``` -`POST /workflow` +`POST /workflows` > Body parameter @@ -532,7 +532,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow', +fetch('/workflows', { method: 'GET', @@ -554,7 +554,7 @@ const headers = { 'Authorization':'Bearer {access-token}' }; -fetch('/workflow', +fetch('/workflows', { method: 'GET', @@ -568,7 +568,7 @@ fetch('/workflow', ``` -`GET /workflow` +`GET /workflows`

Parameters

diff --git a/services/bpmn-service/src/__tests__/acceptance/workflow.controller.acceptance.ts b/services/bpmn-service/src/__tests__/acceptance/workflow.controller.acceptance.ts index 995a4184bc..8de330667d 100644 --- a/services/bpmn-service/src/__tests__/acceptance/workflow.controller.acceptance.ts +++ b/services/bpmn-service/src/__tests__/acceptance/workflow.controller.acceptance.ts @@ -16,7 +16,7 @@ describe('Workflow Controller', () => { let mockBpmnEngine: MockEngine; let workflowRepo: WorkflowRepository; let workflowVersionRepo: WorkflowVersionRepository; - const basePath = '/workflow'; + const basePath = '/workflows'; const pass = 'test_password'; const testUser = { id: 1, diff --git a/services/bpmn-service/src/controllers/workflow.controller.ts b/services/bpmn-service/src/controllers/workflow.controller.ts index 2feba6666f..771a2921d7 100644 --- a/services/bpmn-service/src/controllers/workflow.controller.ts +++ b/services/bpmn-service/src/controllers/workflow.controller.ts @@ -32,7 +32,7 @@ import { WorkerImplementationFn, WorkerMap, } from '../types'; -const basePath = '/workflow'; +const basePath = '/workflows'; export class WorkflowController { constructor(