Module neberus.core

Annotation Type ApiParameter


  • @Target(METHOD)
    @Retention(SOURCE)
    @Repeatable(ApiParameters.class)
    public @interface ApiParameter
    Defines a custom parameter for a REST method.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String name
      The name of the parameter.
      ApiParameter.Type type
      Define the type such as "path", "query" or "header".
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      ApiAllowedValues[] allowedValues
      Define allowed value that should be provided by the client.
      boolean deprecated
      If true, the parameter will be marked as deprecated.
      java.lang.String deprecatedDescription
      Additional description that will be shown if the parameter is deprecated.
      java.lang.String description
      Description of the parameter.
      java.lang.Class entityClass
      Define the class of the parameter.
      boolean optional
      If true, the parameter will be marked as optional, else as mandatory.
    • Element Detail

      • name

        java.lang.String name
        The name of the parameter.
        Returns:
        the name
      • type

        ApiParameter.Type type
        Define the type such as "path", "query" or "header".
        Returns:
        the type
      • description

        java.lang.String description
        Description of the parameter.
        Returns:
        the description
        Default:
        ""
      • allowedValues

        ApiAllowedValues[] allowedValues
        Define allowed value that should be provided by the client. If missing, the possible value will be generated. In case of an enum, all enum values will be shown, otherwise it will be something like {String}.
        Returns:
        the allowed value
        Default:
        {}
      • entityClass

        java.lang.Class entityClass
        Define the class of the parameter. May be used for templates and as containerClass for other parameters.
        Returns:
        the entity class
        Default:
        java.lang.Void.class
      • optional

        boolean optional
        If true, the parameter will be marked as optional, else as mandatory.
        Returns:
        whether the parameter is optional
        Default:
        false
      • deprecated

        boolean deprecated
        If true, the parameter will be marked as deprecated.
        Returns:
        whether the parameter is deprecated
        Default:
        false
      • deprecatedDescription

        java.lang.String deprecatedDescription
        Additional description that will be shown if the parameter is deprecated.
        Returns:
        additional description for a deprecated parameter
        Default:
        ""