Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(execute): handle undefined serialized JSON Query param (#2844)
When a query parameter has content-type JSON, an undefined serialized value could result into a JavaScript runtime error. This change will handle undefined value and simply ignore it.
- Loading branch information
1 parent
e953f9c
commit 285ade8
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
openapi: 3.0.1 | ||
info: | ||
version: "0.0.1" | ||
title: Test Defect | ||
description: >- | ||
A client side JS error occurred when using the `TryItOut` feature of the SwaggerUI. It would try fail | ||
to formatKeyValuePairs on a JSON query parameter. | ||
paths: | ||
/test: | ||
get: | ||
operationId: test | ||
parameters: | ||
- name: jsonArray | ||
in: query | ||
description: | | ||
Query parameter formatted as JSON | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
responses: | ||
'200': | ||
description: OK |