I have the following annotation in my RESTEasy code:
@Path("/v1/authenticateService")
Enunciate generates a "Mount Point" in the documentation as:
/rest/v1/authenticateService/authenticate
I have tried using the following in my enunciate.xml, to override the "/rest" context:
<services>
<rest defaultRestSubcontext="/gateway-service-access-pox" />
</services>
I have also tried the following, but it didn't do anything, either:
<deployment protocol="https" host="(host)" context="/gateway-service-access-pox" />
I am using enunciate 1.23 to generate docs for a Maven 3, multi-module project.
Here is what is written to the console:
[INFO] --- maven-site-plugin:3.0:site (default-cli) @ gateway-service-access-pox ---
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.4
[INFO] configuring report plugin org.codehaus.enunciate:maven-enunciate-plugin:1.23
[WARNING] No project URL defined - decoration links will not be relativized!
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Generating "About" report --- maven-project-info-reports-plugi开发者_C百科n:2.4
[INFO] Generating "Web Service API" report --- maven-enunciate-plugin:1.23
[INFO] initializing enunciate.
[INFO] invoking enunciate:generate step...
[INFO] invoking enunciate:compile step...
[INFO] invoking enunciate:build step...
[INFO] closing enunciate.
Any idea what I am doing wrong?
More info... The complete enunciate.xml (in case there is a problem affecting the entry:
<?xml version="1.0"?>
<enunciate label="platform-gateway-api" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.23.xsd">
<api-import pattern="com.intuit.platform.gateway.common.DetailedResponse" />
<api-import pattern="com.intuit.platform.gateway.service.access.domain.*" />
<api-import pattern="com.intuit.platform.gateway.service.identity.domain.Identity" />
<deployment protocol="https" host="(host)" context="/gateway-service-access-pox" />
<namespaces>
<namespace uri="http://schema.intuit.com/platform/integration/detailedResponse/v1" id="common" />
<namespace uri="http://schema.intuit.com/platform/identity/user/v1" id="user" />
<namespace uri="http://schema.intuit.com/platform/access/token/v1" id="token" />
</namespaces>
<services>
<rest defaultRestSubcontext="/gateway-service-access-pox" />
</services>
<modules>
<!-- Docs -->
<docs splashPackage="com.intuit.platform.gateway.service.ticket.api" title="Platform Gateway Access API"
copyright="Intuit Inc">
<download name="License" file="LICENSE.txt" description="The license file governing the use of this API." />
</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="true" />
<jaxws-support disabled="true" />
<jersey disabled="true" />
<obj-c disabled="true" />
<xml disabled="true" />
</modules>
</enunciate>
BTW, if there is better way to get help on this issue (some sort of bug forum), please let me know. I am a newbie with enunciate and didn't know if this was a bug or my ignorance.
as Ryan said the "defaultRestSubcontext" works. For example I used it this way to remove "rest" from default generated mount point:
<services>
<rest defaultRestSubcontext="/" />
</services>
If one set defaultRestSubcontext to "/" the generation starts from "/" and then followed by the endpoint's path.
P.S. I am using Enunciate 1.24
Well... I have being around this for couple days and finally it is working and the mount point has proper default rest subcontext :)
2 Things I did to make it work.
enable the XML module
<xml disabled="false" />
Add enunciate-xml jar to runtime.
I don't know why is that, but it is working for me now.
精彩评论