Skip to content

Commit 7d9bf95

Browse files
authored
fix(resolveMockValue): use name instead of pascalCase(originalName) to prevent dropped suffix (#3035)
1 parent 1f39cea commit 7d9bf95

File tree

1 file changed

+2
-2
lines changed
  • packages/mock/src/faker/resolvers

1 file changed

+2
-2
lines changed

packages/mock/src/faker/resolvers/value.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export function resolveMockValue({
8686
allowOverride,
8787
}: ResolveMockValueOptions): MockDefinition & { type?: string } {
8888
if (isReference(schema)) {
89-
const { originalName, refPaths } = getRefInfo(schema.$ref, context);
89+
const { name, refPaths } = getRefInfo(schema.$ref, context);
9090

9191
const schemaRef = Array.isArray(refPaths)
9292
? (prop(
@@ -98,7 +98,7 @@ export function resolveMockValue({
9898

9999
const newSchema = {
100100
...schemaRef,
101-
name: pascal(originalName),
101+
name,
102102
path: schema.path,
103103
isRef: true,
104104
required: [...(schemaRef?.required ?? []), ...(schema.required ?? [])],

0 commit comments

Comments
 (0)