Skip to content

Commit

Permalink
(fix): mergeWith actually merges with incoming spec (#3124)
Browse files Browse the repository at this point in the history
(fix): mergeWith actually merges with incoming spec
  • Loading branch information
dsinghvi authored Mar 7, 2024
1 parent f4eddd4 commit 860ddb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/openapi-parser/src/mergeWithOverrides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export async function mergeWithOverrides<T>({
return context.failAndThrow(`Failed to read overrides from file ${absoluteFilepathToOverrides}`);
}

const merged = mergeWith({}, mergeWith, parsedOverrides, (obj, src) =>
const merged = mergeWith(data, mergeWith, parsedOverrides, (obj, src) =>
Array.isArray(obj) && Array.isArray(src)
? src.every((element) => typeof element === "object") && obj.every((element) => typeof element === "object")
? // nested arrays of objects are merged
Expand Down

0 comments on commit 860ddb0

Please sign in to comment.