diff --git a/openapi/src/main/java/io/micronaut/openapi/visitor/AbstractOpenApiEndpointVisitor.java b/openapi/src/main/java/io/micronaut/openapi/visitor/AbstractOpenApiEndpointVisitor.java index bad21c2692..d889bee10b 100644 --- a/openapi/src/main/java/io/micronaut/openapi/visitor/AbstractOpenApiEndpointVisitor.java +++ b/openapi/src/main/java/io/micronaut/openapi/visitor/AbstractOpenApiEndpointVisitor.java @@ -1530,7 +1530,9 @@ private boolean isResponseType(ClassElement returnType) { } private boolean isSingleResponseType(ClassElement returnType) { - return (returnType.isAssignable("io.reactivex.Single") || returnType.isAssignable("org.reactivestreams.Publisher")) + return (returnType.isAssignable("io.reactivex.Single") + || returnType.isAssignable("io.reactivex.rxjava3.core.Single") + || returnType.isAssignable("org.reactivestreams.Publisher")) && returnType.getFirstTypeArgument().isPresent() && isResponseType(returnType.getFirstTypeArgument().get()); } diff --git a/openapi/src/main/java/io/micronaut/openapi/visitor/ContextUtils.java b/openapi/src/main/java/io/micronaut/openapi/visitor/ContextUtils.java index f274d4a020..e9e010516f 100644 --- a/openapi/src/main/java/io/micronaut/openapi/visitor/ContextUtils.java +++ b/openapi/src/main/java/io/micronaut/openapi/visitor/ContextUtils.java @@ -15,6 +15,7 @@ */ package io.micronaut.openapi.visitor; +import io.micronaut.core.annotation.Internal; import io.micronaut.inject.visitor.VisitorContext; /** @@ -22,6 +23,7 @@ * * @since 4.5.0 */ +@Internal public final class ContextUtils { private ContextUtils() { diff --git a/openapi/src/main/java/io/micronaut/openapi/visitor/ConvertUtils.java b/openapi/src/main/java/io/micronaut/openapi/visitor/ConvertUtils.java index f34ad995f2..0691804dda 100644 --- a/openapi/src/main/java/io/micronaut/openapi/visitor/ConvertUtils.java +++ b/openapi/src/main/java/io/micronaut/openapi/visitor/ConvertUtils.java @@ -40,6 +40,7 @@ import javax.xml.datatype.XMLGregorianCalendar; import io.micronaut.core.annotation.AnnotationValue; +import io.micronaut.core.annotation.Internal; import io.micronaut.core.annotation.NonNull; import io.micronaut.core.annotation.Nullable; import io.micronaut.core.beans.BeanMap; @@ -68,6 +69,7 @@ * * @since 4.4.1 */ +@Internal public final class ConvertUtils { private static final TypeReference> MAP_TYPE_REFERENCE = new TypeReference>() { diff --git a/openapi/src/main/java/io/micronaut/openapi/visitor/ElementUtils.java b/openapi/src/main/java/io/micronaut/openapi/visitor/ElementUtils.java index 5c83c0ddc8..4f68141399 100644 --- a/openapi/src/main/java/io/micronaut/openapi/visitor/ElementUtils.java +++ b/openapi/src/main/java/io/micronaut/openapi/visitor/ElementUtils.java @@ -23,6 +23,7 @@ import java.util.Optional; import java.util.concurrent.Future; +import io.micronaut.core.annotation.Internal; import io.micronaut.core.annotation.Nullable; import io.micronaut.inject.ast.ClassElement; import io.micronaut.inject.ast.TypedElement; @@ -32,6 +33,7 @@ * * @since 4.8.3 */ +@Internal public final class ElementUtils { public static final List CONTAINER_TYPES = Arrays.asList( @@ -128,7 +130,9 @@ public static boolean isVoid(ClassElement type) { * @return true if this type assignable with known container and type argument is void */ public static boolean isReactiveAndVoid(ClassElement type) { - return isContainerType(type) && type.getFirstTypeArgument().isPresent() && isVoid(type.getFirstTypeArgument().get()); + return type.isAssignable("io.reactivex.Completable") + || type.isAssignable("io.reactivex.rxjava3.core.Completable") + || (isContainerType(type) && type.getFirstTypeArgument().isPresent() && isVoid(type.getFirstTypeArgument().get())); } private static boolean findAnyAssignable(ClassElement type, List typeNames) { diff --git a/openapi/src/main/java/io/micronaut/openapi/visitor/NumberUtils.java b/openapi/src/main/java/io/micronaut/openapi/visitor/NumberUtils.java index 0d8402e75d..7ca7865b15 100644 --- a/openapi/src/main/java/io/micronaut/openapi/visitor/NumberUtils.java +++ b/openapi/src/main/java/io/micronaut/openapi/visitor/NumberUtils.java @@ -15,12 +15,14 @@ */ package io.micronaut.openapi.visitor; +import io.micronaut.core.annotation.Internal; import io.micronaut.core.util.StringUtils; /** * Number utils. */ -public class NumberUtils { +@Internal +public final class NumberUtils { /** *

Checks whether the String a valid Java number.

diff --git a/openapi/src/main/java/io/micronaut/openapi/visitor/SchemaUtils.java b/openapi/src/main/java/io/micronaut/openapi/visitor/SchemaUtils.java index 34c5cbe678..b151e5472c 100644 --- a/openapi/src/main/java/io/micronaut/openapi/visitor/SchemaUtils.java +++ b/openapi/src/main/java/io/micronaut/openapi/visitor/SchemaUtils.java @@ -18,6 +18,7 @@ import java.util.LinkedHashMap; import java.util.Map; +import io.micronaut.core.annotation.Internal; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.ArraySchema; @@ -32,6 +33,7 @@ * * @since 4.5.0 */ +@Internal public final class SchemaUtils { public static final Schema EMPTY_SCHEMA = new Schema<>(); diff --git a/openapi/src/main/java/io/micronaut/openapi/visitor/Utils.java b/openapi/src/main/java/io/micronaut/openapi/visitor/Utils.java index 4fde985100..4359cfbc6a 100644 --- a/openapi/src/main/java/io/micronaut/openapi/visitor/Utils.java +++ b/openapi/src/main/java/io/micronaut/openapi/visitor/Utils.java @@ -26,6 +26,7 @@ import io.micronaut.context.env.DefaultPropertyPlaceholderResolver; import io.micronaut.context.env.PropertyPlaceholderResolver; +import io.micronaut.core.annotation.Internal; import io.micronaut.core.annotation.NonNull; import io.micronaut.core.annotation.Nullable; import io.micronaut.core.convert.ArgumentConversionContext; @@ -42,6 +43,7 @@ * * @since 4.4.0 */ +@Internal public final class Utils { public static final String PLACEHOLDER_PREFIX = "${";