jackson-json-schema:generate

Full name:

com.fasterxml.jackson:jackson-json-schema-plugin:2.4.4-SNAPSHOT:generate

Description:

Json Schema Generator.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • Requires dependency collection of artifacts in scope: compile.
  • Binds by default to the lifecycle phase: process-classes.

Required Parameters

Name Type Since Description
includes List - Patterns (ant-ish) of classes to generate. This may not be empty; there is no default.

Optional Parameters

Name Type Since Description
excludes List - Patterns of classes to exclude.
objectMapperFactoryClassName String - Name a class that implements JsonSchemaObjectMapperFactory. This class path must be in the compile classpath or the plugin class loader (the dependencies declared in the pom for the plugin). The plugin will instantiate an object of this class and call it to obtain an ObjectMapper, thus seeing any customizations applied to that object mapper. If you use a class that is in the plugin class loader and not in the compile classpath, it will not apply customizations to classes unless the classes themselves are also in the plugin class loader. Therefore, using the plugin class loader is probably not a good idea.
outputSchema File - Location of the result schema.
Default value is: ${project.build.directory}/schema.json.
User property is: schema.

Parameter Details

excludes:

Patterns of classes to exclude.
  • Type: java.util.List
  • Required: No

includes:

Patterns (ant-ish) of classes to generate. This may not be empty; there is no default.
  • Type: java.util.List
  • Required: Yes

objectMapperFactoryClassName:

Name a class that implements JsonSchemaObjectMapperFactory. This class path must be in the compile classpath or the plugin class loader (the dependencies declared in the pom for the plugin). The plugin will instantiate an object of this class and call it to obtain an ObjectMapper, thus seeing any customizations applied to that object mapper. If you use a class that is in the plugin class loader and not in the compile classpath, it will not apply customizations to classes unless the classes themselves are also in the plugin class loader. Therefore, using the plugin class loader is probably not a good idea.
  • Type: java.lang.String
  • Required: No

outputSchema:

Location of the result schema.
  • Type: java.io.File
  • Required: No
  • User Property: schema
  • Default: ${project.build.directory}/schema.json