https://bugs.webkit.org/show_bug.cgi?id=177888
authorlforschler@apple.com <lforschler@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Oct 2017 20:27:03 +0000 (20:27 +0000)
committerlforschler@apple.com <lforschler@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Oct 2017 20:27:03 +0000 (20:27 +0000)
WebKitArchiveSupport - add API Gateway to source control
This is a swagger configuration export via AWS API Gateway console.

Rubber-stamped by Alexey Proskuryakov.

* WebKitArchiveSupport/AWS-APIGateway: Added.
* WebKitArchiveSupport/AWS-APIGateway/stage-v2.json: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222875 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/WebKitArchiveSupport/AWS-APIGateway/stage-v2.json [new file with mode: 0644]

index bbd4d29..04114e7 100644 (file)
@@ -1,3 +1,14 @@
+2017-10-04  Lucas Forschler  <lforschler@apple.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=177888
+        WebKitArchiveSupport - add API Gateway to source control
+        This is a swagger configuration export via AWS API Gateway console.
+
+        Rubber-stamped by Alexey Proskuryakov.
+
+        * WebKitArchiveSupport/AWS-APIGateway: Added.
+        * WebKitArchiveSupport/AWS-APIGateway/stage-v2.json: Added.
+
 2017-10-04  Mark Lam  <mark.lam@apple.com>
 
         Add support for using Probe DFG OSR Exit behind a runtime flag.
