From 964309909d6e852a73b8d4515d738d0ada1b9450 Mon Sep 17 00:00:00 2001 From: FabienCharlier <132365860+FabienCharlier@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:42:20 +0100 Subject: [PATCH] fix: Remove broken sort of generated types (#1808) --- packages/core/src/generators/models-inline.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/core/src/generators/models-inline.ts b/packages/core/src/generators/models-inline.ts index 1ec05392b..31f0025dc 100644 --- a/packages/core/src/generators/models-inline.ts +++ b/packages/core/src/generators/models-inline.ts @@ -6,9 +6,7 @@ export const generateModelInline = (acc: string, model: string): string => export const generateModelsInline = ( obj: Record, ): 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( (acc, { model }) => generateModelInline(acc, model),