SerialDescription

Marks a description for a @Serializable class or property to be included in the generated JSON Schema.

Unlike @Description, this annotation carries @SerialInfo so it is preserved in SerialDescriptor and is automatically recognized by the serialization-based schema generator without any extra configuration.

Example:

@Serializable
@SerialDescription("A user account")
data class User(
@SerialDescription("The user's full name")
val name: String,
)

See also

Properties

Link copied to clipboard