Module neberus.core

Annotation Type ApiEntity


  • @Target({})
    @Retention(SOURCE)
    public @interface ApiEntity
    Define a response entity.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String contentType
      If unset, the first Content-Type defined on the method will be used.
      java.lang.String description
      Description of the entity.
      java.lang.Class entityClass
      Set the class of the DTO used for the entity.
      ApiExample[] examples
      Custom examples for this entity.
    • Element Detail

      • entityClass

        java.lang.Class entityClass
        Set the class of the DTO used for the entity.
        Returns:
        the entity class
        Default:
        java.lang.Void.class
      • contentType

        java.lang.String contentType
        If unset, the first Content-Type defined on the method will be used. Only one entity per Content-Type may be defined.
        Returns:
        the content type
        Default:
        ""
      • description

        java.lang.String description
        Description of the entity.
        Returns:
        the description
        Default:
        ""
      • examples

        ApiExample[] examples
        Custom examples for this entity. The examples will be included as is in the documentation without further checks.
        Returns:
        the examples
        Default:
        {}