mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 14:08:38 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user