Skip to content

Wrong Attribute Type for Request Body in LambdaRunner #11

@tommelo

Description

@tommelo

The LambdaRequestSpec class used by LambdaRunner to simulate a Lambda execution call has a wrong type for the attribute body. When using proxy integration the body is sent as String(raw request body) and the request spec is simulating as a Map<String, Object>. That should be fixed to simulate the exact data types that API Gateway sends to Lambda.

Also, the current attribute type makes it impossible to implement a xml deserializer.

E.g.:

my-spec-file.json

....
"request":{
   "path": "/users",
   "pathParameters": {},
    "queryStringParameters": {},
    "resource": "users",
    "stageVariables": {},
    "method":"POST",
    "headers": {
       "Accept": "text/xml",
       "Content-Type": "text/xml"
    },
    "body": "<MyBean><name>my name</name><age>20</age><address>test</address></MyBean>"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions