2011-08-17 12 views
5

मैं है मेरी RESTEasy कोड में निम्नलिखित एनोटेशन:मैं पुनर्मिलन द्वारा उत्पन्न आरईएसटी संदर्भ कैसे बदलूं?

@Path("/v1/authenticateService") 

उच्चारित के रूप में दस्तावेज में एक "माउंट प्वाइंट" उत्पन्न करता है:

/rest/v1/authenticateService/authenticate 

मैं अपने enunciate.xml में निम्नलिखित का उपयोग कर, की कोशिश की है "/ बाकी" संदर्भ ओवरराइड करने के लिए:

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

मैं भी निम्नलिखित की कोशिश की है, लेकिन यह कुछ भी नहीं किया है, या तो:

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

मैं मैवेन 3, बहु-मॉड्यूल प्रोजेक्ट के लिए दस्तावेज़ उत्पन्न करने के लिए 1.23 का उपयोग कर रहा हूं।

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

किसी भी विचार क्या मैं गलत कर रहा हूँ:

यहाँ कंसोल के लिए लिखा है है? ,

<?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 अगर वहाँ (किसी प्रकार का इस मुद्दे पर मदद पाने के लिए बेहतर तरीका है:

अधिक जानकारी ... पूरा enunciate.xml (मामले में प्रविष्टि को प्रभावित करने वाले एक समस्या है बग फोरम), कृपया मुझे बताएं। मैं उत्साही के साथ एक नौसिखिया हूं और मुझे नहीं पता था कि यह एक बग या मेरी अज्ञानता है।

+0

क्या यह शायद यह मुद्दा है? https://github.com/stoicflame/enunciate/issues/14 हालांकि, यह मेरे लिए काम करता है।इसके अलावा मैं आपके तत्व में _docsDir_ विशेषता सेट नहीं देख सकता - यदि आपके पास रूट में जेनरेट नहीं किया गया है, तो आपको यह बताना होगा कि आप उन्हें कहां रखने की योजना बना रहे हैं, इसलिए अनुनाद आपके एपीआई के सही सापेक्ष पथ उत्पन्न करता है। – Pavel

उत्तर

2

जैसा कि रयान ने कहा था "डिफ़ॉल्ट रीस्टसबोनटेक्स्ट" काम करता है। उदाहरण के लिए मैंने इसे इस तरह इस्तेमाल किया डिफॉल्ट जेनरेट माउंट पॉइंट से "आराम" हटाएं:

< सेवाओं >
< बाकी defaultRestSubcontext = "/"/>
</सेवाओं >

से "/" पीढ़ी शुरू होता है "/" ​​और फिर अंत बिंदु के पथ द्वारा पीछा करने के लिए एक सेट defaultRestSubcontext हैं।

पीएस मैं उच्चारित 1.24

1

उपयोग कर रहा हूँ ठीक है ... मैं कुछ दिनों के लिए यह आस-पास रहने की है और अंत में यह काम कर रहा है और माउंट बिंदु उचित डिफ़ॉल्ट बाकी subcontext :)

2 बातें मैं यह काम करने के लिए किया था है।

  1. एक्सएमएल मॉड्यूल

    <xml disabled="false" /> 
    
  2. उच्चारित-एक्सएमएल जार क्रम में जोड़े सक्षम करें।

मुझे नहीं पता कि यह क्यों है, लेकिन यह अब मेरे लिए काम कर रहा है।

संबंधित मुद्दे