2011-08-17 16 views
5

benim RESTEasy kodunda aşağıdaki açıklama var:Bildirim ile oluşturulan REST içeriğini nasıl değiştiririm?

@Path("/v1/authenticateService") 

enunciate olarak belgelerinde bir "Dağı Noktası" oluşturur:

/rest/v1/authenticateService/authenticate 

benim enunciate.xml aşağıdaki kullanarak denedi ya

<services> 
    <rest defaultRestSubcontext="/gateway-service-access-pox" /> 
</services> 

Ayrıca aşağıdaki denedim ama bir şey yapmadım: "/ dinlenme" bağlam geçersiz kılmak için

<deployment protocol="https" host="(host)" context="/gateway-service-access-pox" /> 

Maven 3, çok modüllü bir proje için dokümanlar oluşturmak üzere 1.23'ü kullanıyorum. Ben yanlış yapıyorum

[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-plugin: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. 

herhangi bir fikir: Burada

konsola ne yazılır mı? (Bu konuda bir çeşit yardım almak için daha iyi bir yolu olup olmadığını,

<?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: durumunda

diğer bilgiler ... tam enunciate.xml (girişi etkileyen bir sorun olduğunda Bu forum bir hata ya da cehalet olup olmadığını bilmiyordum ve bu bir hata ya da cehalet olup olmadığını bilmiyordum.

+0

Belki de bu sorun mu? https://github.com/stoicflame/enunciate/issues/14 Ancak, benim için çalışıyor.Ayrıca, öğenizde _docsDir_ özniteliğini ayarlayamıyorum - kökte oluşturulmuş bir dokümanı yoksa, bunları nereye koymayı planladığınızı bilmeniz gerekir; bu nedenle, Ekleme, API'nız için doğru göreli yolu oluşturur. – Pavel

cevap

2

, Ryan "defaultRestSubcontext" ifadesinin çalıştığı gibi. varsayılan oluşturulan bağlama noktasından "dinlenme" yi kaldırın:

<hizmetler>
< dinlenme defaultRestSubcontext = "/"/>
</hizmetler bir set defaultRestSubcontext bitiş noktasının yoluna göre "/" üretiminin başladığı gelen "/" ve daha sonra takip etmek durumunda

>.

P.S. Ben Eh ... Ben birkaç gün boyunca bu etrafında olmayı ve nihayet çalışıyor ve bağlama noktası uygun varsayılan kalan alt bağlam :) Ben çalışması için yaptığımız

2 şeyler vardır

1

enunciate 1.24 kullanıyorum.

  1. <xml disabled="false" /> 
    
  2. basa-xml kavanoz çalışma süresiyle ekle XML modülü sağlar.

Neden olduğunu bilmiyorum, ama şimdi benim için çalışıyor.

İlgili konular