code: private static SwaggerType toSwaggerType(final String type) {
          if (INTEGER_TYPES.contains(type))
              return SwaggerType.INTEGER;
  
          if (DOUBLE_TYPES.contains(type))
              return SwaggerType.NUMBER;
  
          if (BOOLEAN.equals(type) || PRIMITIVE_BOOLEAN.equals(type))
              return SwaggerType.BOOLEAN;
  
          if (STRING.equals(type))
              return SwaggerType.STRING;
  
          return SwaggerType.OBJECT;
      }
docs: Converts the given Java type to the Swagger JSON type.
  
  @param type The Java type definition
  @return The Swagger type