diff --git a/ui-packages/packages/runtime-tools-dev-ui-webapp/src/channel/apis/apis.tsx b/ui-packages/packages/runtime-tools-dev-ui-webapp/src/channel/apis/apis.tsx index d39e28a849..387cf01cd2 100755 --- a/ui-packages/packages/runtime-tools-dev-ui-webapp/src/channel/apis/apis.tsx +++ b/ui-packages/packages/runtime-tools-dev-ui-webapp/src/channel/apis/apis.tsx @@ -353,7 +353,7 @@ export const getProcessDefinitionList = ( .then((response) => { const processDefinitionObjs = []; const paths = response.paths; - const regexPattern = /^\/\w+\/schema/; + const regexPattern = /^\/[^\n]+\/schema/; Object.getOwnPropertyNames(paths) .filter((path) => regexPattern.test(path.toString())) .forEach((url) => { diff --git a/ui-packages/packages/runtime-tools-dev-ui-webapp/src/channel/apis/tests/apis.test.tsx b/ui-packages/packages/runtime-tools-dev-ui-webapp/src/channel/apis/tests/apis.test.tsx index f687954596..087ee9ad40 100755 --- a/ui-packages/packages/runtime-tools-dev-ui-webapp/src/channel/apis/tests/apis.test.tsx +++ b/ui-packages/packages/runtime-tools-dev-ui-webapp/src/channel/apis/tests/apis.test.tsx @@ -893,15 +893,15 @@ describe('custom forms section', () => { }); describe('process definitions section', () => { - it('swager parser success', async () => { + it('swagger parser success', async () => { SwaggerParser.parse['mockImplementation'](() => Promise.resolve({ paths: { - '/hiring/schema': { + '/hiring-process/schema': { get: {}, post: {} }, - '/hiring': { + '/hiring-process': { get: {}, post: {} } @@ -913,7 +913,10 @@ describe('process definitions section', () => { '/docs/openapi.json' ); expect(result).toStrictEqual([ - { processName: 'hiring', endpoint: 'http://localhost:8080/hiring' } + { + processName: 'hiring-process', + endpoint: 'http://localhost:8080/hiring-process' + } ]); }); it('start process instance success', async () => {