@Target(FIELD) @Retention(RUNTIME) public @interface Minimum
An annotation to provide a hint in the OpenAPI schema that the number field has a minimum value. The value is a string that must be parsable to the same number type as the field the annotation is applied to. Parsing is accomplished by using the valueOf(String) method of the corresponding type (i.e. Integer.valueOf(String)).

If the exclusive flag is set to false (default), the minimum value is inclusive, meaning the field must be equal to or greater than the value. If the exclusive flag is set to true, the minimum value is exclusive, meaning the field must be greater than the value.

To set a range of values, use both the Minimum and Maximum annotations.

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
     
  • Element Details

    • exclusive

      boolean exclusive
      Default:
      false