Package io.bkbn.kompendium.annotations

Contains all annotations used by Kompendium

Types

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Field(name: String, description: String)

Annotation used to perform field level overrides.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class FreeFormObject
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Param(type: ParamType)

Used to indicate that a field in a data class represents an OpenAPI parameter

Link copied to clipboard
enum ParamType : Enum<ParamType>

The allowed parameter types as specified by the OpenAPI specification

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

This instructs Kompendium to store the class as a referenced component. This is mandatory for any data models that have recursive children. If you do not annotate a recursive class with Referenced, you will get a stack overflow error when you try to launch your API

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class UndeclaredField(field: String, clazz: KClass<*>)

This annotation allows users to add additional fields that are not part of the core data model. This should be used EXTREMELY sparingly. Most useful in supporting a variety of polymorphic serialization techniques.