membphis commented on a change in pull request #1258: Supplement 
admin-api-cn.md, add route/service/consumer/upstream/ssl definitions.
URL: https://github.com/apache/incubator-apisix/pull/1258#discussion_r392544801
 
 

 ##########
 File path: doc/admin-api-cn.md
 ##########
 @@ -71,7 +75,29 @@
 - 除了 `uri`/`uris` 是必选的之外,`plugins`、`upstream`/`upstream_id`、`service_id` 
这三类必须选择其中至少一个。
 - 对于同一类参数比如 `uri`与 `uris`,`upstream` 与 `upstream_id`,`host` 与 
`hosts`,`remote_addr` 与 `remote_addrs` 等,是不能同时存在,二者只能选择其一。如果同时启用,接口会报错。
 
-示例:
+route 对象 json 配置内容:
+
+```json
 
 Review comment:
   I think this style is better.
   
   ```shell
   {
       "id": "1",                  # id,非必填
       "uri": "/release/a",        # uri 路径
       "uris": ["/a","/b"],        # 一组 uri 路径, uri 与 uris 只需要有一个非空即可
       "methods": ["GET","POST"],  #可以填多个方法
       "host": "aa.com",           # host 域名
       "hosts": ["a.com","b.com"], #一组 host 域名, host 与 hosts 只需要有一个非空即可
       "plugins": {},              # 指定 route 绑定的插件
       "priority": 0,              # apisix 
支持多种匹配方式,可能会在一次匹配中同时匹配到多条路由,此时优先级高的优先匹配中
       "desc": "hello world",
       "remote_addr": "127.0.0.1",     # 客户端请求 IP 地址
       "remote_addrs": ["127.0.0.1"],  # 一组客户端请求 IP 地址, remote_addr 与 
remote_addrs 只需要有一个非空即可
       "vars": [],                 # 由一个或多个 {var, operator, val} 元素组成的列表
       "upstream_id": "1",         # upstream 对象在 etcd 中的 id ,建议使用此值
       "upstream": {},             # upstream 信息对象,建议尽量不要使用
       "filter_func": "",          # 用户自定义的过滤函数,非必填
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to