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),