You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@griffin.apache.org by gu...@apache.org on 2017/03/03 08:41:10 UTC

[36/50] [abbrv] incubator-griffin git commit: front end

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/9b67bab1/ui/apidocs/pet_example.json
----------------------------------------------------------------------
diff --git a/ui/apidocs/pet_example.json b/ui/apidocs/pet_example.json
new file mode 100644
index 0000000..e171fa1
--- /dev/null
+++ b/ui/apidocs/pet_example.json
@@ -0,0 +1,426 @@
+{
+  "apiVersion": "1.0.0",
+  "swaggerVersion": "1.2",
+  "basePath": "http://petstore.swagger.io/api",
+  "resourcePath": "/pet",
+  "produces": [
+    "application/json",
+    "application/xml",
+    "text/plain",
+    "text/html"
+  ],
+  "apis": [
+    {
+      "path": "/pet/{petId}",
+      "operations": [
+        {
+          "method": "GET",
+          "summary": "Find pet by ID",
+          "notes": "Returns a pet based on ID",
+          "type": "Pet",
+          "nickname": "getPetById",
+          "authorizations": {},
+          "parameters": [
+            {
+              "name": "petId",
+              "description": "ID of pet that needs to be fetched",
+              "required": true,
+              "type": "integer",
+              "format": "int64",
+              "paramType": "path",
+              "minimum": "1.0",
+              "maximum": "100000.0"
+            }
+          ],
+          "responseMessages": [
+            {
+              "code": 400,
+              "message": "Invalid ID supplied"
+            },
+            {
+              "code": 404,
+              "message": "Pet not found"
+            }
+          ]
+        },
+        {
+          "method": "PATCH",
+          "summary": "partial updates to a pet",
+          "notes": "",
+          "type": "array",
+          "items": {
+            "$ref": "Pet"
+          },
+          "nickname": "partialUpdate",
+          "produces": [
+            "application/json",
+            "application/xml"
+          ],
+          "consumes": [
+            "application/json",
+            "application/xml"
+          ],
+          "authorizations": {
+            "oauth2": [
+              {
+                "scope": "test:anything",
+                "description": "anything"
+              }
+            ]
+          },
+          "parameters": [
+            {
+              "name": "petId",
+              "description": "ID of pet that needs to be fetched",
+              "required": true,
+              "type": "string",
+              "paramType": "path"
+            },
+            {
+              "name": "body",
+              "description": "Pet object that needs to be added to the store",
+              "required": true,
+              "type": "Pet",
+              "paramType": "body"
+            }
+          ],
+          "responseMessages": [
+            {
+              "code": 400,
+              "message": "Invalid tag value"
+            }
+          ]
+        },
+        {
+          "method": "POST",
+          "summary": "Updates a pet in the store with form data",
+          "notes": "",
+          "type": "void",
+          "nickname": "updatePetWithForm",
+          "consumes": [
+            "application/x-www-form-urlencoded"
+          ],
+          "authorizations": {
+            "oauth2": [
+              {
+                "scope": "test:anything",
+                "description": "anything"
+              }
+            ]
+          },
+          "parameters": [
+            {
+              "name": "petId",
+              "description": "ID of pet that needs to be updated",
+              "required": true,
+              "type": "string",
+              "paramType": "path"
+            },
+            {
+              "name": "name",
+              "description": "Updated name of the pet",
+              "required": false,
+              "type": "string",
+              "paramType": "form"
+            },
+            {
+              "name": "status",
+              "description": "Updated status of the pet",
+              "required": false,
+              "type": "string",
+              "paramType": "form"
+            }
+          ],
+          "responseMessages": [
+            {
+              "code": 405,
+              "message": "Invalid input"
+            }
+          ]
+        },
+        {
+          "method": "DELETE",
+          "summary": "Deletes a pet",
+          "notes": "",
+          "type": "void",
+          "nickname": "deletePet",
+          "authorizations": {
+            "oauth2": [
+              {
+                "scope": "test:anything",
+                "description": "anything"
+              }
+            ]
+          },
+          "parameters": [
+            {
+              "name": "petId",
+              "description": "Pet id to delete",
+              "required": true,
+              "type": "string",
+              "paramType": "path"
+            }
+          ],
+          "responseMessages": [
+            {
+              "code": 400,
+              "message": "Invalid pet value"
+            }
+          ]
+        }
+        
+      ]
+    },
+    {
+      "path": "/pet",
+      "operations": [
+        {
+          "method": "PUT",
+          "summary": "Update an existing pet",
+          "notes": "",
+          "type": "void",
+          "nickname": "updatePet",
+          "authorizations": {},
+          "parameters": [
+            {
+              "name": "body",
+              "description": "Pet object that needs to be updated in the store",
+              "required": true,
+              "type": "Pet",
+              "paramType": "body"
+            }
+          ],
+          "responseMessages": [
+            {
+              "code": 400,
+              "message": "Invalid ID supplied"
+            },
+            {
+              "code": 404,
+              "message": "Pet not found"
+            },
+            {
+              "code": 405,
+              "message": "Validation exception"
+            }
+          ]
+        },
+        {
+          "method": "POST",
+          "summary": "Add a new pet to the store",
+          "notes": "",
+          "type": "void",
+          "nickname": "addPet",
+          "consumes": [
+            "application/json",
+            "application/xml"
+          ],
+          "authorizations": {
+            "oauth2": [
+              {
+                "scope": "test:anything",
+                "description": "anything"
+              }
+            ]
+          },
+          "parameters": [
+            {
+              "name": "body",
+              "description": "Pet object that needs to be added to the store",
+              "required": true,
+              "type": "Pet",
+              "paramType": "body"
+            }
+          ],
+          "responseMessages": [
+            {
+              "code": 405,
+              "message": "Invalid input"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "path": "/pet/findByStatus",
+      "operations": [
+        {
+          "method": "GET",
+          "summary": "Finds Pets by status",
+          "notes": "Multiple status values can be provided with comma seperated strings",
+          "type": "array",
+          "items": {
+            "$ref": "Pet"
+          },
+          "nickname": "findPetsByStatus",
+          "authorizations": {},
+          "parameters": [
+            {
+              "name": "status",
+              "description": "Status values that need to be considered for filter",
+              "defaultValue": "available",
+              "required": true,
+              "type": "string",
+              "paramType": "query",
+              "enum": [
+                "available",
+                "pending",
+                "sold"
+              ]
+            }
+          ],
+          "responseMessages": [
+            {
+              "code": 400,
+              "message": "Invalid status value"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "path": "/pet/findByTags",
+      "operations": [
+        {
+          "method": "GET",
+          "summary": "Finds Pets by tags",
+          "notes": "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
+          "type": "array",
+          "items": {
+            "$ref": "Pet"
+          },
+          "nickname": "findPetsByTags",
+          "authorizations": {},
+          "parameters": [
+            {
+              "name": "tags",
+              "description": "Tags to filter by",
+              "required": true,
+              "type": "string",
+              "paramType": "query"
+            }
+          ],
+          "responseMessages": [
+            {
+              "code": 400,
+              "message": "Invalid tag value"
+            }
+          ],
+          "deprecated": "true"
+        }
+      ]
+    },
+    {
+      "path": "/pet/uploadImage",
+      "operations": [
+        {
+          "method": "POST",
+          "summary": "uploads an image",
+          "notes": "",
+          "type": "void",
+          "nickname": "uploadFile",
+          "consumes": [
+            "multipart/form-data"
+          ],
+          "authorizations": {
+            "oauth2": [
+              {
+                "scope": "test:anything",
+                "description": "anything"
+              },
+              {
+                "scope": "test:nothing",
+                "description": "nothing"
+              }
+            ]
+          },
+          "parameters": [
+            {
+              "name": "additionalMetadata",
+              "description": "Additional data to pass to server",
+              "required": false,
+              "type": "string",
+              "paramType": "form"
+            },
+            {
+              "name": "file",
+              "description": "file to upload",
+              "required": false,
+              "type": "File",
+              "paramType": "body"
+            }
+          ]
+        }
+      ]
+    }
+  ],
+  "models": {
+    "Tag": {
+      "id": "Tag",
+      "properties": {
+        "id": {
+          "type": "integer",
+          "format": "int64"
+        },
+        "name": {
+          "type": "string"
+        }
+      }
+    },
+    "Pet": {
+      "id": "Pet",
+      "required": [
+        "id",
+        "name"
+      ],
+      "properties": {
+        "id": {
+          "type": "integer",
+          "format": "int64",
+          "description": "unique identifier for the pet",
+          "minimum": "0.0",
+          "maximum": "100.0"
+        },
+        "category": {
+          "$ref": "Category"
+        },
+        "name": {
+          "type": "string"
+        },
+        "photoUrls": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          }
+        },
+        "tags": {
+          "type": "array",
+          "items": {
+            "$ref": "Tag"
+          }
+        },
+        "status": {
+          "type": "string",
+          "description": "pet status in the store",
+          "enum": [
+            "available",
+            "pending",
+            "sold"
+          ]
+        }
+      }
+    },
+    "Category": {
+      "id": "Category",
+      "properties": {
+        "id": {
+          "type": "integer",
+          "format": "int64"
+        },
+        "name": {
+          "type": "string"
+        }
+      }
+    }
+  }
+}      
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/9b67bab1/ui/apidocs/sample.json
----------------------------------------------------------------------
diff --git a/ui/apidocs/sample.json b/ui/apidocs/sample.json
new file mode 100644
index 0000000..1998c77
--- /dev/null
+++ b/ui/apidocs/sample.json
@@ -0,0 +1,83 @@
+// accuracy
+{
+	"basic":{
+		"type":"0",
+		"system":"1",
+		"threshold":90,
+		"scheduleType":"1",
+		"owner":"xwang21",
+		"name":"wx_accu1",
+		"desc":"aa",
+		"email":"wx@f",
+		"dataaset":"dw_bid",
+		"dataasetId":108
+	},
+	"extra":{
+		"srcDb":"Teradata",
+		"srcDataSet":"gdw_tables",
+		"targetDb":"Teradata",
+		"targetDataSet":"gdw_tables"
+	},
+	"mappings":[
+		{
+			"target":"dw_bid.uid",
+			"src":"dw_bid.uid",
+			"matchMethod":"EXACT",
+			"isPk":true,
+			"$$hashKey":"object:988"
+		}
+	]
+}
+// validity
+{
+	"basic":{
+		"type": "1",
+		"system": "3",
+		"scheduleType": "3",
+		"owner": "xwang21",
+		"name": "wx_valid",
+		"desc": "wwwwww",
+		"threshold": 60,
+		"email": "w@w",
+		"dataaset": "ubi_event",
+		"dataasetId": 22
+	},
+	"extra":{
+		"srcDb": "Apollo",
+		"srcDataSet": "Sojourner"
+	},
+	"vaType": "5",
+	"column": "guid"
+}
+//new accuracy
+{
+	"basic":{
+		"type":"0",
+		"system":"1",
+		"threshold":90,
+		"scheduleType":"1",
+		"owner":"xwang21",
+		"name":"wx_accuracy",
+		"desc":"11111",
+		"email":"w@w",
+		"dataaset":"dw_bid",
+		"dataasetId":108
+	},
+	"extra":{
+		"srcDb":"Teradata",
+		"srcDataSet":"gdw_tables",
+		"targetDb":"Teradata",
+		"targetDataSet":"gdw_tables"
+	},
+	"mappings":[
+		{
+			"target":"dw_bid.js_ev_mak",
+			"src":"dw_trans.site_id",
+			"matchMethod":"EXACT",
+			"isPk":true,
+			"$$hashKey":"object:1044"
+		}
+	]
+}
+{"basic":{"type":"0","system":"1","threshold":90,"scheduleType":"1","owner":"xwang21","name":"wx_accuracy","desc":"11111","email":"w@w","dataaset":"dw_bid","dataasetId":108},"extra":{"srcDb":"Teradata","srcDataSet":"gdw_tables","targetDb":"Teradata","targetDataSet":"gdw_tables"},"mappings":[{"target":"dw_bid.js_ev_mak","src":"dw_trans.site_id","matchMethod":"EXACT","isPk":true,"$$hashKey":"object:1044"}]}
+