Full name:
org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.37:generate
Description:
Attributes:
Name | Type | Since | Description |
---|---|---|---|
addCompileSourceRoot | boolean | 0.1.9 | Add the output directory to the project as a source root, so that
the generated java types are compiled and included in the project
artifact. Default value is: true. |
annotationStyle | String | 0.3.1 | The style of annotations to use in the generated Java types.
Supported values:
Default value is: jackson2. |
classNamePrefix | String | 0.4.6 | Whether to add a prefix to generated classes. |
classNameSuffix | String | 0.4.6 | Whether to add a suffix to generated classes. |
constructorsRequiredPropertiesOnly | boolean | 0.4.8 | Whether generated constructors should have parameters for all
properties, or only required ones. Default value is: false. |
customAnnotator | String | 0.3.6 | A fully qualified class name, referring to a custom annotator class
that implements org.jsonschema2pojo.Annotator and will
be used in addition to the one chosen by
annotationStyle.
If you want to use the custom annotator alone, set annotationStyle to none. Default value is: org.jsonschema2pojo.NoopAnnotator. |
customDatePattern | String | 0.4.33 | A custom pattern to use when formatting date fields during
serialization. Requires support from your JSON binding library. |
customDateTimePattern | String | 0.4.33 | A custom pattern to use when formatting date-time fields during
serialization. Requires support from your JSON binding library. |
customRuleFactory | String | 0.4.5 | A fully qualified class name, referring to an class that extends
org.jsonschema2pojo.rules.RuleFactory and will be used
to create instances of Rules used for code generation. Default value is: org.jsonschema2pojo.rules.RuleFactory. |
customTimePattern | String | 0.4.36 | A custom pattern to use when formatting time fields during
serialization. Requires support from your JSON binding library. |
dateTimeType | String | 0.4.22 | What type to use instead of string when adding string type fields
of format date-time to generated Java types. |
dateType | String | 0.4.22 | What type to use instead of string when adding string type fields
of format date (not date-time) to generated Java types. |
excludes | String[] | 0.4.3 | List of file patterns to exclude. This only applies to the initial
scan of the file system and will not prevent inclusion through a
"$ref" in one of the schemas. |
fileExtensions | String[] | 0.4.23 | The file extenations that should be considered as file name
extensions, and therefore ignored, when creating Java class names. |
formatDateTimes | boolean | 0.4.29 | Whether the fields of type `date` are formatted during
serialization with a default pattern of yyyy-MM-dd'T'HH:mm:ss.SSSZ. Default value is: false. |
formatDates | boolean | 0.4.33 | Whether the fields of type `date` are formatted during
serialization with a default pattern of yyyy-MM-dd. Default value is: false. |
formatTimes | boolean | 0.4.36 | Whether the fields of type `time` are formatted during
serialization with a default pattern of HH:mm:ss.SSS. Default value is: false. |
generateBuilders | boolean | 0.1.2 | Whether to generate builder-style methods of the form
withXxx(value) (that return this),
alongside the standard, void-return setters. Default value is: false. |
includeAccessors | boolean | 0.4.15 | Whether to include getters/setters or to omit these accessor
methods and create public fields instead. Default value is: true. |
includeAdditionalProperties | boolean | 0.4.14 | Whether to allow 'additional properties' support in objects.
Setting this to false will disable additional properties support,
regardless of the input schema(s). Default value is: true. |
includeConstructors | boolean | 0.4.8 | Whether to generate constructors or not Default value is: false. |
includeDynamicAccessors | boolean | 0.4.17 | Whether to include dynamic getters, setters, and builders or to
omit these methods. Default value is: false. |
includeHashcodeAndEquals | boolean | 0.3.1 | Whether to include hashCode and equals
methods in generated Java types. Default value is: true. |
includeJsr303Annotations | boolean | 0.3.2 | Whether to include JSR-303/349
annotations (for schema rules like minimum, maximum, etc) in
generated Java types.
Schema rules and the annotation they produce:
Default value is: false. |
includeToString | boolean | 0.3.1 | Whether to include a toString method in generated Java
types. Default value is: true. |
includes | String[] | 0.4.3 | List of file patterns to include. |
inclusionLevel | String | - | The Level of inclusion to set in the generated Java types for
Jackson1 and Jackson2 serializers.
Supported values
Default value is: NON_NULL. |
initializeCollections | boolean | - | Whether to initialize Set and List fields as empty collections, or
leave them as null. Default value is: true. |
outputDirectory | File | 0.1.0 | Target directory for generated Java source files. Default value is: ${project.build.directory}/java-gen. |
outputEncoding | String | 0.4.0 | The character encoding that should be used when writing the
generated Java source files. Default value is: UTF-8. |
parcelable | boolean | 0.4.11 | **EXPERIMENTAL** Whether to make the generated types 'parcelable'
(for Android development). Default value is: false. |
propertyWordDelimiters | String | 0.2.2 | The characters that should be considered as word delimiters when
creating Java Bean property names from JSON property names. If
blank or not set, JSON properties will be considered to contain a
single word when creating Java Bean property names. Default value is: - _. |
refFragmentPathDelimiters | String | 0.4.31 | A string containing any characters that should act as path
delimiters when resolving $ref fragments. By default, #, / and .
are used in an attempt to support JSON Pointer and JSON Path. Default value is: #/.. |
removeOldOutput | boolean | 0.3.7 | Whether to empty the target directory before generation occurs, to
clear out all source files that have been generated previously.
Be warned, when activated this option will cause jsonschema2pojo to indiscriminately delete the entire contents of the target directory (all files and folders) before it begins generating sources. Default value is: false. |
serializable | boolean | 0.4.23 | Whether to make the generated types 'serializable'. |
skip | boolean | 0.2.1 | Skip plugin execution (don't read/validate any schema files, don't
generate any java types). Default value is: false. |
sourceDirectory | String | 0.1.0 | Location of the JSON Schema file(s). Note: this may refer to a
single file or a directory of files. |
sourcePaths | String[] | 0.3.1 | An array of locations of the JSON Schema file(s). Note: each item
may refer to a single file or a directory of files. |
sourceSortOrder | String | 0.4.34 | The sort order to be applied when recursively processing the source
files. By default the OS can influence the processing order.
Supported values:
Default value is: OS. |
sourceType | String | 0.3.3 | The type of input documents that will be read
Supported values:
Default value is: jsonschema. |
targetPackage | String | 0.1.0 | Package name used for generated Java classes (for types where a
fully qualified name has not been supplied in the schema using the
'javaType' property). |
targetVersion | String | 0.4.17 | The target version for generated source files. Default value is: 1.6. |
timeType | String | 0.4.22 | What type to use instead of string when adding string type fields
of format time (not date-time) to generated Java types. |
toStringExcludes | String[] | 0.4.35 | The fields to be excluded from toString generation |
useBigDecimals | boolean | 0.4.22 | Whether to use the java type BigDecimal instead of
float (or Float) when representing the
JSON Schema type 'number'. Note that this configuration overrides
isUseDoubleNumbers(). Default value is: false. |
useBigIntegers | boolean | 0.4.25 | Whether to use the java type BigInteger instead of
int (or Integer) when representing the
JSON Schema type 'integer'. Note that this configuration overrides
isUseLongIntegers(). Default value is: false. |
useCommonsLang3 | boolean | 0.4.1 | Whether to use commons-lang 3.x imports instead of commons-lang 2.x
imports when adding equals, hashCode and toString methods. Default value is: false. |
useDoubleNumbers | boolean | 0.4.0 | Whether to use the java type double (or
Double) instead of float (or
Float) when representing the JSON Schema type
'number'. Default value is: true. |
useJodaDates | boolean | 0.4.0 | Whether to use DateTime instead of Date
when adding date type fields to generated Java types. Default value is: false. |
useJodaLocalDates | boolean | 0.4.9 | Whether to use LocalDate instead of string when adding
string type fields of format date (not date-time) to generated Java
types. Default value is: false. |
useJodaLocalTimes | boolean | 0.4.9 | Whether to use LocalTime instead of string when adding
string type fields of format time (not date-time) to generated Java
types. Default value is: false. |
useLongIntegers | boolean | 0.2.2 | Whether to use the java type long (or
Long) instead of int (or
Integer) when representing the JSON Schema type
'integer'. Default value is: false. |
usePrimitives | boolean | 0.2.0 | Whether to use primitives (long, double,
boolean) instead of wrapper types where possible when
generating bean properties (has the side-effect of making those
properties non-null). Default value is: false. |
Supported values:
constructorsRequiredPropertiesOnly:
If you want to use the custom annotator alone, set annotationStyle to none.
Schema rules and the annotation they produce:
Supported values
Be warned, when activated this option will cause jsonschema2pojo to indiscriminately delete the entire contents of the target directory (all files and folders) before it begins generating sources.
skip:
Supported values: