From 5c1fba4b0c1bb05828cdc4b7a2d1f56866a648c9 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Mon, 14 Jul 2025 07:36:04 -0700 Subject: [PATCH] Fix Postman import description https://feedback.yaak.app/p/missing-documentation-info-when-importing-postman-requests --- plugins/importer-postman/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/importer-postman/src/index.ts b/plugins/importer-postman/src/index.ts index cca8e77c..c23aba10 100644 --- a/plugins/importer-postman/src/index.ts +++ b/plugins/importer-postman/src/index.ts @@ -83,10 +83,12 @@ export function convertPostman(contents: string): ImportPluginResponse | undefin }; exportResources.environments.push(environment); + let sortPriorityIndex = 0; const importItem = (v: Record, folderId: string | null = null) => { if (typeof v.name === 'string' && Array.isArray(v.item)) { const folder: ExportResources['folders'][0] = { model: 'folder', + sortPriority: sortPriorityIndex++, workspaceId: workspace.id, id: generateId('folder'), name: v.name, @@ -133,7 +135,7 @@ export function convertPostman(contents: string): ImportPluginResponse | undefin workspaceId: workspace.id, folderId, name: v.name, - description: v.description ? String(v.description) : undefined, + description: r.description ? String(r.description) : undefined, method: typeof r.method === 'string' ? r.method : 'GET', url, urlParameters, @@ -141,6 +143,7 @@ export function convertPostman(contents: string): ImportPluginResponse | undefin bodyType: bodyPatch.bodyType, authentication: authPatch.authentication, authenticationType: authPatch.authenticationType, + sortPriority: sortPriorityIndex++, headers, }; exportResources.httpRequests.push(request);