コード例 #1
0
  private boolean hasGlobalConsumes(ITypeModel type) {

    if (type.hasAnnotation(JAVAX_CONSUMES)) {
      return true;
    }
    IAnnotationModel apiAnn = type.getAnnotation(SWAGGER_API);
    if (apiAnn == null) {
      return false;
    }
    String consumes = apiAnn.getValue(JAVAX_CONSUMES.toLowerCase());
    if (consumes != null) {
      return true;
    }
    return false;
  }