Setting Request Parameters in APIGateway method config

Hello!

I’ve been dealing with a support case with AWS where I’m unable to update certain settings on an endpoint made with Jets. Specifically, I’m unable to set request parameters to be cached, and AWS staff say it’s because the setting ‘requestParameters’ is empty. Further, I am unable to update ‘requestParameters’ using the AWS console or CLI. According to the support staff, I should set that value on creation of the endpoint, but I’m unable to find a way to do that in Jets. I apologize if I’ve overlooked something obvious. Thanks!

For additional info, this is what my GET method looks like.

{
    "apiKeyRequired": false,
    "httpMethod": "GET",
    "methodIntegration": {
        "contentHandling": "CONVERT_TO_TEXT",
        "timeoutInMillis": 29000,
        "uri": "scrubbed_the_uri_that_was_here",
        "httpMethod": "POST",
        "passthroughBehavior": "WHEN_NO_MATCH",
        "cacheNamespace": "cool_number",
        "type": "AWS_PROXY",
        "cacheKeyParameters": []
    },
    "requestParameters": {},
    "requestModels": {},
    "authorizationType": "NONE"
}

Bummer. Off the top of my head, don’t believe this is possible with Jets. Possible enhancement would be to add it as part of the config/routes.rb definition. Since it sounds like it would have to set duration creation time, it maybe would look something like this:

config/routes.rb

Jets.application.routes.draw do
  get  "posts", to: "posts#index", request_parameters: {...}
end

Unsure when would get to this. Will consider PRs. Of course no sweat, either way :+1: Wanted to try and answer the question, though.