mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-08 13:36:11 +00:00
* [PHP/Dart/Python] Correctly escape strings in single quotes (Fixes #17582) * Move escapeTextInSingleQuotes method to DefaultCodegen, add docblock
This commit is contained in:
@@ -92,7 +92,7 @@ $apiInstance = new OpenAPI\Client\Api\BodyApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$body = "/path/to/file.txt"; // \SplFileObject
|
||||
$body = '/path/to/file.txt'; // \SplFileObject
|
||||
|
||||
try {
|
||||
$result = $apiInstance->testBodyApplicationOctetstreamBinary($body);
|
||||
@@ -148,7 +148,7 @@ $apiInstance = new OpenAPI\Client\Api\BodyApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$files = array("/path/to/file.txt"); // \SplFileObject[]
|
||||
$files = array('/path/to/file.txt'); // \SplFileObject[]
|
||||
|
||||
try {
|
||||
$result = $apiInstance->testBodyMultipartFormdataArrayOfBinary($files);
|
||||
@@ -204,7 +204,7 @@ $apiInstance = new OpenAPI\Client\Api\BodyApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$my_file = "/path/to/file.txt"; // \SplFileObject
|
||||
$my_file = '/path/to/file.txt'; // \SplFileObject
|
||||
|
||||
try {
|
||||
$result = $apiInstance->testBodyMultipartFormdataSingleBinary($my_file);
|
||||
|
||||
@@ -97,8 +97,8 @@ $apiInstance = new OpenAPI\Client\Api\QueryApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$datetime_query = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime
|
||||
$date_query = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime
|
||||
$datetime_query = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
|
||||
$date_query = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
|
||||
$string_query = 'string_query_example'; // string
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user