|
1 | 1 | from functools import cached_property
|
2 |
| -from typing import Any, Dict, List, Optional, overload |
| 2 | +from typing import Any, Dict, Optional, overload |
3 | 3 |
|
4 | 4 | from aws_lambda_powertools.shared.headers_serializer import (
|
5 | 5 | BaseHeadersSerializer,
|
@@ -138,13 +138,6 @@ def query_string_parameters(self) -> Dict[str, str]:
|
138 | 138 | """The request query string parameters."""
|
139 | 139 | return self["query_string_parameters"]
|
140 | 140 |
|
141 |
| - @property |
142 |
| - def resolved_query_string_parameters(self) -> Optional[Dict[str, List[str]]]: |
143 |
| - if self.query_string_parameters is not None: |
144 |
| - query_string = {key: value.split(",") for key, value in self.query_string_parameters.items()} |
145 |
| - return query_string |
146 |
| - return None |
147 |
| - |
148 | 141 | @property
|
149 | 142 | def resolved_headers_field(self) -> Optional[Dict[str, Any]]:
|
150 | 143 | if self.headers is not None:
|
@@ -256,23 +249,21 @@ def path(self) -> str:
|
256 | 249 |
|
257 | 250 | @property
|
258 | 251 | def request_context(self) -> vpcLatticeEventV2RequestContext:
|
259 |
| - """he VPC Lattice v2 Event request context.""" |
| 252 | + """The VPC Lattice v2 Event request context.""" |
260 | 253 | return vpcLatticeEventV2RequestContext(self["requestContext"])
|
261 | 254 |
|
262 | 255 | @property
|
263 | 256 | def query_string_parameters(self) -> Optional[Dict[str, str]]:
|
264 |
| - """The request query string parameters.""" |
265 |
| - return self.get("queryStringParameters") |
| 257 | + """The request query string parameters. |
266 | 258 |
|
267 |
| - @property |
268 |
| - def resolved_query_string_parameters(self) -> Optional[Dict[str, List[str]]]: |
269 |
| - if self.query_string_parameters is not None: |
270 |
| - query_string = { |
271 |
| - key: value.split(",") if not isinstance(value, list) else value |
272 |
| - for key, value in self.query_string_parameters.items() |
273 |
| - } |
274 |
| - return query_string |
275 |
| - return None |
| 259 | + For VPC Lattice V2, the queryStringParameters will contain a Dict[str, List[str]] |
| 260 | + so to keep compatibility with existing utilities, we merge all the values with a comma. |
| 261 | + """ |
| 262 | + params = self.get("queryStringParameters") |
| 263 | + if params: |
| 264 | + return {key: ",".join(value) for key, value in params.items()} |
| 265 | + else: |
| 266 | + return None |
276 | 267 |
|
277 | 268 | @property
|
278 | 269 | def resolved_headers_field(self) -> Optional[Dict[str, str]]:
|
|
0 commit comments