我们可以通过源码的注释了解到一切:
public @interface ApiModelProperty {
/**
-
Limits the acceptable values for this parameter.
-
-
There are three ways to describe the allowable values:
-
- To set a list of values, provide a comma-separated list.
-
For example: {@code first, second, third}.
- To set a range of values, start the value with "range", and surrounding by square
-
brackets include the minimum and maximum values, or round brackets for exclusive minimum and maximum values.
-
For example: {@code range[1, 5]}, {@code range(1, 5)}, {@code range[1, 5)}.
- To set a minimum/maximum value, use the same format for range but use "infinity"
-
or “-infinity” as the second value. For example, {@code range[1, infinity]} means the
-
minimum allowab