forked from membrane/api-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproxies.xml
More file actions
55 lines (48 loc) · 1.61 KB
/
proxies.xml
File metadata and controls
55 lines (48 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<spring:beans xmlns="http://membrane-soa.org/proxies/1/"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://membrane-soa.org/proxies/1/ http://membrane-soa.org/schemas/proxies-1.xsd">
<router>
<!-- Configures Membrane as an API Gateway for the given OpenAPI specification -->
<api port="2000">
<openapi location="contacts-xxl-api-v1.yml" validateRequests="yes" validateResponses="no" validationDetails="yes"/>
</api>
<!-- These proxies provides mock backend implementations for the API in this demo. Instead
of mocks use the backends for your API.
-->
<api port="3000">
<path isRegExp="true">/demo-api/v2/persons/.*</path>
<response>
<template pretty="true" contentType="application/json">
{
"id": "12358",
"name": "Bo",
"email": "foo@baz.org"
}
</template>
</response>
<return statusCode="201"/>
</api>
<api port="3000" method="GET">
<path>/demo-api/v2/persons</path>
<response>
<template pretty="true" contentType="application/json">
{ "persons": [
{
"id": "12358",
"name": "Bo",
"email": "foo@baz.org"
}
] }
</template>
</response>
<return statusCode="200"/>
</api>
<!-- Monitoring endpoint for prometheus -->
<api name="Prometheus Monitoring" port="8888">
<path>/metrics</path>
<prometheus/>
</api>
</router>
</spring:beans>