diff --git a/Makefile b/Makefile index 2a29098..9ead50f 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ local_setup_dynamo_db: --region us-east-1 local_invoke_demo_app: - curl -X POST 127.0.0.1:7000/invoke -H "Content-Type: application/json" -d @Tests/BreezeLambdaAPITests/Fixtures/post_products_api_gtw.json + curl -X POST 127.0.0.1:7000/invoke -H "Content-Type: application/json" -d @Sources/BreezeLambdaItemAPI/Resources/post_items_api_gtw.json test: swift test --sanitize=thread --enable-code-coverage diff --git a/Sources/BreezeLambdaItemAPI/Resources/post_items_api_gtw.json b/Sources/BreezeLambdaItemAPI/Resources/post_items_api_gtw.json new file mode 100644 index 0000000..b763859 --- /dev/null +++ b/Sources/BreezeLambdaItemAPI/Resources/post_items_api_gtw.json @@ -0,0 +1,39 @@ +{ + "body": "{\n \"itemKey\": \"2023\",\n \"name\": \"Swift Serverless API with async/await! 🚀🥳\",\n \"description\": \"BreezeLambaAPI is magic 🪄!\"\n} ", + "headers": { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "cache-control": "no-cache", + "content-length": "137", + "content-type": "application/json", + "host": "br33z3ap10.execute-api.eu-west-1.amazonaws.com", + "postman-token": "7005b89f-915e-4c30-9237-8832e7842f91", + "user-agent": "PostmanRuntime/7.31.0", + "x-amzn-trace-id": "Root=1-63f7d7e5-0381fae826a3075e05564773", + "x-forwarded-for": "140.228.54.79", + "x-forwarded-port": "443", + "x-forwarded-proto": "https" + }, + "isBase64Encoded": false, + "rawPath": "/products", + "rawQueryString": "", + "requestContext": { + "accountId": "00000000000", + "apiId": "br33z3ap10", + "domainName": "br33z3ap10.execute-api.eu-west-1.amazonaws.com", + "domainPrefix": "br33z3ap10", + "http": { + "method": "POST", + "path": "/products", + "protocol": "HTTP/1.1", + "sourceIp": "140.228.54.79", + "userAgent": "PostmanRuntime/7.31.0" + }, + "requestId": "Az6r9ijSDoEEJdQ=", + "stage": "$default", + "time": "23/Feb/2023:21:17:25 +0000", + "timeEpoch": 1677187045849 + }, + "routeKey": "POST /products", + "version": "2.0" +}