From 3386b48e17b3afc823285e95f6d6016db9e33605 Mon Sep 17 00:00:00 2001 From: FabienCharlier Date: Fri, 10 Jan 2025 17:04:55 +0100 Subject: [PATCH] fix: Remove broken sort of generated types --- 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),