-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Open
Description
To reproduce...
Paste this OpenAPI definition into https://editor.swagger.io:
openapi: 3.1.0
info:
title:
version:
paths:
/test:
get:
parameters:
- in: query
name: pet
content:
application/json:
schema:
type: string
responses:
2XX:
description:
content:
application/json:
schema:
type: objectDescribe the bug you're encountering
When filling the parameter in Swagger UI the produced request looks like this:
curl -X 'GET' \
'https://editor.swagger.io/test?pet=cat' \
-H 'accept: application/json'The parameter pet is not properly serialized.
Expected behavior
Query string should look like this: %22cat%22 which is percent encoded from "cat" since definition of the pet parameter uses content application/json.
And the curl snippet should look like this:
curl -X 'GET' \
'https://editor.swagger.io/test?pet=%22cat%22' \
-H 'accept: application/json'Metadata
Metadata
Assignees
Labels
No labels