Skip to content

Commit 29bbb14

Browse files
committed
refactor: rename flat to target in mergeExamples
1 parent 9565c48 commit 29bbb14

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

express-zod-api/src/json-schema-helpers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,16 @@ export const processPropertyNames = (
8181

8282
/** @internal */
8383
export const mergeExamples = (
84-
flat: FlattenObjectSchema,
84+
target: FlattenObjectSchema,
8585
entry: z.core.JSONSchema.BaseSchema,
8686
isOptional: boolean,
8787
) => {
8888
if (!entry.examples?.length) return;
8989
if (isOptional) {
90-
flat.examples = R.concat(flat.examples || [], entry.examples);
90+
target.examples = R.concat(target.examples || [], entry.examples);
9191
} else {
92-
flat.examples = combinations(
93-
flat.examples?.filter(isObject) || [],
92+
target.examples = combinations(
93+
target.examples?.filter(isObject) || [],
9494
entry.examples.filter(isObject),
9595
([a, b]) => R.mergeDeepRight(a, b),
9696
);

0 commit comments

Comments
 (0)