Open jairaju opened 5 years ago
Please add this! It's causing none of our swagger entries to work.
when Z
= foo/bar
in the parameters
The path:/api/{Z}
turns into /api/foo%2Fbar
@RobGraham this will not help your case. allowReserved
is only applicable to query parameters. At the moment, the spec does not support the /
character in path parameters under any configuration.
Hi, Thanks for your reply
I figured that out later
On Tue, Nov 26, 2019 at 9:50 AM Ron notifications@github.com wrote:
@RobGraham https://github.com/RobGraham this will not help your case. allowReserved is only applicable to query parameters. At the moment, the spec does not support the / character in path parameters under any configuration.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/swagger-api/swagger-ui/issues/5597?email_source=notifications&email_token=AJDW7ZJAHDLWC2UKS3R22SDQVRJDFA5CNFSM4IUWLIC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFECKNQ#issuecomment-558376246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJDW7ZLEHKJB5ECXRR23SM3QVRJDFANCNFSM4IUWLICQ .
still not supported? we've been hacking around this for a while, but, would really like to remove a bunch of string replace code which only exists to compensate for our SwaggerUI usage.
hi @jairaju
i didn't get the solution. What did you do to work around this?
I have swagger.json as follows:
{ "openapi": "3.0.0",
}
as per the OAS 3.0 specification I have set encoding attributes to allowReserved= true, but I still see the curl command output that is shown in swagger UI -> tryOut option with ascii values for parenthesis and double quotes as follows:
Actual result is this: curl -X POST "http://v-jay-hvp-install:8080/api/hvp/v1/calls/fdfd/js" -H "accept: /" -H "Content-Type: application/x-www-form-urlencoded" -d "application=sss&document=%7B%22Property1%22%3A%22value1%22%7D"
Expected result is this : curl -X POST "http://v-jay-hvp-install:8080/api/hvp/v1/calls/fdfd/js" -H "accept: /" -H "Content-Type: application/x-www-form-urlencoded" -d "application=sss&document={"Property1":"value1"}
I see this in the OAS specs: ===snippet=== By default, reserved characters :/?#[]@!$&'()*+,;= in form field values within application/x-www-form-urlencoded bodies are percent-encoded when sent. To allow these characters to be sent as is, use the allowReserved keyword like so: ====snippet===
In addition, If it is possible to allow curly brackets in the string type, then it should be allowed as well.