Skip to content
Ryan Heaton edited this page Sep 17, 2015 · 1 revision

Ruby Module

The Ruby module generates Ruby data types that can be used in conjunction with the Ruby JSON implementation to (de)serialize the REST resources as they are represented as JSON data.

Configuration

The Ruby module is configured with the ruby element under the modules element of the enunciate configuration file. It supports the following attributes:

attribute description
label The "label" attribute is the label for the Ruby API. This is the name by which the file will be identified (producing [label].rb). By default the label is the same as the Enunciate project label.
forceEnable The "forceEnable" attribute is used to force-enable the Ruby module. By default, the Ruby module is enabled only when (1) Jackson-XC is on the claspath and (2) there exists a JAX-RS resource method that consumes or produces JSON.

Elements

package-conversions

The "package-conversions" subelement of the "ruby" element is used to map packages from the original API packages to Ruby modules. This element supports an arbitrary number of "convert" child elements that are used to specify the conversions. These "convert" elements support the following attributes:

  • The "from" attribute specifies the package that is to be converted. This package will match all classes in the package as well as any subpackages of the package. This means that if "org.enunciate" were specified, it would match "org.enunciate", "org.enunciate.api", and "org.enunciate.api.impl".
  • The "to" attribute specifies what the package is to be converted to. Only the part of the package that matches the "from" attribute will be converted.

facets

Facet configuration for the module. See Facets.

Clone this wiki locally