public static boolean fieldNullable(Field field) {
		if (OPTIONAL_TYPES.stream().anyMatch(c -> c.isAssignableFrom(field.getType()))) {
			return true;
		}
		if (KotlinDetector.isKotlinPresent() && KotlinDetector.isKotlinReflectPresent()
				&& KotlinDetector.isKotlinType(field.getDeclaringClass())) {
			KProperty<?> kotlinProperty = ReflectJvmMapping.getKotlinProperty(field);
			if (kotlinProperty != null) {
				return kotlinProperty.getReturnType().isMarkedNullable();
			}
		}
		return JAVA_FIELD_NULLABLE_DEFAULT;
	}
Is field nullable. java default is nullable
{@link SchemaUtils#JAVA_FIELD_NULLABLE_DEFAULT}

@param field the field
@return the boolean
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SchemaUtils.java