Skip to content

Commit

Permalink
Merge pull request swagger-api#2468 from ChristianCiach/issue2466_2.0
Browse files Browse the repository at this point in the history
swagger-api#2466 retain generic types for attributes of BeanParam
  • Loading branch information
frantuma authored Oct 10, 2017
2 parents 18c91c9 + 85d8d2f commit f3a55f3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private void handleAdditionalAnnotation(List<Parameter> parameters, Annotation a

// Gather the field's details
if (field != null) {
paramType = field.getRawType();
paramType = field.getType();

for (final Annotation fieldAnnotation : field.annotations()) {
if (!paramAnnotations.contains(fieldAnnotation)) {
Expand All @@ -127,7 +127,8 @@ private void handleAdditionalAnnotation(List<Parameter> parameters, Annotation a
if (setter != null) {
// Do not set the param class/type from the setter if the values are already identified
if (paramType == null) {
paramType = setter.getRawParameterTypes() != null ? setter.getRawParameterTypes()[0] : null;
// paramType will stay null if there is no parameter
paramType = setter.getParameterType(0);
}

for (final Annotation fieldAnnotation : setter.annotations()) {
Expand All @@ -141,7 +142,7 @@ private void handleAdditionalAnnotation(List<Parameter> parameters, Annotation a
if (getter != null) {
// Do not set the param class/type from the getter if the values are already identified
if (paramType == null) {
paramType = getter.getRawReturnType();
paramType = getter.getType();
}

for (final Annotation fieldAnnotation : getter.annotations()) {
Expand Down

0 comments on commit f3a55f3

Please sign in to comment.