Skip to content

Commit

Permalink
Fix javadoc in Size annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
baloo42 committed Oct 13, 2024
1 parent 90018a5 commit 3da1b99
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@

/**
* Decorates the resulting property with size limits.
* <p>
* <br>
* The annotation can be used on strings, list/arrays and maps and will result in an appropriate JSON Schema constraint:
* <ul>
* <li>{@code minLength} and/or {@code maxLength} for a String</li>
* <li>{@code minItems} and/or {@code maxItems} for a list/array</li>
* <li>{@code minProperties} and/or {@code maxProperties} for a map</li>
* </ul>
* </p>
*
* @see <a href=
* "https://kubernetes.io/docs/reference/kubernetes-api/extend-resources/custom-resource-definition-v1/#JSONSchemaProps">
Expand All @@ -39,7 +38,13 @@
@Target({ ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE_USE })
@Retention(RetentionPolicy.RUNTIME)
public @interface Size {
/**
* @return the minimum value (inclusive)
*/
long min() default 0;

/**
* @return the maximum value (inclusive)
*/
long max() default Long.MAX_VALUE;
}

0 comments on commit 3da1b99

Please sign in to comment.