better handling of model (reserved keyword)

This commit is contained in:
wing328 2016-02-25 14:16:40 +08:00
parent 4e034d3dc5
commit 6962947611
3 changed files with 8 additions and 8 deletions

View File

@ -366,7 +366,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
// model name cannot use reserved keyword // model name cannot use reserved keyword
if (reservedWords.contains(name)) { if (reservedWords.contains(name)) {
escapeReservedWord(name); // e.g. return => _return name = "object_" + name; // e.g. return => ObjectReturn (after camelize)
} }
// camelize the model name // camelize the model name

View File

@ -180,7 +180,7 @@ class StoreApi
} }
/** /**
* callReturn * placeOrder
* *
* Place an order for a pet * Place an order for a pet
* *
@ -188,15 +188,15 @@ class StoreApi
* @return \Swagger\Client\Model\Order * @return \Swagger\Client\Model\Order
* @throws \Swagger\Client\ApiException on non-2xx response * @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; return $response;
} }
/** /**
* callReturnWithHttpInfo * placeOrderWithHttpInfo
* *
* Place an order for a pet * 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) * @return Array of \Swagger\Client\Model\Order, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response * @throws \Swagger\Client\ApiException on non-2xx response
*/ */
public function callReturnWithHttpInfo($body = null) public function placeOrderWithHttpInfo($body = null)
{ {

View File

@ -76,12 +76,12 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
} }
/** /**
* Test case for callReturn * Test case for placeOrder
* *
* Place an order for a pet * Place an order for a pet
* *
*/ */
public function test_callReturn() { public function test_placeOrder() {
} }