Skip to content
Ryan Heaton edited this page Oct 26, 2017 · 31 revisions

Note: The following is applicable to Enunciate 2. For Enunciate 1.x modules, see Modules (Version 1).

Modules

The work of Enunciate is divided into modules. Modules are loosely coupled, loosely-interdependant extensions to the Enunciate engine. Each module has a specific set of work to perform. For example, the IDL module generates the IDL and schemas for the API, the Java XML client module generates the Java XML client libraries, etc. Since each module has a specific set of work to do, each module has also a separate set of configuration options.

The modules that are to be included in the Enunciate mechanism are discovered at runtime using the Java Service Loader.

There is a set of "provider" modules that you will likely always want enabled. The "provider" modules each interpret and provide a model to the Enunciate engine on which the various other modules might depend in order to do their work. Each provider module defines its model based on the various specifications and libraries that define the model. For example, JAXB provides a specification that describes how Java objects are (de)serialized to/from XML. The JAXB Enunciate Module uses the Java classes to provide an XML model to Enunciate. Other modules (e.g. C# XML, Java XML, etc.) use the model provided by the JAXB module to generate code. You'll want to be thoughtful about disabling a provider module because it may have the side-effect of disabling depending modules.

To disable a module, set disabled="true" on the module configuration in the Enunciate configuration file, e.g.:

<?xml version="1.0" encoding="UTF-8"?>
<enunciate
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.10.0.xsd">
  <modules>
    <gwt-json-overlay disabled="true"/>
  </modules>
</enunciate>

For more information about how to write your own module, see Custom Modules.

Provider Modules

module description coordinates
[[jaxb Module JAXB]] Provides the model for the JAXB API.
[[jackson Module Jackson]] Provides the model for the Jackson JSON API.
[[jackson1 Module Jackson 1]] Provides the model for the Jackson 1 JSON API.
[[jaxws Module JAXWS]] Provides the model for the JAX-WS API.
[[jaxrs Module JAXRS]] Provides the model for the JAX-RS API.
[[spring-web Module Spring Web]] Provides the model for the Spring Web API.

Non-Provider Modules

module description coordinates
[[c-xml-client Module C XML]] Generates the C/C++ XML client libraries.
[[csharp-xml-client Module C Sharp XML]] Generates the C# XML client libraries.
[[docs Module Docs]] Generates the API documentation.
[[java-xml-client Module Java XML Client]] Generates the Java XML client libraries.
[[java-json-client Module Java JSON Client]] Generates the Java JSON client libraries.
[[javascript-client Module JS Client]] The JavaScript client library for JSON.
[[gwt-json-overlay Module GWT JSON Overlay]] Generates the GWT JSON Overlays.
[[obj-c-xml-client Module Obj C XML]] Generates the Objective-C XML client libraries.
[[php-xml-client Module PHP XML]] Generates the PHP XML client libraries.
[[php-json-client Module PHP JSON]] Generates the PHP JSON client libraries.
[[ruby-json-client Module Ruby JSON]] Generates the Ruby JSON client libraries.
[[idl Module IDL]] Generates the XML Schemas and IDL files for the API.
[[swagger Module Swagger]] Builds the Swagger UI for the project.
Clone this wiki locally