I trying to import model classes into enunciate docs but I'm getting the following in the Maven log:
Class com.mycompany.model.MyClass was explicitly imported, but it was not found on the classpath. We'll try to import it anyway.
I'm trying to include the Request and Response classes in my enunciate generated docs. However all I'm getting is the following:
POST
Request Body
element: (custom)
media types: application/json
(no documentation provided)
Response Body
element: (custom)
media types: application/json
(no documentation provided)
enunciate.xml
<?xml version="1.0"?>
<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.27.xsd">
<api-import pattern="com.mycompany.model.*" />
<api-import pattern="com.mycompany.model.MyClass" />
<api-classes>
<include pattern="com.mycompany.common.imrest.model.*"/>
<include pattern="com.mycompany.model.MyClass"/>
</api-classes>
</enunciate>
pom.xml
<plugin>
<groupId>org.codehaus.enunciate</groupId>
<artifactId>maven-enunciate-plugin</artifactId>
<version>1.27</version>
<configuration>
<configFile>enunciate.xml</configFile>
</configuration>
<executions>
<execution>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
Also, a second question. Is there a way to include sample JSON request and responses in the documentation?