Skip to content

Commit 5135acb

Browse files
AllieJonssoncscovino
authored andcommitted
fix: display correct amount of duplicate schemas (orval-labs#1958)
feat(core): ✏️ add naming convention option to output
1 parent e5dfd28 commit 5135acb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: packages/core/src/writers/schemas.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from 'fs-extra';
22
import { generateImports } from '../generators';
33
import { GeneratorSchema, NamingConvention } from '../types';
4-
import { camel, pascal, snake, kebab, upath, conventionName } from '../utils';
4+
import { upath, conventionName } from '../utils';
55

66
const getSchema = ({
77
schema: { imports, model },
@@ -142,7 +142,7 @@ export const writeSchemas = async ({
142142
} else {
143143
duplicateNamesMap.set(
144144
schema.name,
145-
(duplicateNamesMap.get(schema.name) || 0) + 1,
145+
(duplicateNamesMap.get(schema.name) || 1) + 1,
146146
);
147147
}
148148
});

0 commit comments

Comments
 (0)