forked from loafle/openapi-generator-original
better handling of model (reserved keyword)
This commit is contained in:
parent
4e034d3dc5
commit
6962947611
@ -366,7 +366,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
|
||||
// model name cannot use reserved keyword
|
||||
if (reservedWords.contains(name)) {
|
||||
escapeReservedWord(name); // e.g. return => _return
|
||||
name = "object_" + name; // e.g. return => ObjectReturn (after camelize)
|
||||
}
|
||||
|
||||
// camelize the model name
|
||||
|
@ -180,7 +180,7 @@ class StoreApi
|
||||
}
|
||||
|
||||
/**
|
||||
* callReturn
|
||||
* placeOrder
|
||||
*
|
||||
* Place an order for a pet
|
||||
*
|
||||
@ -188,15 +188,15 @@ class StoreApi
|
||||
* @return \Swagger\Client\Model\Order
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function callReturn($body = null)
|
||||
public function placeOrder($body = null)
|
||||
{
|
||||
list($response, $statusCode, $httpHeader) = $this->callReturnWithHttpInfo ($body);
|
||||
list($response, $statusCode, $httpHeader) = $this->placeOrderWithHttpInfo ($body);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* callReturnWithHttpInfo
|
||||
* placeOrderWithHttpInfo
|
||||
*
|
||||
* Place an order for a pet
|
||||
*
|
||||
@ -204,7 +204,7 @@ class StoreApi
|
||||
* @return Array of \Swagger\Client\Model\Order, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function callReturnWithHttpInfo($body = null)
|
||||
public function placeOrderWithHttpInfo($body = null)
|
||||
{
|
||||
|
||||
|
||||
|
@ -76,12 +76,12 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for callReturn
|
||||
* Test case for placeOrder
|
||||
*
|
||||
* Place an order for a pet
|
||||
*
|
||||
*/
|
||||
public function test_callReturn() {
|
||||
public function test_placeOrder() {
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user