This is an automated email from the ASF dual-hosted git repository.

tianxiaoliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-kie.git


The following commit(s) were added to refs/heads/master by this push:
     new 4cd03b7  change doc (#141)
4cd03b7 is described below

commit 4cd03b7bc2529cced3d82c08e6924bf6f0f36f12
Author: Shawn <xiaoliang.t...@gmail.com>
AuthorDate: Sat May 30 10:49:12 2020 +0800

    change doc (#141)
---
 docs/api.yaml              | 116 ++++++++++++++++++++-------------------------
 docs/getstarted/install.md |  20 --------
 docs/getstarted/verify.md  |  61 ++++++++++++++++++------
 3 files changed, 99 insertions(+), 98 deletions(-)

diff --git a/docs/api.yaml b/docs/api.yaml
index 2c70d55..8c00d5f 100644
--- a/docs/api.yaml
+++ b/docs/api.yaml
@@ -1,10 +1,25 @@
-swagger: "2.0"
+swagger: '2.0'
 info:
-  title: ""
-  version: ""
+  title: ''
+  version: ''
 basePath: /
 paths:
-  /v1/{project}/kie/kv:
+  /v1/health:
+    get:
+      summary: health check return version and revision
+      operationId: HealthCheck
+      consumes:
+        - application/json
+        - text/yaml
+      produces:
+        - application/json
+        - text/yaml
+      responses:
+        '200':
+          description: ''
+          schema:
+            $ref: '#/definitions/DocHealthCheck'
+  '/v1/{project}/kie/kv':
     get:
       summary: list key values by labels and key
       operationId: List
@@ -18,26 +33,19 @@ paths:
           type: string
         - name: label
           in: query
-          description: label pairs,for example 
&label=service:order&label=version:1.0.0
+          description: 'label pairs,for example 
&label=service:order&label=version:1.0.0'
           type: string
         - name: wait
           in: query
-          description: wait until any kv changed. for example wait=5s, server 
will not
-            response until 5 seconds, during that time window, if any kv 
changed, server
-            will return 200 and kv list, otherwise return 304 and empty body
+          description: 'wait until any kv changed. for example wait=5s, server 
will not response until 5 seconds, during that time window, if any kv changed, 
server will return 200 and kv list, otherwise return 304 and empty body'
           type: string
         - name: match
           in: query
-          description: match works with label query param, it specifies label 
match
-            pattern. if it is empty, server will return kv which's labels 
partial match
-            the label query param. uf it is exact, server will return kv 
which's labels
-            exact match the label query param
+          description: 'match works with label query param, it specifies label 
match pattern. if it is empty, server will return kv which''s labels partial 
match the label query param. uf it is exact, server will return kv which''s 
labels exact match the label query param'
           type: string
         - name: revision
           in: query
-          description: each time you query,server will return a number in 
header X-Kie-Revision.
-            you can record it in client side, use this number as param value. 
if current
-            revision is greater than it, server will return data
+          description: 'each time you query,server will return a number in 
header X-Kie-Revision. you can record it in client side, use this number as 
param value. if current revision is greater than it, server will return data'
           type: string
         - name: limit
           in: query
@@ -53,16 +61,15 @@ paths:
         - application/json
         - text/yaml
       responses:
-        "200":
-          description: ""
+        '200':
+          description: ''
           schema:
             $ref: '#/definitions/DocResponseGetKey'
           headers:
             X-Kie-Revision:
-              description: cluster latest revision number, if key value is 
changed,
-                it will increase.
+              description: 'cluster latest revision number, if key value is 
changed, it will increase.'
               type: integer
-        "304":
+        '304':
           description: empty body
     post:
       summary: create a key value
@@ -74,8 +81,7 @@ paths:
           type: string
         - name: Content-Type
           in: header
-          description: used to indicate the media type of the resource, the 
value can
-            be application/json or text/yaml
+          description: 'used to indicate the media type of the resource, the 
value can be application/json or text/yaml'
           required: true
           type: string
         - name: body
@@ -90,8 +96,8 @@ paths:
         - application/json
         - text/yaml
       responses:
-        "200":
-          description: ""
+        '200':
+          description: ''
           schema:
             $ref: '#/definitions/DocResponseSingleKey'
     delete:
@@ -104,8 +110,7 @@ paths:
           type: string
         - name: Content-Type
           in: header
-          description: used to indicate the media type of the resource, the 
value only
-            can be application/json
+          description: 'used to indicate the media type of the resource, the 
value only can be application/json'
           required: true
           type: string
         - name: body
@@ -118,11 +123,11 @@ paths:
       produces:
         - application/json
       responses:
-        "204":
+        '204':
           description: delete success
-        "500":
+        '500':
           description: server error
-  /v1/{project}/kie/kv/{kv_id}:
+  '/v1/{project}/kie/kv/{kv_id}':
     get:
       summary: get key values by kv_id
       operationId: Get
@@ -141,16 +146,15 @@ paths:
         - application/json
         - text/yaml
       responses:
-        "200":
+        '200':
           description: get key value success
           schema:
             $ref: '#/definitions/DocResponseSingleKey'
           headers:
             X-Kie-Revision:
-              description: cluster latest revision number, if key value is 
changed,
-                it will increase.
+              description: 'cluster latest revision number, if key value is 
changed, it will increase.'
               type: integer
-        "404":
+        '404':
           description: key value not found
     put:
       summary: update a key value
@@ -166,8 +170,7 @@ paths:
           type: string
         - name: Content-Type
           in: header
-          description: used to indicate the media type of the resource, the 
value can
-            be application/json or text/yaml
+          description: 'used to indicate the media type of the resource, the 
value can be application/json or text/yaml'
           required: true
           type: string
         - name: body
@@ -182,8 +185,8 @@ paths:
         - application/json
         - text/yaml
       responses:
-        "200":
-          description: ""
+        '200':
+          description: ''
           schema:
             $ref: '#/definitions/DocResponseSingleKey'
     delete:
@@ -203,13 +206,13 @@ paths:
       produces:
         - '*/*'
       responses:
-        "204":
+        '204':
           description: delete success
-        "404":
+        '404':
           description: no key value found for deletion
-        "500":
+        '500':
           description: server error
-  /v1/{project}/kie/revision/{kv_id}:
+  '/v1/{project}/kie/revision/{kv_id}':
     get:
       summary: get all revisions by key id
       operationId: GetRevisions
@@ -229,11 +232,11 @@ paths:
         - application/json
         - text/yaml
       responses:
-        "200":
-          description: ""
+        '200':
+          description: ''
           schema:
             $ref: '#/definitions/DocResponseGetKey'
-  /v1/{project}/kie/track:
+  '/v1/{project}/kie/track':
     get:
       summary: get polling tracks of clients of kie server
       operationId: GetPollingData
@@ -265,27 +268,12 @@ paths:
         - application/json
         - text/yaml
       responses:
-        "200":
-          description: "true"
+        '200':
+          description: 'true'
           schema:
             type: array
             items:
               $ref: '#/definitions/PollingDataResponse'
-  /v1/health:
-    get:
-      summary: health check return version and revision
-      operationId: HealthCheck
-      consumes:
-        - application/json
-        - text/yaml
-      produces:
-        - application/json
-        - text/yaml
-      responses:
-        "200":
-          description: ""
-          schema:
-            $ref: '#/definitions/DocHealthCheck'
 definitions:
   DocHealthCheck:
     type: object
@@ -319,7 +307,7 @@ definitions:
         type: string
       key:
         type: string
-      label_id:
+      label_format:
         type: string
       labels:
         type: object
@@ -356,9 +344,9 @@ definitions:
       params:
         type: object
         additionalProperties:
-          type: string
+          type: 'string'
       response_body:
-        type: string
+        type: 'string'
       response_code:
         type: integer
         format: int32
diff --git a/docs/getstarted/install.md b/docs/getstarted/install.md
index 82bcfac..7f57339 100644
--- a/docs/getstarted/install.md
+++ b/docs/getstarted/install.md
@@ -40,23 +40,3 @@ it will launch 3 components
 - mongodb UI:http://127.0.0.1:8081
 - servicecomb-kie: http://127.0.0.1:30110
 
-
-### Run locally without Docker
-
-Download and run mongodb, 
-see [MongoDB Community Edition Installation 
Tutorials](https://docs.mongodb.com/manual/installation/#mongodb-community-edition-installation-tutorials)
-
-
-use the [db init 
script](https://github.com/apache/servicecomb-kie/blob/master/deployments/db.js)
-```shell script bash
-mongo 127.0.0.1/kie db.js
-```
-
-Download the binary of kie, see 
https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-kie/0.1.0/
-Unzip  and Run it.
-For Example:
-```shell script bash
-tar -xzvf apache-servicecomb-kie--${platform}-amd64.tar.gz
-cd apache-servicecomb-kie--${platform}-amd64
-./kie --config conf/kie-conf.yaml
-```
\ No newline at end of file
diff --git a/docs/getstarted/verify.md b/docs/getstarted/verify.md
index 1801cf6..7320830 100644
--- a/docs/getstarted/verify.md
+++ b/docs/getstarted/verify.md
@@ -1,31 +1,64 @@
 # After running
 Put a key 
 ```shell script
-curl -X PUT \
-  http://127.0.0.1:30110/v1/default/kie/kv/ingressRule \
+curl -X POST \
+  http://127.0.0.1:30110/v1/default/kie/kv/ \
   -H 'Content-Type: application/json' \
   -d '{
-       "value":"some rule",
-       "type": "yaml",
-       "labels":{"app":"default"}
+    "key": "timeout",
+    "value": "2s",
+    "labels": {
+        "service": "order"
+    }
 }'
 ```
 
 response is 
 ```json
 {
- "id": "05529229-efc3-49ca-a765-05759b23ab28",
- "key": "ingressRule",
- "value": "some rule",
- "value_type": "text",
- "create_revision": 13,
- "update_revision": 13,
- "labels": {
-  "app": "default"
- }
+    "id": "b01ad993-2bad-4468-8a3c-5aa7ad54afea",
+    "key": "timeout",
+    "value": "2s",
+    "value_type": "text",
+    "create_revision": 2,
+    "update_revision": 2,
+    "status": "disabled",
+    "create_time": 1590802244,
+    "update_time": 1590802244,
+    "labels": {
+        "service": "order"
+    }
 }
 ```
 
+then get config list
+```shell script
+curl -X GET http://127.0.0.1:30110/v1/default/kie/kv 
+```
+response is 
+```json
+{
+ "total": 1,
+ "data": [
+  {
+   "id": "b01ad993-2bad-4468-8a3c-5aa7ad54afea",
+   "key": "timeout",
+   "value": "2s",
+   "value_type": "text",
+   "create_revision": 2,
+   "update_revision": 2,
+   "status": "disabled",
+   "create_time": 1590802244,
+   "update_time": 1590802244,
+   "labels": {
+    "service": "order"
+   }
+  }
+ ]
+}
+```
+
+
 Check open API doc
 - the api doc mounted to http://127.0.0.1:30110/apidocs.json 
 - or see https://github.com/apache/servicecomb-kie/blob/master/docs/api.yaml

Reply via email to