I'm switching from Springfox 3.0 to OpenAPI 3.0 + Springdoc-openapi.
In Springfox the tag order is alphabetical, but in Springdoc's Swagger UI, the order appears to be random.
How do I control the Tag order on the UI? I'd prefer an ordering of my choosing, but would be OK with ordering alphabetically by tag name.
@Tag(name = MY_CONTROLLER_TAG_NAME, description = MY_CONTROLLER_TAG_DESC)
public class MyController {
Desired Order:
- Paginated Endpoints
- User Access
- Tagging
- Tagging - Admin
- User Management
- User Management - Admin
Actual Order:
- User Access
- Tagging
- Paginated Endpoints
- Tagging - Admin
- User Management - Admin
- User Management
POM Dependencies:
<springdoc-openapi.version>1.6.4</springdoc-openapi.version>
...
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>${springdoc-openapi.version}</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-security</artifactId>
<version>${springdoc-openapi.version}</version>
</dependency>
Application.yml:
springdoc:
show-actuator: ${SWAGGER_ENABLED:true}
swagger-ui:
doc-expansion: none
api-docs:
enabled: ${SWAGGER_ENABLED:true}
model-converters:
pageable-converter:
enabled: true