SIGN IN SIGN UP

chore: replace custom sort postprocess with keep_model_order config (#734)

## Summary

- Enables `keep_model_order = true` in `[tool.datamodel-codegen]`
config.
- Removes the custom `sort_classes` postprocess step and its 16 unit
tests.
- Verified by regenerating `src/apify_client/_models.py` — zero diff vs.
the previous custom-sort output.

`datamodel-code-generator`'s built-in `--keep-model-order` already does
a topological sort with class-name ordering, which is equivalent to what
our custom script was doing. Discussed with the maintainer in
https://github.com/koxudaxi/datamodel-code-generator/issues/3087.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
V
Vlada Dusek committed
3d4ce3fd1aad452c9591ddac844e28a13845560b
Parent: 1a2b642
Committed by GitHub <noreply@github.com> on 4/17/2026, 7:29:12 AM