diff --git a/core/src/main/java/io/smallrye/openapi/runtime/scanner/spi/AbstractParameterProcessor.java b/core/src/main/java/io/smallrye/openapi/runtime/scanner/spi/AbstractParameterProcessor.java index e3c8d58ee..e256f957d 100644 --- a/core/src/main/java/io/smallrye/openapi/runtime/scanner/spi/AbstractParameterProcessor.java +++ b/core/src/main/java/io/smallrye/openapi/runtime/scanner/spi/AbstractParameterProcessor.java @@ -110,7 +110,7 @@ public abstract class AbstractParameterProcessor { protected Map> matrixParams = new LinkedHashMap<>(); private Set processedMatrixSegments = new HashSet<>(); - private List preferredOrder; + private List preferredOrder = new ArrayList<>(); /** * Used for collecting and merging any scanned {@link Parameter} annotations @@ -234,6 +234,7 @@ protected void reset() { params.clear(); formParams.clear(); matrixParams.clear(); + preferredOrder.clear(); } protected ResourceParameters process(ClassInfo resourceClass, MethodInfo resourceMethod) { @@ -1373,6 +1374,10 @@ protected void readParameter(ParameterContextKey key, } if (preferredOrder != null) { + if (context.oaiParam == null && context.name != null) { + context.oaiParam = new ParameterImpl(); + context.oaiParam.setName(context.name); + } preferredOrder.add(context.oaiParam); } }