Issue-id: OCS-9
[msb/apigateway.git] / msb-core / apiroute / apiroute-standalone / src / assembly / resource / apiroute / ext / initServices / readme.txt
1 ====
2     Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8         http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15
16         Author: Zhaoxing Meng
17         email: meng.zhaoxing1@zte.com.cn
18 ====
19
20 ########################## initialize default routeInfo to redis ##########################
21
22 #when msb is starting, it will automatically read all json files under this folder, and initializes to redis. 
23 #If the routeInfo is exist, it will be ignored, otherwise it will be saved.
24
25
26 # JSON File content must be routeInfo format array like below examples:
27
28 #  optional:
29 #  apiJsonType: 1:user-defined json type    0:pre-defined json type
30 #  control:   0:default   1:readonly  2:hidden
31 #  status:    0:disabled   1:enabled  
32 #  Tip��control��status��weight are  non-mandatory 
33
34 [
35 ##########################apiRoute example##########################
36
37 {
38                 "serviceName" : "microservices",
39                 "version" : "v1",
40                 "url" : "/api/microservices/v1",
41                 "apiJson" : "/api/microservices/v1/swagger.json",
42                 "apiJsonType" : "1",
43                 "metricsUrl" : "/admin/metrics",
44                 "control" : "1",
45                 "status" : "1",
46                 "servers" : [{
47                                 "ip" : "127.0.0.1",
48                                 "port" : "8086",
49                                 "weight" : 0
50                         }
51                 ]
52         },
53         
54 ##########################iuiRoute example##########################
55         
56 {
57                 "serviceName" : "microservices",
58                 "url" : "/iui/microservices",
59                 "control" : "1",
60                 "status" : "1",
61                 "servers" : [{
62                                 "ip" : "127.0.0.1",
63                                 "port" : "8086",
64                                 "weight" : 0
65                         }
66                 ]
67         },
68         
69 ##########################customRoute example########################## 
70         {
71                 "serviceName" : "/test",
72                 "url" : "/test",
73                 "control" : "0",
74                 "status" : "1",
75                 "servers" : [{
76                                 "ip" : "10.74.56.36",
77                                 "port" : "8989",
78                                 "weight" : 0
79                         }
80                 ]
81         }
82 ]