diff --git a/src/lib/blueprint.ts b/src/lib/blueprint.ts index ea020f7..7fda9a7 100644 --- a/src/lib/blueprint.ts +++ b/src/lib/blueprint.ts @@ -179,11 +179,11 @@ const createEndpoint = ( 'operationId' in operation && typeof operation['operationId'] === 'string' ? operation['operationId'] : `${path.replace(/\//g, '')}${method.charAt(0).toUpperCase() + method.slice(1).toLowerCase()}`, - path, + path: `/${path.split('/').slice(1, -1).join('/')}`, description: - 'summary' in operation && typeof operation['summary'] === 'string' - ? operation['summary'] - : `${method.toUpperCase()} ${path}`, + 'description' in operation && typeof operation['description'] === 'string' + ? operation['description'] + : '', isUndocumented: false, isDeprecated: false, deprecationMessage: '', diff --git a/src/lib/openapi.ts b/src/lib/openapi.ts index f79aa29..2303c23 100644 --- a/src/lib/openapi.ts +++ b/src/lib/openapi.ts @@ -60,4 +60,4 @@ export interface Openapi { } } > -} \ No newline at end of file +} diff --git a/test/snapshots/blueprint.test.ts.md b/test/snapshots/blueprint.test.ts.md index d2c7764..b781a09 100644 --- a/test/snapshots/blueprint.test.ts.md +++ b/test/snapshots/blueprint.test.ts.md @@ -36,12 +36,12 @@ Generated by [AVA](https://avajs.dev). endpoints: [ { deprecationMessage: '', - description: '/foos/get', + description: '', isDeprecated: false, isUndocumented: false, name: 'foosGetGet', parameters: [], - path: '/foos/get', + path: '/foos', request: { methods: [ 'GET', @@ -59,12 +59,12 @@ Generated by [AVA](https://avajs.dev). }, { deprecationMessage: '', - description: '/foos/get', + description: '', isDeprecated: false, isUndocumented: false, name: 'foosGetPost', parameters: [], - path: '/foos/get', + path: '/foos', request: { methods: [ 'POST', diff --git a/test/snapshots/blueprint.test.ts.snap b/test/snapshots/blueprint.test.ts.snap index 074beb1..03d6041 100644 Binary files a/test/snapshots/blueprint.test.ts.snap and b/test/snapshots/blueprint.test.ts.snap differ diff --git a/test/snapshots/seam-blueprint.test.ts.md b/test/snapshots/seam-blueprint.test.ts.md index 4c731c3..f070af0 100644 --- a/test/snapshots/seam-blueprint.test.ts.md +++ b/test/snapshots/seam-blueprint.test.ts.md @@ -149,12 +149,12 @@ Generated by [AVA](https://avajs.dev). endpoints: [ { deprecationMessage: '', - description: '/acs/systems/list', + description: '', isDeprecated: false, isUndocumented: false, name: 'acsSystemsListPost', parameters: [], - path: '/acs/systems/list', + path: '/acs/systems', request: { methods: [ 'POST', diff --git a/test/snapshots/seam-blueprint.test.ts.snap b/test/snapshots/seam-blueprint.test.ts.snap index 64561ba..7717ace 100644 Binary files a/test/snapshots/seam-blueprint.test.ts.snap and b/test/snapshots/seam-blueprint.test.ts.snap differ