This transaction adds the ability to automatically generate and attach JSON-Schema to the WADL 
generated at deploy time. This feature isn't enabled by default, you need to include the code
in the jersey-wadl-json-schema component and register a WadlGeneratorConfig, for example:

    public class JsonSchemaWadlGeneratorConfig extends WadlGeneratorConfig {

        @Override 
        public List<WadlGeneratorDescription> configure() {
            return generator( WadlGeneratorJSONGrammarGenerator.class ).descriptions();
        }
    }

This can then be registered in the web.xml for example:

<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5">
  <servlet>
    <servlet-name>jersey</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <init-param>
      <param-name>com.sun.jersey.config.property.WadlGeneratorConfig</param-name>
      <param-value>examples.JsonSchemaWadlGeneratorConfig</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>jersey</servlet-name>
    <url-pattern>/jersey/*</url-pattern>
  </servlet-mapping>
</web-app>

The one JSON-Schema is generated for each type and attached using a new URI property on the 
representation element, here is an example using both the XML element property and a JSON-Schema
URI to reference the definitions:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<application xmlns="http://wadl.dev.java.net/2009/02">
    <doc xmlns:jersey="http://jersey.java.net/" jersey:generatedBy="Jersey: 1.15-SNAPSHOT 10/26/2012 09:28 AM"/>
    <grammars>
        <include href="xsd0.xsd">
            <doc title="Generated" xml:lang="en"/>
        </include>
    </grammars>
    <resources base="http://localhost/">
        <resource path="/root">
            <method id="hello" name="PUT">
                <request>
                    <representation xmlns:ns2="urn:message" xmlns:json="http://wadl.dev.java.net/2009/02/json-schema" element="ns2:requestMessage" 
                                    mediaType="application/json" json:describedby="application.wadl/requestMessage"/>
                </request>
                <response>
                    <representation xmlns:ns2="urn:message" xmlns:json="http://wadl.dev.java.net/2009/02/json-schema" element="ns2:responseMessage" 
                                    mediaType="application/json" json:describedby="application.wadl/responseMessage"/>
                </response>
            </method>
        </resource>
    </resources>
</application> 

In this case the URI application.wadl/requestMessage contains this simple JSON-Schema definition:

{"type":"object","properties":{"text":{"type":"string"}},"name":"requestMessage"} 

The other change that was made in this transaction was the ability to access the WADL as a JSON document, 
this change is very experimental and should not be considered a final format for the mapping. You can access
this version of the WADL in the normal way; but with an accept header of "application/vnd.sun.wadl+json". 

git-svn-id: https://svn.java.net/svn/jersey~svn/trunk@5806 2fda5173-fe30-0410-90bd-98ff5453417f