-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "cannot move api folder" error (#649)
- Loading branch information
Showing
13 changed files
with
1,266 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...n-tool-e2e-tests/src/test/resources/e2e/apikit/apikit_soapkit/input/src/main/api/api.raml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#%RAML 1.0 | ||
title: Sample API | ||
version: 1.0 | ||
mediaType: application/json | ||
|
||
/resource: | ||
post: | ||
body: | ||
responses: | ||
200: | ||
body: | ||
/{id}: | ||
get: | ||
responses: | ||
201: | ||
body: |
56 changes: 56 additions & 0 deletions
56
...ts/src/test/resources/e2e/apikit/apikit_soapkit/input/src/main/app/apikit-mule-config.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<mule xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:apikit="http://www.mulesoft.org/schema/mule/apikit" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd | ||
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd | ||
http://www.mulesoft.org/schema/mule/apikit http://www.mulesoft.org/schema/mule/apikit/current/mule-apikit.xsd | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> | ||
<http:listener-config name="httpListenerConfig" host="0.0.0.0" port="${httpPort}"/> | ||
<apikit:config name="api-config" raml="api.raml" consoleEnabled="false"/> | ||
<flow name="global-kafka-sys-api-main"> | ||
<http:listener config-ref="httpListenerConfig" path="/api/*"/> | ||
<response> | ||
<set-property propertyName="test" value="test"/> | ||
</response> | ||
<apikit:router config-ref="api-config"/> | ||
<exception-strategy ref="apiKitGlobalExceptionMapping"/> | ||
</flow> | ||
<flow name="post:/resource:application/json:api-config"> | ||
<set-property propertyName="Content-Type" value="application/json"/> | ||
<set-payload value="{
 "response" :{
 "status": "success",
 "http-status" : 201,
 "message_ID": "a7a756040 10/07/2017-14:40:01.6Z",
 "summary": "The new customer record was written successfully",
 "timestamp" : "2000-01-01T00:00:00.0Z"
 }
}"/> | ||
</flow> | ||
<flow name="get:/resource/{id}:application/json:api-config"> | ||
<set-property propertyName="Content-Type" value="application/json"/> | ||
<set-payload value="{
 "response" :{
 "status": "success",
 "http-status" : 201,
 "message_ID": "a7a756040 10/07/2017-14:40:01.6Z",
 "summary": "The new customer record was written successfully",
 "timestamp" : "2000-01-01T00:00:00.0Z"
 }
}"/> | ||
</flow> | ||
<apikit:mapping-exception-strategy name="apiKitGlobalExceptionMapping"> | ||
<apikit:mapping statusCode="404"> | ||
<apikit:exception value="org.mule.module.apikit.exception.NotFoundException" /> | ||
<set-property propertyName="Content-Type" value="application/json"/> | ||
<set-payload value="{ "message": "Resource not found" }"/> | ||
</apikit:mapping> | ||
<apikit:mapping statusCode="405"> | ||
<apikit:exception value="org.mule.module.apikit.exception.MethodNotAllowedException" /> | ||
<set-property propertyName="Content-Type" value="application/json"/> | ||
<set-payload value="{ "message": "Method not allowed" }"/> | ||
</apikit:mapping> | ||
<apikit:mapping statusCode="415"> | ||
<apikit:exception value="org.mule.module.apikit.exception.UnsupportedMediaTypeException" /> | ||
<set-property propertyName="Content-Type" value="application/json"/> | ||
<set-payload value="{ "message": "Unsupported media type" }"/> | ||
</apikit:mapping> | ||
<apikit:mapping statusCode="406"> | ||
<apikit:exception value="org.mule.module.apikit.exception.NotAcceptableException" /> | ||
<set-property propertyName="Content-Type" value="application/json"/> | ||
<set-payload value="{ "message": "Not acceptable" }"/> | ||
</apikit:mapping> | ||
<apikit:mapping statusCode="400"> | ||
<apikit:exception value="org.mule.module.apikit.exception.BadRequestException" /> | ||
<set-property propertyName="Content-Type" value="application/json"/> | ||
<set-payload value="{ "message": "Bad request" }"/> | ||
</apikit:mapping> | ||
<apikit:mapping statusCode="500"> | ||
<apikit:exception value="java.lang.ClassNotFoundException" /> | ||
<set-property propertyName="Content-Type" value="application/json"/> | ||
<set-payload value="{ "message": "Bad request" }"/> | ||
</apikit:mapping> | ||
</apikit:mapping-exception-strategy> | ||
</mule> |
38 changes: 38 additions & 0 deletions
38
...s/src/test/resources/e2e/apikit/apikit_soapkit/input/src/main/app/soapkit-mule-config.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<mule xmlns="http://www.mulesoft.org/schema/mule/core" | ||
xmlns:apikit-soap="http://www.mulesoft.org/schema/mule/apikit-soap" | ||
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" | ||
xmlns:http="http://www.mulesoft.org/schema/mule/http" | ||
xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd | ||
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd | ||
http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd | ||
http://www.mulesoft.org/schema/mule/apikit-soap http://www.mulesoft.org/schema/mule/apikit-soap/current/mule-apikit-soap.xsd "> | ||
<http:listener-config name="api-httpListenerConfig" host="0.0.0.0" port="${httpPort}" /> | ||
<apikit-soap:config name="/TshirtService/TshirtServicePort/api-config" wsdlUrl="tshirt.wsdl" serviceName="TshirtService" portName="TshirtServicePort" /> | ||
<flow name="api-main"> | ||
<http:listener path="/TshirtService/TshirtServicePort" config-ref="api-httpListenerConfig" doc:name="/TshirtService/TshirtServicePort" /> | ||
<apikit-soap:router config-ref="/TshirtService/TshirtServicePort/api-config" /> | ||
</flow> | ||
<flow name="OrderTshirt:/TshirtService/TshirtServicePort/api-config"> | ||
<set-attachment attachmentName="fileID" value="some content." contentType="text/plain"/> | ||
<set-payload value="<soap:Fault xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><faultcode>soap:Server</faultcode><faultstring>Operation [OrderTshirt:/TshirtService/TshirtServicePort/api-config] not implemented</faultstring></soap:Fault>" /> | ||
<dw:transform-message> | ||
<dw:set-property propertyName="soap.header"><![CDATA[%dw 1.0 | ||
%output application/xml | ||
%namespace ns0 http://mulesoft.org/tshirt-service | ||
--- | ||
{ | ||
ns0#APIUsageInformation: { | ||
apiCallsRemaining: 10 | ||
} | ||
}]]> </dw:set-property> | ||
</dw:transform-message> | ||
</flow> | ||
<flow name="ListInventory:/TshirtService/TshirtServicePort/api-config"> | ||
<set-payload value="<soap:Fault xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><faultcode>soap:Server</faultcode><faultstring>Operation [ListInventory:/TshirtService/TshirtServicePort/api-config] not implemented</faultstring></soap:Fault>" /> | ||
</flow> | ||
<flow name="TrackOrder:/TshirtService/TshirtServicePort/api-config"> | ||
<set-payload value="<soap:Fault xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><faultcode>soap:Server</faultcode><faultstring>Operation [TrackOrder:/TshirtService/TshirtServicePort/api-config] not implemented</faultstring></soap:Fault>" /> | ||
</flow> | ||
</mule> |
Oops, something went wrong.