isOptionalAnnotation

fun isOptionalAnnotation(simpleName: String, qualifiedName: String? = null): Boolean(source)

Checks whether the given annotation is recognized as an optional marker.

A property carrying a matching annotation is excluded from the emitted schema's required array, the same way a Kotlin default value is handled — mainly useful for front ends without native default-value support (e.g. Java/APT).

Simple annotation names are matched case-insensitively; fully qualified names are matched case-sensitively (exact match).

Return

true if the annotation is recognized as an optional marker

Parameters

simpleName

The simple name of the annotation (e.g., "Nullable")

qualifiedName

The fully qualified name of the annotation, or null if unavailable