Can't define an AWS API Gateway mapping template from the console

0

I'm new to AWS API Gateway and got stuck trying to define a mapping templates.

I'd like to map a application/x-www-form-urlencoded POST request to a lambda function I created. I managed to define a route and link it to the function.

But when I tried to create a simple mapping template from the console by clicking "Models" the "Create" with the following definition:

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

it fails with:

it prints "Invalid model specified: Validation Result: warnings : [],
errors : [Invalid model schema specified]

Judging by the [documentation][1] my definition seems right.

On the top of the form it tells me that it's using a JSON Schema syntax wich is different from the documentation linked above.

Is the documentation outdated? Am I submmiting it wrong? How can I solve that?

[1]: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html

已提問 4 年前檢視次數 1158 次
1 個回答
1

My mistake. Turns out I was trying to define it on the wrong place.

已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南