Skip to content
New issue

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

Query parameters with allowReserved=false not percent-encoded during OAS3 "Try It Out" #3817

Closed
hkosova opened this issue Oct 25, 2017 · 2 comments · Fixed by swagger-api/swagger-js#1181

Comments

@hkosova
Copy link
Contributor

hkosova commented Oct 25, 2017

Q A
Bug or feature request? Bug
Which Swagger/OpenAPI version? 3.0
Which Swagger-UI version? 3.4.0
How did you install Swagger-UI? http://editor.swagger.io
Which browser & version? Chrome 61
Which operating system? Windows 7

Demonstration API definition

openapi: 3.0.0
info:
  title: math.js web service
  version: '1.0'
servers:
  - url: http://api.mathjs.org/v1
paths:
  /:
    get:
      summary: Evaluates an expression and returns result as plain text
      parameters:
        - in: query
          name: expr
          required: true
          description: The expression to be evaluated
          schema:
            type: string
            example: 2+3*sqrt(4)
      responses:
        '200':
          description: OK
          content:
            text/html:
              schema:
                type: string

To reproduce the issue, call the API using the parameter value 2+3.

Expected Behavior

Request URL is http://api.mathjs.org/v1/?expr=2%2B3 (with 2%2B3 instead of 2+3)

Current Behavior

Request URL is http://api.mathjs.org/v1/?expr=2+3

Context

The issue affects OpenAPI 3.0 specs only.

CC #3641

@hkosova hkosova changed the title Query parameters with allowReserved=false not perfent-encoded during "Try It Out" Query parameters with allowReserved=false not perfent-encoded during OAS3 "Try It Out" Oct 25, 2017
@hkosova hkosova changed the title Query parameters with allowReserved=false not perfent-encoded during OAS3 "Try It Out" Query parameters with allowReserved=false not percent-encoded during OAS3 "Try It Out" Oct 25, 2017
@shockey shockey self-assigned this Oct 26, 2017
@hkosova hkosova mentioned this issue Oct 27, 2017
22 tasks
@shockey shockey added this to the Friday, November 10 milestone Nov 3, 2017
@shockey
Copy link
Contributor

shockey commented Nov 10, 2017

Fix confirmed locally:

messages image 1840540984

@hkosova, feel free to give my Swagger-Client PR a once-over if you have the time, I added several new allowReserved test cases.

@hkosova
Copy link
Contributor Author

hkosova commented Nov 10, 2017

@shockey LGTM 👍

@lock lock bot locked and limited conversation to collaborators Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants