Package-level declarations

Types

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Attr(val name: String = "", val autoTransform: Boolean = true)

Marks a property as an attribute of a JSON:API resource.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class DefaultInstance

This annotation is used to mark a class as the default instance of a class.

Link copied to clipboard
annotation class ResourceSchema(val resourceType: String = "", val endpoint: String, val config: KClass<out JsonApiConfig> = JsonApiConfig::class)

Annotates a class as a JSON:API resource schema with the given endpoint.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ToManyRelationship(val name: String, val resourceType: KClass<*>, val canBeNull: Boolean = false, val propertyName: String = "")

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

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ToOneRelationship(val name: String, val resourceType: KClass<*>, val canBeEmpty: Boolean = false, val propertyName: String = "")

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