Skip to content

Commit 0c24090

Browse files
authored
Merge pull request quarkusio#47779 from melloware/openapi-filter-order
OpenAPI Filters ensure consistent ordering
2 parents 1ceaa87 + 1b78d3f commit 0c24090

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

extensions/smallrye-openapi/deployment/src/main/java/io/quarkus/smallrye/openapi/deployment/SmallRyeOpenApiProcessor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,10 @@ public void build(BuildProducer<FeatureBuildItem> feature,
906906
.withOperationHandler(this::handleOperation)
907907
.enableUnannotatedPathParameters(capabilities.isPresent(Capability.RESTEASY_REACTIVE))
908908
.enableStandardFilter(false)
909-
.withFilters(openAPIBuildItems.stream().map(AddToOpenAPIDefinitionBuildItem::getOASFilter).toList());
909+
.withFilters(openAPIBuildItems.stream()
910+
.map(AddToOpenAPIDefinitionBuildItem::getOASFilter)
911+
.sorted(Comparator.comparing(filter -> filter.getClass().getName()))
912+
.toList());
910913

911914
getUserDefinedBuildtimeFilters(index).forEach(builder::addFilterName);
912915

0 commit comments

Comments
 (0)