You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 30, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,13 @@ Module for the `jsonschema-generator` – deriving JSON Schema attributes from `
6
6
7
7
## Features
8
8
1. Determine whether a member is not nullable, base assumption being that all fields and method return values are nullable if not annotated. Based on `@NotNull`/`@Null`/`@NotEmpty`/`@NotBlank`
9
-
2. Populate "minItems" and "maxItems" for containers (i.e. arrays and collections). Based on `@Size`/`@NotEmpty`
10
-
3. Populate "minLength" and "maxLength" for strings. Based on `@Size`/`@NotEmpty`/`@NotBlank`
11
-
4. Populate "minimum"/"exclusiveMinimum" for numbers. Based on `@Min`/`@DecimalMin`/`@Positive`/`@PositiveOrZero`
12
-
5. Populate "maximum"/"exclusiveMaximum" for numbers. Based on `@Max`/`@DecimalMax`/`@Negative`/`@NegativeOrZero`
9
+
2. Populate list of "required" fields/methods for objects if `JavaxValidationOption.NOT_NULLABLE_FIELD_IS_REQUIRED` and/or `JavaxValidationOption.NOT_NULLABLE_METHOD_IS_REQUIRED` is/are being provided in constructor.
10
+
3. Populate "minItems" and "maxItems" for containers (i.e. arrays and collections). Based on `@Size`/`@NotEmpty`
11
+
4. Populate "minLength" and "maxLength" for strings. Based on `@Size`/`@NotEmpty`/`@NotBlank`
12
+
5. Populate "format" for strings. Based on `@Email`, can be "email" or "idn-email" depending on whether `JavaxValidationOption.PREFER_IDN_EMAIL_FORMAT` is being provided in constructor.
13
+
6. Populate "pattern" for strings. Based on `@Pattern`/`@Email`, when corresponding `JavaxValidationOption.INCLUDE_PATTERN_EXPRESSIONS` is being provided in constructor.
14
+
7. Populate "minimum"/"exclusiveMinimum" for numbers. Based on `@Min`/`@DecimalMin`/`@Positive`/`@PositiveOrZero`
15
+
8. Populate "maximum"/"exclusiveMaximum" for numbers. Based on `@Max`/`@DecimalMax`/`@Negative`/`@NegativeOrZero`
13
16
14
17
Schema attributes derived from validation annotations on fields are also applied to their respective getter methods.
15
18
Schema attributes derived from validation annotations on getter methods are also applied to their associated fields.
@@ -20,7 +23,7 @@ Schema attributes derived from validation annotations on getter methods are also
0 commit comments