Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
Description
RFC 3986 defines a set of reserved characters :/?#[]@!$&'()*+,;= that are used as URI component delimiters. When these characters need to be used literally in a query parameter value, they are usually percent-encoded. For example, / is encoded as %2F (or %2f), so that the parameter value quotes/h2g2.txt would be sent as
GET /file?path=quotes%2Fh2g2.txt
If you want a query parameter that is not percent-encoded, add allowReserved: true to the parameter definition:
parameters: - in: query name: path required: true schema: type: string allowReserved: true # <-----
In this case, the parameter value would be sent like so:
GET /file?path=quotes/h2g2.txt
Actual result:
There is no checks for 'allowReserved' value in the generator's code.
Expected result:
Add the check in *.mustache files , that reads 'allowReserved' value and applies/or not applies toPercentEncoding().
More info:
See https://swagger.io/docs/specification/v3_0/describing-parameters/