Package org.openapitools.codegen.utils
Class OpenAPISorter
- java.lang.Object
-
- org.openapitools.codegen.utils.OpenAPISorter
-
public class OpenAPISorter extends Object
Utility for sorting anOpenAPImodel in-place before serialization.- Paths are sorted alphabetically by path string.
- All component maps (schemas, parameters, requestBodies, responses, headers, securitySchemes, examples, links, callbacks) are sorted alphabetically by name.
- HTTP method ordering within a path is handled by
PathItemSerializer, which writes operations in classical spec order: GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH, TRACE.