From c0d214f2bc1e8919c1baa30e77d3fdbd09aaeb26 Mon Sep 17 00:00:00 2001 From: Hinnerk Oetting Date: Fri, 23 Aug 2024 21:42:31 +0200 Subject: [PATCH] Add documentation to postman import and export (#2274) Co-authored-by: Anoop M D --- packages/bruno-app/src/utils/exporters/postman-collection.js | 3 +++ packages/bruno-app/src/utils/importers/postman-collection.js | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/bruno-app/src/utils/exporters/postman-collection.js b/packages/bruno-app/src/utils/exporters/postman-collection.js index 076723748..1df93697d 100644 --- a/packages/bruno-app/src/utils/exporters/postman-collection.js +++ b/packages/bruno-app/src/utils/exporters/postman-collection.js @@ -12,6 +12,7 @@ export const exportCollection = (collection) => { const generateInfoSection = () => { return { name: collection.name, + description: collection.root?.docs, schema: 'https://schema.getpostman.com/json/collection/v2.1.0/collection.json' }; }; @@ -206,6 +207,8 @@ export const exportCollection = (collection) => { const requestObject = { method: itemRequest.method, header: generateHeaders(itemRequest.headers), + auth: generateAuth(itemRequest.auth), + description: itemRequest.docs url: { raw: itemRequest.url, host: generateHost(itemRequest.url), diff --git a/packages/bruno-app/src/utils/importers/postman-collection.js b/packages/bruno-app/src/utils/importers/postman-collection.js index 0683a3bbc..3f10aea9c 100644 --- a/packages/bruno-app/src/utils/importers/postman-collection.js +++ b/packages/bruno-app/src/utils/importers/postman-collection.js @@ -113,7 +113,8 @@ const importPostmanV2CollectionItem = (brunoParent, item, parentAuth, options) = xml: null, formUrlEncoded: [], multipartForm: [] - } + }, + docs: i.request.description } }; /* struct of translation log