Search in sources :

Example 1 with HttpParameterType

use of org.apache.servicecomb.swagger.generator.core.model.HttpParameterType in project java-chassis by ServiceComb.

the class SwaggerGeneratorUtils method collectHttpParameterType.

public static HttpParameterType collectHttpParameterType(List<Annotation> annotations, Type genericType) {
    // use the last available type
    for (int idx = annotations.size() - 1; idx >= 0; idx--) {
        Annotation annotation = annotations.get(idx);
        HttpParameterType httpParameterType = collectHttpParameterType(annotation, annotation.annotationType());
        if (httpParameterType != null) {
            return httpParameterType;
        }
    }
    // try by parameter type
    return collectHttpParameterType((Annotation) null, genericType);
}
Also used : Annotation(java.lang.annotation.Annotation) HttpParameterType(org.apache.servicecomb.swagger.generator.core.model.HttpParameterType)

Aggregations

Annotation (java.lang.annotation.Annotation)1 HttpParameterType (org.apache.servicecomb.swagger.generator.core.model.HttpParameterType)1