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

Path parameter should get escaped #1254

Closed
kPshi opened this issue Apr 6, 2017 · 5 comments
Closed

Path parameter should get escaped #1254

kPshi opened this issue Apr 6, 2017 · 5 comments

Comments

@kPshi
Copy link

kPshi commented Apr 6, 2017

When defining a path parameter like

  /v1/config/{key}:
    get:
      produces: ["application/json"]
      parameters:
        - name: key
          type: string
          in: path
          required: true
      responses:
        "200":
          schema:
            type: object
            properties:
              key:
                type: string
              value:
                type: string

And try it via the editor's WUI with a key containg a slash, e.g. "foo/bar" then it is sent as is resulting in
GET http://127.0.0.1:8889/v1/config/foo/bar
while the parameter should be escaped resulting in
GET http://127.0.0.1:8889/v1/config/foo%2Fbar

@kPshi kPshi changed the title Path parameter containing a slash should get escaped Path parameter should get escaped Apr 6, 2017
@webron
Copy link
Contributor

webron commented Apr 6, 2017

@kPshi - which version of swagger-editor do you use?

@kPshi
Copy link
Author

kPshi commented May 4, 2017

Version 2.10.5

@webron
Copy link
Contributor

webron commented May 4, 2017

Try the latest version - it should be fixed there.

@kPshi
Copy link
Author

kPshi commented May 4, 2017

Works. Great! :-)

@webron
Copy link
Contributor

webron commented May 4, 2017

Great :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants