3

Migrating from springfox - springdoc

springfox generated an openApi definition that ordered all the parameters in alphabetical order, I've migrated to springdoc, but have been unable to find a way to keep the springfox ordering(alpha) of the parameters, e.g.

Controller:

getPerson(name, address, mobile)

springfox generated openApi definition:

getPersonService(address, mobile, name)

springdoc generated openApi definition:

getPersonService(name, address, mobile)

There are properties to order other aspects of the generated definition with:

springdoc.swagger-ui.operationsSorter=method
springdoc.swagger-ui.tagsSorter=alpha
springdoc.writer-with-order-by-keys: true

I have been unable to find a property to order the operation parameters, is there a setting to accomplish this? or can it be achieved cleanly with: OpenApiCustomiser or OperationCustomizer

JTK
  • 1,469
  • 2
  • 22
  • 39
  • 1
    There's nothing in-build to support the same. As you said, you can try overriding the `OperationCustomizer` method and try. – Debargha Roy May 10 '22 at 08:07

0 Answers0