Skip to content
Ryan Heaton edited this page Mar 31, 2017 · 11 revisions

Jackson 1 Module

The Jackson 1 module processes all the Java data types that can be (de)serialized to/from XML using Jackson 1. The Jackson 1 module creates the model that is used to generate all the JSON-based documentation for the API.

Configuration

The configuration for the Jackson 1 module is specified by the jackson1 element under the modules element in the Enunciate configuration file. The following attributes are supported on the jackson1 element:

attribute description
honorJaxb Jackson has support for JAXB annotations. This attribute dictates whether JAXB annotations will be honored when modeling the JSON data types. By default, JAXB annotations will be honored only if the Jackson JAXB support classes are found on the classpath.
dateFormat The default format of the dates. By default, dates are assumed to be serialized using whole numbers. Requires Enunciate 2.3+.
datatype-detection The "datatype-detection" dictates how the module is to detect data types for the API. The valid values are "passive" (data types will only be detected when other modules and services explicitly depend on the data types), "aggressive" (data types will be detected aggressively, by scanning the entire classpath), and "local" (data types will be detected only from among those in the source code of the current invocation context). Default is "passive".
collapse-type-hierarchy (Since 2.4) Whether to collapse the type hierarchy for JSON data types, removing the concept of supertypes from the generated documentation. By default, Enunciate will document JSON data type hierarchies.
disableExamples (Since 2.7) Whether to disable examples in the generated documentation. Default: false.
wrapRootValue (Since 2.9) Whether to wrap JSON examples with the Jackson "root value". Refer to the Jackson serialization config for more details. Default: false.

Elements

The jackson1 element supports the following child elements:

mixin

The "mixin" subelement of the "jackson1" element is used to declare Jackson mixin annotation classes. These "mixin" elements support the following attributes:

  • The "target" attribute specifies the target class for the mixin.
  • The "source" attribute specifies the mixin source that carries the annotations to be mixed in.
Clone this wiki locally