joelittlejohn / jsonschema2pojo

Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc
http://www.jsonschema2pojo.org
Apache License 2.0
6.24k stars 1.66k forks source link

Add Email bean validation annotation for "format":"email" #1475

Closed joelittlejohn closed 1 year ago

joelittlejohn commented 1 year ago

Things to consider if are using the includeJsr303Annotations feature:

joelittlejohn commented 1 year ago

If you receive compilation errors because javax.validation.constraints.Email cannot be found, upgrade to javax.validation/validation-api 2.0.1.Final.

unkish commented 1 year ago

If you receive compilation errors because javax.validation.constraints.Email cannot be found, upgrade to javax.validation/validation-api 2.0.1.Final.

Note that given annotation can't be used when targetVersion is less that 1.8 as it has:

Those who target older version might also need to make sure that version of javax.validation/validation-api being used is compatible with targetVersion

unkish commented 1 year ago

Nice work!