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

Ruby client: escape path parameters #3039

Merged
merged 2 commits into from
Jun 2, 2019
Merged

Ruby client: escape path parameters #3039

merged 2 commits into from
Jun 2, 2019

Commits on Jun 2, 2019

  1. Ruby client: escape path parameters

    Path parameters should be escaped when encoded into the path.
    
    In the path '/pet/{petId}' let's pretend petId is a string instead of a
    number.
    
    If the user uses "Bobby" as the petId then they correctly get the path
    '/pet/Bobby'.
    But if they put 'Bobby/Tables' as the petId then they used to get the
    path '/pet/Bobby/Tables' which will be interpreted by the server as a
    different route.
    
    Using CGI::Escape they now get '/pet/Bobby%2FTables' which is correct.
    ccouzens committed Jun 2, 2019
    Configuration menu
    Copy the full SHA
    201cbdc View commit details
    Browse the repository at this point in the history
  2. Ruby client- regenerate further files

    Thank you @autopp for noticing I needed to update
    `samples/openapi3/client/petstore/ruby`.
    
    Regenerated by running `bin/openapi3/ruby-client-petstore.sh`.
    
    PR #3039
    ccouzens committed Jun 2, 2019
    Configuration menu
    Copy the full SHA
    7effdb1 View commit details
    Browse the repository at this point in the history