diff --git a/Tools/WebKitArchiveSupport/AWS-APIGateway/stage-v2.json b/Tools/WebKitArchiveSupport/AWS-APIGateway/stage-v2.json
new file mode 100644 (file)
index 0000000..d3edbc5
--- /dev/null
@@ -0,0 +1,282 @@
+{
+  "swagger": "2.0",
+  "info": {
+    "version": "2017-09-27T17:03:47Z",
+    "title": "archives.webkit.org"
+  },
+  "host": "q1tzqfy48e.execute-api.us-west-2.amazonaws.com",
+  "basePath": "/v2",
+  "schemes": [
+    "https"
+  ],
+  "paths": {
+    "/archives/{identifier}": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "name": "identifier",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "200 response",
+            "schema": {
+              "$ref": "#/definitions/Empty"
+            }
+          }
+        },
+        "x-amazon-apigateway-integration": {
+          "credentials": "arn:aws:iam::982456631623:role/lambda-s3-execution-role",
+          "responses": {
+            "default": {
+              "statusCode": "200",
+              "responseTemplates": {
+                "application/json": "{\n\"path\" : \"archives\",\n\"identifier\" : \"$input.params('identifier')\",\n\"revisions\" : $input.json('$')\n}"
+              }
+            }
+          },
+          "requestTemplates": {
+            "application/json": "{\n    \"TableName\": \"archives.webkit.org\",\n    \"KeyConditionExpression\": \"identifier = :v1\",\n    \"ExpressionAttributeValues\": {\n        \":v1\": {\n            \"S\": \"$input.params('identifier')\"\n        }\n    },\n    \"ProjectionExpression\": \"revision\"\n}"
+          },
+          "uri": "arn:aws:apigateway:us-west-2:dynamodb:action/Query",
+          "passthroughBehavior": "when_no_templates",
+          "httpMethod": "POST",
+          "type": "aws"
+        }
+      }
+    },
+    "/archives/{identifier}/{revision}": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "name": "identifier",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          },
+          {
+            "name": "revision",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "200 response",
+            "schema": {
+              "$ref": "#/definitions/Empty"
+            }
+          }
+        },
+        "x-amazon-apigateway-integration": {
+          "credentials": "arn:aws:iam::982456631623:role/lambda-s3-execution-role",
+          "responses": {
+            "default": {
+              "statusCode": "200",
+              "responseTemplates": {
+                "application/json": "#set($inputRoot = $input.path('$'))\n{\n    \"archive\": [\n        #foreach($elem in $inputRoot.Items) {\n            \"identifier\": \"$elem.identifier.S\",\n            \"revision\": \"$elem.revision.N\",\n            \"s3_url\": \"$elem.s3_url.S\"\n        }#if($foreach.hasNext),#end\n\t#end\n    ]\n}"
+              }
+            }
+          },
+          "requestTemplates": {
+            "application/json": "{\n    \"TableName\": \"archives.webkit.org\",\n    \"KeyConditionExpression\": \"identifier = :v1 and revision = :v2\",\n    \"ExpressionAttributeValues\": {\n        \":v1\": { \"S\": \"$input.params('identifier')\"},\n        \":v2\": { \"N\": \"$input.params('revision')\"}\n    }\n}"
+          },
+          "uri": "arn:aws:apigateway:us-west-2:dynamodb:action/Query",
+          "passthroughBehavior": "when_no_templates",
+          "httpMethod": "POST",
+          "type": "aws"
+        }
+      }
+    },
+    "/latest/{identifier}": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "name": "identifier",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "200 response",
+            "schema": {
+              "$ref": "#/definitions/Empty"
+            }
+          }
+        },
+        "x-amazon-apigateway-integration": {
+          "credentials": "arn:aws:iam::982456631623:role/lambda-s3-execution-role",
+          "responses": {
+            "default": {
+              "statusCode": "200"
+            }
+          },
+          "requestTemplates": {
+            "application/json": "{\n    \"TableName\": \"minified-archives.webkit.org\",\n    \"KeyConditionExpression\": \"identifier = :v1\",\n    \"ExpressionAttributeValues\": {\n        \":v1\": {\n            \"S\": \"$input.params('identifier')\"\n        }\n    },\n    \"ProjectionExpression\": \"revision, s3_url, creationTime\",\n    \"Limit\": 30,\n    \"ScanIndexForward\": \"False\"\n}"
+          },
+          "uri": "arn:aws:apigateway:us-west-2:dynamodb:action/Query",
+          "passthroughBehavior": "when_no_templates",
+          "httpMethod": "POST",
+          "type": "aws"
+        }
+      }
+    },
+    "/minified-archives": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "responses": {
+          "200": {
+            "description": "200 response",
+            "schema": {
+              "$ref": "#/definitions/Empty"
+            }
+          }
+        },
+        "x-amazon-apigateway-integration": {
+          "credentials": "arn:aws:iam::982456631623:role/lambda-s3-execution-role",
+          "responses": {
+            "default": {
+              "statusCode": "200"
+            }
+          },
+          "requestTemplates": {
+            "application/json": "{\n    \"TableName\": \"minified-archives.webkit.org\"\n}"
+          },
+          "uri": "arn:aws:apigateway:us-west-2:dynamodb:action/Scan",
+          "passthroughBehavior": "when_no_templates",
+          "httpMethod": "POST",
+          "type": "aws"
+        }
+      }
+    },
+    "/minified-archives/{identifier}": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "name": "identifier",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "200 response",
+            "schema": {
+              "$ref": "#/definitions/Empty"
+            }
+          }
+        },
+        "x-amazon-apigateway-integration": {
+          "credentials": "arn:aws:iam::982456631623:role/lambda-s3-execution-role",
+          "responses": {
+            "default": {
+              "statusCode": "200",
+              "responseTemplates": {
+                "application/json": "{\n\"path\" : \"minified-archives\",\n\"identifier\" : \"$input.params('identifier')\",\n\"revisions\" : $input.json('$')\n}"
+              }
+            }
+          },
+          "requestTemplates": {
+            "application/json": "{\n    \"TableName\": \"minified-archives.webkit.org\",\n    \"KeyConditionExpression\": \"identifier = :v1\",\n    \"ExpressionAttributeValues\": {\n        \":v1\": {\n            \"S\": \"$input.params('identifier')\"\n        }\n    },\n    \"ProjectionExpression\": \"revision\"\n}"
+          },
+          "uri": "arn:aws:apigateway:us-west-2:dynamodb:action/Query",
+          "passthroughBehavior": "when_no_templates",
+          "httpMethod": "POST",
+          "type": "aws"
+        }
+      }
+    },
+    "/minified-archives/{identifier}/{revision}": {
+      "get": {
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "name": "identifier",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          },
+          {
+            "name": "revision",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "200 response",
+            "schema": {
+              "$ref": "#/definitions/Empty"
+            }
+          }
+        },
+        "x-amazon-apigateway-integration": {
+          "credentials": "arn:aws:iam::982456631623:role/lambda-s3-execution-role",
+          "responses": {
+            "default": {
+              "statusCode": "200",
+              "responseTemplates": {
+                "application/json": "#set($inputRoot = $input.path('$'))\n{\n    \"archive\": [\n        #foreach($elem in $inputRoot.Items) {\n            \"identifier\": \"$elem.identifier.S\",\n            \"revision\": \"$elem.revision.N\",\n            \"s3_url\": \"$elem.s3_url.S\"\n        }#if($foreach.hasNext),#end\n\t#end\n    ]\n}"
+              }
+            }
+          },
+          "requestTemplates": {
+            "application/json": "{\n    \"TableName\": \"minified-archives.webkit.org\",\n    \"KeyConditionExpression\": \"identifier = :v1 and revision = :v2\",\n    \"ExpressionAttributeValues\": {\n        \":v1\": { \"S\": \"$input.params('identifier')\"},\n        \":v2\": { \"N\": \"$input.params('revision')\"}\n    }\n}"
+          },
+          "uri": "arn:aws:apigateway:us-west-2:dynamodb:action/Query",
+          "passthroughBehavior": "when_no_templates",
+          "httpMethod": "POST",
+          "type": "aws"
+        }
+      }
+    }
+  },
+  "definitions": {
+    "Empty": {
+      "type": "object",
+      "title": "Empty Schema"
+    }
+  }
+}
\ No newline at end of file