|
{ |
|
"swagger": "2.0", |
|
"info": { |
|
"version": "2021-06-27T19:56:31Z", |
|
"title": "my-api" |
|
}, |
|
"host": "ocywyw3jq5.execute-api.us-east-1.amazonaws.com", |
|
"basePath": "/dev", |
|
"schemes": [ |
|
"https" |
|
], |
|
"paths": { |
|
"/api/just-passthrough": { |
|
"get": { |
|
"produces": [ |
|
"application/json" |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "200 response", |
|
"schema": { |
|
"$ref": "#/definitions/Empty" |
|
} |
|
} |
|
}, |
|
"x-amazon-apigateway-integration": { |
|
"httpMethod": "GET", |
|
"uri": "https://run.mocky.io/v3/a89f3fb6-a34c-4ca1-9854-bbf97a108d45", |
|
"responses": { |
|
"default": { |
|
"statusCode": "200" |
|
} |
|
}, |
|
"passthroughBehavior": "when_no_match", |
|
"type": "http" |
|
} |
|
} |
|
}, |
|
"/api/passthrough-extract-json": { |
|
"get": { |
|
"produces": [ |
|
"application/json" |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "200 response", |
|
"schema": { |
|
"$ref": "#/definitions/Empty" |
|
} |
|
} |
|
}, |
|
"x-amazon-apigateway-integration": { |
|
"httpMethod": "GET", |
|
"uri": "https://run.mocky.io/v3/a89f3fb6-a34c-4ca1-9854-bbf97a108d45", |
|
"responses": { |
|
"default": { |
|
"statusCode": "200", |
|
"responseTemplates": { |
|
"application/json": "$input.json('$.entries[0].json')" |
|
} |
|
} |
|
}, |
|
"passthroughBehavior": "when_no_match", |
|
"type": "http" |
|
} |
|
} |
|
}, |
|
"/api/using-lambda": { |
|
"get": { |
|
"produces": [ |
|
"application/json" |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "200 response", |
|
"schema": { |
|
"$ref": "#/definitions/Empty" |
|
} |
|
} |
|
}, |
|
"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:706689456704:function:extract-json/invocations", |
|
"responses": { |
|
"default": { |
|
"statusCode": "200" |
|
} |
|
}, |
|
"passthroughBehavior": "when_no_match", |
|
"contentHandling": "CONVERT_TO_TEXT", |
|
"type": "aws" |
|
} |
|
} |
|
}, |
|
"/api/using-mock": { |
|
"get": { |
|
"consumes": [ |
|
"application/json" |
|
], |
|
"produces": [ |
|
"application/json" |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "200 response", |
|
"schema": { |
|
"$ref": "#/definitions/Empty" |
|
} |
|
} |
|
}, |
|
"x-amazon-apigateway-integration": { |
|
"responses": { |
|
"default": { |
|
"statusCode": "200", |
|
"responseTemplates": { |
|
"application/json": "{\n \"some_key\": \"some value from mock\"\n}" |
|
} |
|
} |
|
}, |
|
"requestTemplates": { |
|
"application/json": "{\"statusCode\": 200}" |
|
}, |
|
"passthroughBehavior": "when_no_match", |
|
"type": "mock" |
|
} |
|
} |
|
} |
|
}, |
|
"definitions": { |
|
"Empty": { |
|
"type": "object", |
|
"title": "Empty Schema" |
|
} |
|
} |
|
} |