|
11 | 11 | =end
|
12 | 12 |
|
13 | 13 | require 'uri'
|
| 14 | +require 'cgi' |
14 | 15 |
|
15 | 16 | module Petstore
|
16 | 17 | class PetApi
|
@@ -103,7 +104,7 @@ def delete_pet_with_http_info(pet_id, opts = {})
|
103 | 104 | fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.delete_pet"
|
104 | 105 | end
|
105 | 106 | # resource path
|
106 |
| - local_var_path = '/pet/{petId}'.sub('{' + 'petId' + '}', pet_id.to_s) |
| 107 | + local_var_path = '/pet/{petId}'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s)) |
107 | 108 |
|
108 | 109 | # query parameters
|
109 | 110 | query_params = opts[:query_params] || {}
|
@@ -290,7 +291,7 @@ def get_pet_by_id_with_http_info(pet_id, opts = {})
|
290 | 291 | fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.get_pet_by_id"
|
291 | 292 | end
|
292 | 293 | # resource path
|
293 |
| - local_var_path = '/pet/{petId}'.sub('{' + 'petId' + '}', pet_id.to_s) |
| 294 | + local_var_path = '/pet/{petId}'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s)) |
294 | 295 |
|
295 | 296 | # query parameters
|
296 | 297 | query_params = opts[:query_params] || {}
|
@@ -414,7 +415,7 @@ def update_pet_with_form_with_http_info(pet_id, opts = {})
|
414 | 415 | fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.update_pet_with_form"
|
415 | 416 | end
|
416 | 417 | # resource path
|
417 |
| - local_var_path = '/pet/{petId}'.sub('{' + 'petId' + '}', pet_id.to_s) |
| 418 | + local_var_path = '/pet/{petId}'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s)) |
418 | 419 |
|
419 | 420 | # query parameters
|
420 | 421 | query_params = opts[:query_params] || {}
|
@@ -480,7 +481,7 @@ def upload_file_with_http_info(pet_id, opts = {})
|
480 | 481 | fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.upload_file"
|
481 | 482 | end
|
482 | 483 | # resource path
|
483 |
| - local_var_path = '/pet/{petId}/uploadImage'.sub('{' + 'petId' + '}', pet_id.to_s) |
| 484 | + local_var_path = '/pet/{petId}/uploadImage'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s)) |
484 | 485 |
|
485 | 486 | # query parameters
|
486 | 487 | query_params = opts[:query_params] || {}
|
@@ -552,7 +553,7 @@ def upload_file_with_required_file_with_http_info(pet_id, required_file, opts =
|
552 | 553 | fail ArgumentError, "Missing the required parameter 'required_file' when calling PetApi.upload_file_with_required_file"
|
553 | 554 | end
|
554 | 555 | # resource path
|
555 |
| - local_var_path = '/fake/{petId}/uploadImageWithRequiredFile'.sub('{' + 'petId' + '}', pet_id.to_s) |
| 556 | + local_var_path = '/fake/{petId}/uploadImageWithRequiredFile'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s)) |
556 | 557 |
|
557 | 558 | # query parameters
|
558 | 559 | query_params = opts[:query_params] || {}
|
|
0 commit comments