Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
altro3 committed May 20, 2023
1 parent 64de310 commit 455021e
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle/license.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license {
java = 'SLASHSTAR_STYLE'
groovy = 'SLASHSTAR_STYLE'
}
ext.year = '2017-2022'
ext.year = '2017-2023'

exclude "**/transaction/**"
exclude '**/*.txt'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*/
package io.micronaut.openapi.visitor;

import io.micronaut.core.annotation.Internal;
import io.micronaut.inject.visitor.VisitorContext;

/**
* Convert utilities methods.
*
* @since 4.5.0
*/
@Internal
public final class ContextUtils {

private ContextUtils() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -68,6 +69,7 @@
*
* @since 4.4.1
*/
@Internal
public final class ConvertUtils {

private static final TypeReference<Map<String, Object>> MAP_TYPE_REFERENCE = new TypeReference<Map<String, Object>>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -32,6 +33,7 @@
*
* @since 4.8.3
*/
@Internal
public final class ElementUtils {

public static final List<String> CONTAINER_TYPES = Arrays.asList(
Expand Down Expand Up @@ -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<String> typeNames) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

/**
* <p>Checks whether the String a valid Java number.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -32,6 +33,7 @@
*
* @since 4.5.0
*/
@Internal
public final class SchemaUtils {

public static final Schema<?> EMPTY_SCHEMA = new Schema<>();
Expand Down
2 changes: 2 additions & 0 deletions openapi/src/main/java/io/micronaut/openapi/visitor/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -42,6 +43,7 @@
*
* @since 4.4.0
*/
@Internal
public final class Utils {

public static final String PLACEHOLDER_PREFIX = "${";
Expand Down

0 comments on commit 455021e

Please sign in to comment.