Will Black
Will Black

Reputation: 93

AWS API Gateway xml request

I have a question about using API Gateway passing an XML request. I'm trying to determine how to create a model (schema validation) if the incoming request is in XML rather than JSON. Everything I've found thus far that describes how to create a model is doing so against a JSON request. It also seems when creating a model it's done so using JSON. Is it possible to create a model for an incoming XML request? I've seen many threads that states you can pass XML request using pass-through when adding the below snippet as the mapping template in the Integration request, but I'm trying to determine how to create a model when the request is XML. Has anyone here done this before?

{
"body" : $input.json('$')
}

Upvotes: 2

Views: 1211

Answers (1)

Bob Kinney
Bob Kinney

Reputation: 9020

Currently request validation and models only support JSON as they are written in JSON schema.

Upvotes: 1

Related Questions