How do I specify the data type of URL Query String Parameters in REST API Gateway Method Requests?

0

We can specify the name as well as control if it's required or not but I can't find out how the change the data type. When I export my API, the query parameters always have the data type of string. I even tried specifying it in my query string documentation but it gets ignored.

E.x.: The documentation { "description": "blah blah blah.", "schema": { "type": "boolean" } }

gets exported as

"parameters": [ { "name": "blahblahblah", "in": "query", "description": "blah blah blah.", "schema": { "type": "string" } },

hb2638
asked 10 months ago525 views
1 Answer
0
Accepted Answer

This is not possible. The parameter in query string can be always type of "String".

For more info please check https://aws.amazon.com/blogs/compute/support-for-multi-value-parameters-in-amazon-api-gateway/

In above doc, you can directly click on "Lunch Stack" and it will create cloud formation template and API gateway with an example.

answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions