-
Notifications
You must be signed in to change notification settings - Fork 200
Module Jackson 1
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.
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 . |
propertyNamingStrategy |
(Since 2.11) The alternate naming strategy to use for json properties. Currently only "CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES" is supported. |
propertiesAlphabetical |
(Since 2.11) Whether to sort JSON properties alphabetically. Default: false |
The jackson1
element supports the following child elements:
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.
(As of Enunciate 2.10)
The "accessor-visibility" subelement of the "jackson1" element is used to declare Jackson 1 default accessor visibility. These "accessor-visibility" elements support the following attributes:
- The "type" attribute specifies the type of the accessor ("getter", "setter", "creator", "field", "is_getter", "all")
- The "visibility" attribute specifies the default visibility ("any", "non_private", "protected_and_public", "public_only", "none", "default")
(As of 2.10.)
The "examples" subelement of the "jackson1" element is used to declare external documentation examples. Child "example" elements support the following attributes:
- The "type" attribute specifies documentation type for which to provide an example.
- The "example" attribute specifies the text of the documentation example.