Class OpenAPISorter


  • public class OpenAPISorter
    extends Object
    Utility for sorting an OpenAPI model 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.
    • Method Detail

      • sort

        public static void sort​(io.swagger.v3.oas.models.OpenAPI openAPI)