fix: include examples when writing collection items in CLI OpenAPI import (#7613)

* feat: add support for examples in collection items

- Enhanced the processCollectionItems function to include examples from imported collection items.
- Added a new test case to verify that examples are correctly written to the output file during collection creation.

* fix: coerce response status to number in collection creation tests

Updated the test for createCollectionFromBrunoObject to ensure the response status is compared as a number, improving type consistency in assertions.
This commit is contained in:
Abhishek S Lal
2026-04-01 21:34:23 +05:30
committed by GitHub
parent 97467c57bf
commit 64bdef23ec
2 changed files with 59 additions and 1 deletions

View File

@@ -641,7 +641,8 @@ const processCollectionItems = async (items = [], currentPath, options = {}) =>
assertions: item.request?.assertions || [],
tests: item.request?.tests || '',
docs: item.request?.docs || ''
}
},
examples: item.examples || []
};
// Convert to YML format and write to file