We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example Swagger/OpenAPI definition:
{ "openapi": "3.1.0", "info": { "title": "Server", "version": "0.0.1" }, "paths": { "/endpoint": { "get": { "responses": { }, "parameters": [ { "name": "param", "in": "query", "description": "a param that accepts an array of objects", "content": { "application/json": { "schema": { "type": "array", "maxItems": 10, "items": { "type": "object", "properties": { "a": { "type": "string" }, "b": { "type": "number" } } } } } } } ] } } } }
The above query parameter produces an encoded URI string that was JSON-stringified twice.
Steps to reproduce the behavior:
Expected the following URL, encodes [{\n "a": "string",\n "b": 0\n}]
[{\n "a": "string",\n "b": 0\n}]
https://raw.githubusercontent.com/endpoint?param= %5B%7B%0A%20%20%22a%22%3A%20%22string%22%2C%0A%20%20%22b%22%3A%200%0A%7D%5D
Object is JSON-stringified twice. The generated URL encodes ["{\\n \\"a\\": \\"string\\",\\n \\"b\\": 0\\n}"], i.e., a JSON string in a JSON array.
["{\\n \\"a\\": \\"string\\",\\n \\"b\\": 0\\n}"]
https://raw.githubusercontent.com/endpoint?param= %5B%22%7B%5Cn%20%20%5C%22a%5C%22%3A%20%5C%22string%5C%22%2C%5Cn%20%20%5C%22b%5C%22%3A%200%5Cn%7D%22%5D
The text was updated successfully, but these errors were encountered:
fix(execute): parse stringified objects nested in arrays
5c60b7e
Refs swagger-api/swagger-ui#9521
fix(execute): parse stringified objects nested in arrays (#3466)
b1f2ee7
Addressed in #9805, with a swagger-client upstream change swagger-api/swagger-js#3466
Sorry, something went wrong.
Released as https://github.com/swagger-api/swagger-ui/releases/tag/v5.15.2
glowcloud
No branches or pull requests
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
The above query parameter produces an encoded URI string that was JSON-stringified twice.
To reproduce...
Steps to reproduce the behavior:
Expected behavior
Expected the following URL, encodes
[{\n "a": "string",\n "b": 0\n}]
Actual behavior
Object is JSON-stringified twice. The generated URL encodes
["{\\n \\"a\\": \\"string\\",\\n \\"b\\": 0\\n}"]
, i.e., a JSON string in a JSON array.Screenshots
The text was updated successfully, but these errors were encountered: