Skip to content

Commit 8c1fabb

Browse files
committed
ref #3074 - update shouldIgnoreClass
1 parent 59d77e7 commit 8c1fabb

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/Reader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ public OpenAPI read(Class<?> cls,
417417
returnType = annotatedMethod.getType();
418418
}
419419

420-
if (shouldIgnoreClass(returnType.getTypeName()) && !returnType.equals(subResource)) {
420+
if (shouldIgnoreClass(returnType.getTypeName()) && !method.getGenericReturnType().equals(subResource)) {
421421
continue;
422422
}
423423
}
@@ -1013,7 +1013,7 @@ private Operation parseMethod(
10131013
}
10141014

10151015
final Class<?> subResource = getSubResourceWithJaxRsSubresourceLocatorSpecs(method);
1016-
if (!shouldIgnoreClass(returnType.getTypeName()) && !returnType.equals(subResource)) {
1016+
if (!shouldIgnoreClass(returnType.getTypeName()) && !method.getGenericReturnType().equals(subResource)) {
10171017
ResolvedSchema resolvedSchema = ModelConverters.getInstance().resolveAsResolvedSchema(new AnnotatedType(returnType).resolveAsRef(true).jsonViewAnnotation(jsonViewAnnotation));
10181018
if (resolvedSchema.schema != null) {
10191019
Schema returnTypeSchema = resolvedSchema.schema;

modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/ReaderTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1974,7 +1974,6 @@ public void testTicket3029() {
19741974
SerializationMatchers.assertEqualsToYaml(openAPI, yaml);
19751975
}
19761976

1977-
<<<<<<< HEAD
19781977
@Test(description = "response generic subclass")
19791978
public void testTicket3082() {
19801979
Reader reader = new Reader(new OpenAPI());

modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefParameter3029Resource.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22

33
import io.swagger.v3.oas.annotations.Operation;
44
import io.swagger.v3.oas.annotations.Parameter;
5-
import io.swagger.v3.oas.annotations.enums.ParameterIn;
6-
import io.swagger.v3.oas.annotations.media.Content;
7-
import io.swagger.v3.oas.annotations.media.Schema;
8-
import io.swagger.v3.oas.annotations.responses.ApiResponse;
9-
import org.mockito.internal.matchers.Not;
105

116
import javax.ws.rs.GET;
127
import javax.ws.rs.Path;
13-
import javax.ws.rs.QueryParam;
148

159
public class RefParameter3029Resource {
1610

0 commit comments

Comments
 (0)