Skip to content

Commit

Permalink
Add documentation to postman import and export (usebruno#2274)
Browse files Browse the repository at this point in the history
Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
  • Loading branch information
2 people authored and Its-treason committed Aug 24, 2024
1 parent 5a1191b commit 8aefdc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/bruno-app/src/utils/exporters/postman-collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
};
};
Expand Down Expand Up @@ -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),
Expand Down
3 changes: 2 additions & 1 deletion packages/bruno-app/src/utils/importers/postman-collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ const importPostmanV2CollectionItem = (brunoParent, item, parentAuth, options) =
xml: null,
formUrlEncoded: [],
multipartForm: []
}
},
docs: i.request.description
}
};
/* struct of translation log
Expand Down

0 comments on commit 8aefdc3

Please sign in to comment.