Skip to content

Commit

Permalink
fix(faker ref resolver): use original name of referenced schema in re…
Browse files Browse the repository at this point in the history
…f resolution

use original name of referenced schema in ref resolution

fix orval-labs#1500
  • Loading branch information
George Musker committed Jul 9, 2024
1 parent 6b9eaf9 commit b605496
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mock/src/faker/resolvers/value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const resolveMockValue = ({
}): MockDefinition & { type?: string } => {
if (isReference(schema)) {
const {
name,
originalName,
specKey = context.specKey,
refPaths,
} = getRefInfo(schema.$ref, context);
Expand All @@ -89,7 +89,7 @@ export const resolveMockValue = ({

const newSchema = {
...schemaRef,
name,
name: originalName,
path: schema.path,
isRef: true,
};
Expand Down

0 comments on commit b605496

Please sign in to comment.