public class OpenAPISorter
extends java.lang.Object
Sorting the OpenAPI specification solves problems when the output of this plugin is committed in a version control system.
The swagger-core library generates non-deterministic output, because reflection operations on scanned Resource classes are non-deterministic in the order of methods and fields.
This class and its functionality may be removed if the generation of deterministic output is solved in swagger-core.
See https://github.com/swagger-api/swagger-core/issues/3475 See https://github.com/swagger-api/swagger-core/issues/2775 See https://github.com/swagger-api/swagger-core/issues/2828
| Modifier and Type | Method and Description |
|---|---|
static io.swagger.v3.oas.models.OpenAPI |
sort(io.swagger.v3.oas.models.OpenAPI swagger)
Sort all the paths and components of the OpenAPI specification, in place.
|