I'm hitting the error "No support yet for multidimensional arrays" when running docs goal for maven plugin enunciate. Is there a way I can avoid it bombing out the process (ie. generate the rest of the docs for the API)?
I've tried @org.codehaus.enunciate.doc.ExcludeFromDocumentation on the API method returning the class with double array. I've tried @org.codehaus.enunciate.XmlTransient on the class with the double array.
I have since seen in enunciate documentation where those only affect whether they display on docs, not compilation.
I'm happy to hear any ideas you have!
Thanks.
Edit: The best I could do was dump project to temp directory, rip out all modules that aren't necessary to reach the api, delete the class with double array, and replace that part of the REST api's java method signature with String. This allows me to at least create the api document page via enunciate and give a description via javadoc. But, I'd love to have a more elegant solution, so please share if you know of one :)
Edit 2: Example pom:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.services.rest.service</groupId>
<artifactId>service-rest-api</artifactId>
<packaging>pom</packaging>
<version>1.1</version>
<name>service REST API</name>
<dependencies>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>2.2.1.GA</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>jaxrs-api</artifactId>
<version>2.2.1.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson-provider</artifactId>
<version>2.2.1.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxb-provider</artifactId>
<version>2.2.1.GA</version>
<exclusions>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-multipart-provider</artifactId>
<version>2.2.1.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>tjws</artifactId>
<version>2.2.1.GA</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.enunciate</groupId>
<artifactId>maven-enunciate-plugin</artifactId>
<version>1.26</version>
<configuration>
<forceWarPackaging>false</forceWarPackaging>
<configFile>/tmp/enunciate-work/enunciate.xml</configFile>
</configuration>
<executions>
<execution>
<goals>
<goal>docs</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Files located src/main/java/com/company/services/user/rest:
package com.company.services.service.rest;
import javax.ws.rs.POST;
import javax.ws.rs.Produces;
import javax.ws.rs.Consumes;
import javax.ws.rs.Path;
import javax.ws.rs.core.MediaType;
@Path("/")
public interface ServiceResource {
@POST
@Path("/statuschanges")
@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
@Consumes({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
public ServiceStatusChanges getServiceStatusChangeLogs(String string);
}
package com.company.services.service.rest;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class ServiceStatusChanges implements Serializable {
private static final long serialVersionUID = 1l;
private String[][] logs;
public ServiceStatusChanges() {}
public ServiceStatusChanges(String[][] logs) {
this.logs=logs;
}
public String[][] getLogs() {
return logs;
}
public void setLogs(String[][] logs) {
this.logs=logs;
}
}
enunciate.xml:
<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="
http://enunciate.codehaus.org/schemas/enunciate-1.26.xsd">
<modules>
<disable-rule id="csharp.warnings"/>
<disable-rule id="c.warnings"/>
<disable-rule id="obj-c.warnings"/>
<docs docsDir="api" title="REST API" includeDefaultDownloads="false" disableRestMountpoint="true">
</docs>
<!-- Disable all the client generation tools -->
<basic-app disabled="true" />
<c disabled="true" />
<csharp disabled="true" />
<java-client disabled="true" />
<jaxws-client disabled="true" />
<jaxws-ri disabled="false" />
<jaxws-support disabled="false" />
<jersey disabled="true" />
<obj-c disabled="true" />
<xml forceExampleJson="true"/>
<jaxws disabled="false"/>
<amf disabled="true"/>
</modules>
</enunciate>