Skip to content

Commit

Permalink
fix: Remove broken sort of generated types (#1808)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienCharlier authored Jan 10, 2025
1 parent cb58fb0 commit 9643099
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/core/src/generators/models-inline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ export const generateModelInline = (acc: string, model: string): string =>
export const generateModelsInline = (
obj: Record<string, GeneratorSchema[]>,
): string => {
const schemas = Object.values(obj)
.flatMap((it) => it)
.sort((a, b) => (a.imports.some((i) => i.name === b.name) ? 1 : -1));
const schemas = Object.values(obj).flatMap((it) => it);

return schemas.reduce<string>(
(acc, { model }) => generateModelInline(acc, model),
Expand Down

0 comments on commit 9643099

Please sign in to comment.