protected Property createResponseProperty() { Type responseType = providerMethod.getReturnType(); if (ReflectionUtils.isVoid(responseType)) { return null; } ResponseTypeProcessor processor = context.findResponseTypeProcessor(responseType); return processor.process(this); }
private static boolean isValidResponse(Type type) { final JavaType javaType = TypeFactory.defaultInstance().constructType(type); return !ReflectionUtils.isVoid(javaType); }
public static Property generateResponseProperty(Swagger swagger, ResponseConfigBase config) throws Error { Class<?> responseClass = config.getResponseClass(); if (responseClass == null || ReflectionUtils.isVoid(responseClass)) { return null;
private static boolean isValidResponse(Type type) { final JavaType javaType = TypeFactory.defaultInstance().constructType(type); return !ReflectionUtils.isVoid(javaType); }
protected Property createResponseProperty() { Type responseType = providerMethod.getReturnType(); if (ReflectionUtils.isVoid(responseType)) { return null; } ResponseTypeProcessor processor = context.findResponseTypeProcessor(responseType); return processor.process(this); }
private static Type getResponseType(Method method) { final ApiOperation apiOperation = ReflectionUtils.getAnnotation(method, ApiOperation.class); if (apiOperation != null && !ReflectionUtils.isVoid(apiOperation.response())) { return apiOperation.response(); } else { return method.getGenericReturnType(); } }
private static Type getResponseType(Method method) { final ApiOperation apiOperation = ReflectionUtils.getAnnotation(method, ApiOperation.class); if (apiOperation != null && !ReflectionUtils.isVoid(apiOperation.response())) { return apiOperation.response(); } else { return method.getGenericReturnType(); } }
private static Map<String, Property> parseResponseHeaders(Swagger swagger, ReaderContext context, ResponseHeader[] headers) { Map<String, Property> responseHeaders = null; for (ResponseHeader header : headers) { final String name = header.name(); if (StringUtils.isNotEmpty(name)) { if (responseHeaders == null) { responseHeaders = new HashMap<String, Property>(); } final Class<?> cls = header.response(); if (!ReflectionUtils.isVoid(cls)) { final Property property = ModelConverters.getInstance().readAsProperty(cls); if (property != null) { final Property responseProperty = ContainerWrapper.wrapContainer(header.responseContainer(), property, ContainerWrapper.ARRAY, ContainerWrapper.LIST, ContainerWrapper.SET); responseProperty.setDescription(header.description()); responseHeaders.put(name, responseProperty); appendModels(swagger, cls); } } } } return responseHeaders; }
private static Map<String, Property> parseResponseHeaders(ReaderContext context, ResponseHeader[] headers) { Map<String, Property> responseHeaders = null; for (ResponseHeader header : headers) { final String name = header.name(); if (StringUtils.isNotEmpty(name)) { if (responseHeaders == null) { responseHeaders = new HashMap<String, Property>(); } final Class<?> cls = header.response(); if (!ReflectionUtils.isVoid(cls)) { final Property property = ModelConverters.getInstance().readAsProperty(cls); if (property != null) { final Property responseProperty = ContainerWrapper.wrapContainer( header.responseContainer(), property, ContainerWrapper.ARRAY, ContainerWrapper.LIST, ContainerWrapper.SET); responseProperty.setDescription(header.description()); responseHeaders.put(name, responseProperty); appendModels(context.getSwagger(), cls); } } } } return responseHeaders; }
} else if (!ReflectionUtils.isVoid(apiResponse.response())) { final Type type = apiResponse.response(); final Property property = ModelConverters.getInstance().readAsProperty(type);
} else if (!ReflectionUtils.isVoid(apiResponse.response())) { final Type type = apiResponse.response(); final Property property = ModelConverters.getInstance().readAsProperty(type);
public static Property generateResponseProperty(Swagger swagger, ResponseConfigBase config) throws Error { Class<?> responseClass = config.getResponseClass(); if (responseClass == null || ReflectionUtils.isVoid(responseClass)) { return null;