Relation

@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Relation(val name: String = "", val mutable: Boolean = true, val autoTransform: Boolean = true)(source)

Annotates a class representing a to-many relationship in a JSON:API resource.

Parameters

name

The name of the relationship.

mutable

If the relationship should be editable (can add/edit/remove elements).

autoTransform

If the relationship name should be automatically transformed to snake case when serializing and vice versa when deserializing.

Properties

Link copied to clipboard
Link copied to clipboard
val mutable: Boolean = true
Link copied to clipboard