--- swagger: "2.0" info: description: "AI Photo Search application, built during the Cloud and Big Data course\ \ at NYU." version: "1.0.0" title: "AI Photo Search" basePath: "/dev" schemes: - "https" paths: /search: get: operationId: "searchPhotos" produces: - "application/json" parameters: - name: "q" in: "query" required: false type: "string" responses: "200": description: "200 response" schema: $ref: "#/definitions/SearchResponse" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" "500": description: "500 response" schema: $ref: "#/definitions/Error" "403": description: "403 response" schema: $ref: "#/definitions/Error" x-amazon-apigateway-integration: httpMethod: "POST" uri: "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:353077126427:function:LF2-search-photos/invocations" responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Origin: "'*'" passthroughBehavior: "when_no_match" contentHandling: "CONVERT_TO_TEXT" type: "aws_proxy" options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'*'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: '{"statusCode": 200}' passthroughBehavior: "when_no_match" type: "mock" /upload/{bucket}/{key}: put: operationId: "uploadPhoto" produces: - "application/json" parameters: - name: "Content-Type" in: "header" required: false type: "string" - name: "Accept" in: "header" required: false type: "string" - name: "x-amz-meta-customLabels" in: "header" required: false type: "string" - name: "key" in: "path" required: true type: "string" - name: "bucket" in: "path" required: true type: "string" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" "500": description: "500 response" schema: $ref: "#/definitions/Error" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" "403": description: "403 response" schema: $ref: "#/definitions/Error" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: credentials: "arn:aws:iam::353077126427:role/API_S3-Access" httpMethod: "PUT" uri: "arn:aws:apigateway:us-east-1:s3:path/{bucket}/{key}" responses: "4\\d{2}": statusCode: "403" default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'OPTIONS,PUT'" method.response.header.Access-Control-Allow-Headers: "'*'" method.response.header.Access-Control-Allow-Origin: "'*'" "5\\d{2}": statusCode: "500" requestParameters: integration.request.header.Accept: "method.request.header.Accept" integration.request.header.x-amz-meta-customLabels: "method.request.header.x-amz-meta-customLabels" integration.request.path.key: "method.request.path.key" integration.request.path.bucket: "method.request.path.bucket" integration.request.header.Content-Type: "method.request.header.Content-Type" passthroughBehavior: "when_no_match" contentHandling: "CONVERT_TO_BINARY" type: "aws" options: consumes: - "application/json" produces: - "application/json" parameters: - name: "key" in: "path" required: true type: "string" - name: "bucket" in: "path" required: true type: "string" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'OPTIONS,PUT'" method.response.header.Access-Control-Allow-Headers: "'*'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: '{"statusCode": 200}' passthroughBehavior: "when_no_match" type: "mock" definitions: Empty: {} Error: type: "object" properties: code: type: "integer" format: "int32" message: type: "string" Photo: type: "object" properties: url: type: "string" labels: type: "array" items: type: "string" SearchResponse: type: "object" properties: results: type: "array" items: $ref: "#/definitions/Photo" x-amazon-apigateway-gateway-responses: DEFAULT_4XX: responseParameters: gatewayresponse.header.Access-Control-Allow-Methods: "'GET,OPTIONS'" gatewayresponse.header.Access-Control-Allow-Origin: "'*'" gatewayresponse.header.Access-Control-Allow-Headers: "'*'" DEFAULT_5XX: responseParameters: gatewayresponse.header.Access-Control-Allow-Methods: "'GET,OPTIONS'" gatewayresponse.header.Access-Control-Allow-Origin: "'*'" gatewayresponse.header.Access-Control-Allow-Headers: "'*'"