mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
refactor: enhance OpenAPISyncTab functionality and clean up unused code (#7392)
- Updated OpenAPISyncTab to utilize Redux state for active tab management, improving state consistency. - Removed unnecessary loading state checks from OverviewSection and SpecStatusSection for cleaner logic. - Streamlined prop usage in OverviewSection by eliminating the isLoading prop. - Cleaned up useOpenAPISync hook by removing unused state clearing logic on unmount. - Improved file handling in openapi-sync IPC by ensuring new files are created in the appropriate folder based on tags.
This commit is contained in:
@@ -1307,10 +1307,10 @@ const registerOpenAPISyncIpc = (mainWindow) => {
|
||||
const content = await stringifyRequestViaWorker(mergedRequest, { format: existingFile.fileFormat });
|
||||
await writeFile(existingFile.filePath, content);
|
||||
} else {
|
||||
// Truly new — create file as before
|
||||
// Truly new — create file in the appropriate folder
|
||||
let targetFolder = collectionPath;
|
||||
if (endpoint.tags?.length > 0 && groupBy === 'tags') {
|
||||
targetFolder = await ensureTagFolder(collectionPath, endpoint.tags[0], format);
|
||||
if (result.folderName && groupBy === 'tags') {
|
||||
targetFolder = await ensureTagFolder(collectionPath, result.folderName, format);
|
||||
}
|
||||
|
||||
const requestContent = await stringifyRequestViaWorker(newItem, { format });
|
||||
|
||||
Reference in New Issue
Block a user