[PHP] [Laravel] Fix syntax errors in models (#721)

* Fix syntax errors in Models

* Update samples

./bin/php-laravel-petstore-server.sh
This commit is contained in:
Akihito Nakano
2018-08-03 11:44:12 +09:00
committed by William Cheng
parent a258cf3fc6
commit 2b429ee43b
38 changed files with 51 additions and 51 deletions

View File

@@ -96,7 +96,7 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
/* /*
* Model Package. Optional, if needed, this can be used in templates * Model Package. Optional, if needed, this can be used in templates
*/ */
modelPackage = "app.Models"; modelPackage = "app\\Models";
// template files want to be ignored // template files want to be ignored
apiTestTemplateFiles.clear(); apiTestTemplateFiles.clear();

View File

@@ -1 +1 @@
3.1.2-SNAPSHOT 3.2.0-SNAPSHOT

View File

@@ -31,14 +31,14 @@ class AnotherFakeController extends Controller
} }
/** /**
* Operation testSpecialTags * Operation 123testSpecialTags
* *
* To test special tags. * To test special tags.
* *
* *
* @return Http response * @return Http response
*/ */
public function testSpecialTags() public function 123testSpecialTags()
{ {
$input = Request::all(); $input = Request::all();
@@ -47,11 +47,11 @@ class AnotherFakeController extends Controller
//not path params validation //not path params validation
if (!isset($input['client'])) { if (!isset($input['client'])) {
throw new \InvalidArgumentException('Missing the required parameter $client when calling testSpecialTags'); throw new \InvalidArgumentException('Missing the required parameter $client when calling 123testSpecialTags');
} }
$client = $input['client']; $client = $input['client'];
return response('How about implementing testSpecialTags as a patch method ?'); return response('How about implementing 123testSpecialTags as a patch method ?');
} }
} }

View File

@@ -2,7 +2,7 @@
/** /**
* AdditionalPropertiesClass * AdditionalPropertiesClass
*/ */
namespace app.Models; namespace app\Models;
/** /**
* AdditionalPropertiesClass * AdditionalPropertiesClass

View File

@@ -2,7 +2,7 @@
/** /**
* Animal * Animal
*/ */
namespace app.Models; namespace app\Models;
/** /**
* Animal * Animal

View File

@@ -2,7 +2,7 @@
/** /**
* AnimalFarm * AnimalFarm
*/ */
namespace app.Models; namespace app\Models;
/** /**
* AnimalFarm * AnimalFarm

View File

@@ -2,7 +2,7 @@
/** /**
* ApiResponse * ApiResponse
*/ */
namespace app.Models; namespace app\Models;
/** /**
* ApiResponse * ApiResponse

View File

@@ -2,7 +2,7 @@
/** /**
* ArrayOfArrayOfNumberOnly * ArrayOfArrayOfNumberOnly
*/ */
namespace app.Models; namespace app\Models;
/** /**
* ArrayOfArrayOfNumberOnly * ArrayOfArrayOfNumberOnly

View File

@@ -2,7 +2,7 @@
/** /**
* ArrayOfNumberOnly * ArrayOfNumberOnly
*/ */
namespace app.Models; namespace app\Models;
/** /**
* ArrayOfNumberOnly * ArrayOfNumberOnly

View File

@@ -2,7 +2,7 @@
/** /**
* ArrayTest * ArrayTest
*/ */
namespace app.Models; namespace app\Models;
/** /**
* ArrayTest * ArrayTest
@@ -15,7 +15,7 @@ class ArrayTest {
/** @var int[][] $array_array_of_integer */ /** @var int[][] $array_array_of_integer */
private $array_array_of_integer; private $array_array_of_integer;
/** @var \app.Models\ReadOnlyFirst[][] $array_array_of_model */ /** @var \app\Models\ReadOnlyFirst[][] $array_array_of_model */
private $array_array_of_model; private $array_array_of_model;
} }

View File

@@ -2,7 +2,7 @@
/** /**
* Capitalization * Capitalization
*/ */
namespace app.Models; namespace app\Models;
/** /**
* Capitalization * Capitalization

View File

@@ -2,7 +2,7 @@
/** /**
* Cat * Cat
*/ */
namespace app.Models; namespace app\Models;
/** /**
* Cat * Cat

View File

@@ -2,7 +2,7 @@
/** /**
* Category * Category
*/ */
namespace app.Models; namespace app\Models;
/** /**
* Category * Category

View File

@@ -2,7 +2,7 @@
/** /**
* ClassModel * ClassModel
*/ */
namespace app.Models; namespace app\Models;
/** /**
* ClassModel * ClassModel

View File

@@ -2,7 +2,7 @@
/** /**
* Client * Client
*/ */
namespace app.Models; namespace app\Models;
/** /**
* Client * Client

View File

@@ -2,7 +2,7 @@
/** /**
* Dog * Dog
*/ */
namespace app.Models; namespace app\Models;
/** /**
* Dog * Dog

View File

@@ -2,7 +2,7 @@
/** /**
* EnumArrays * EnumArrays
*/ */
namespace app.Models; namespace app\Models;
/** /**
* EnumArrays * EnumArrays

View File

@@ -2,7 +2,7 @@
/** /**
* EnumClass * EnumClass
*/ */
namespace app.Models; namespace app\Models;
/** /**
* EnumClass * EnumClass

View File

@@ -2,7 +2,7 @@
/** /**
* EnumTest * EnumTest
*/ */
namespace app.Models; namespace app\Models;
/** /**
* EnumTest * EnumTest
@@ -21,7 +21,7 @@ class EnumTest {
/** @var double $enum_number */ /** @var double $enum_number */
private $enum_number; private $enum_number;
/** @var \app.Models\OuterEnum $outer_enum */ /** @var \app\Models\OuterEnum $outer_enum */
private $outer_enum; private $outer_enum;
} }

View File

@@ -2,17 +2,17 @@
/** /**
* FileSchemaTestClass * FileSchemaTestClass
*/ */
namespace app.Models; namespace app\Models;
/** /**
* FileSchemaTestClass * FileSchemaTestClass
*/ */
class FileSchemaTestClass { class FileSchemaTestClass {
/** @var \app.Models\File $file */ /** @var \app\Models\File $file */
private $file; private $file;
/** @var \app.Models\File[] $files */ /** @var \app\Models\File[] $files */
private $files; private $files;
} }

View File

@@ -2,7 +2,7 @@
/** /**
* FormatTest * FormatTest
*/ */
namespace app.Models; namespace app\Models;
/** /**
* FormatTest * FormatTest

View File

@@ -2,7 +2,7 @@
/** /**
* HasOnlyReadOnly * HasOnlyReadOnly
*/ */
namespace app.Models; namespace app\Models;
/** /**
* HasOnlyReadOnly * HasOnlyReadOnly

View File

@@ -2,7 +2,7 @@
/** /**
* MapTest * MapTest
*/ */
namespace app.Models; namespace app\Models;
/** /**
* MapTest * MapTest
@@ -18,7 +18,7 @@ class MapTest {
/** @var map[string,bool] $direct_map */ /** @var map[string,bool] $direct_map */
private $direct_map; private $direct_map;
/** @var \app.Models\StringBooleanMap $indirect_map */ /** @var \app\Models\StringBooleanMap $indirect_map */
private $indirect_map; private $indirect_map;
} }

View File

@@ -2,7 +2,7 @@
/** /**
* MixedPropertiesAndAdditionalPropertiesClass * MixedPropertiesAndAdditionalPropertiesClass
*/ */
namespace app.Models; namespace app\Models;
/** /**
* MixedPropertiesAndAdditionalPropertiesClass * MixedPropertiesAndAdditionalPropertiesClass
@@ -15,7 +15,7 @@ class MixedPropertiesAndAdditionalPropertiesClass {
/** @var \DateTime $date_time */ /** @var \DateTime $date_time */
private $date_time; private $date_time;
/** @var map[string,\app.Models\Animal] $map */ /** @var map[string,\app\Models\Animal] $map */
private $map; private $map;
} }

View File

@@ -2,7 +2,7 @@
/** /**
* Model200Response * Model200Response
*/ */
namespace app.Models; namespace app\Models;
/** /**
* Model200Response * Model200Response

View File

@@ -2,7 +2,7 @@
/** /**
* ModelReturn * ModelReturn
*/ */
namespace app.Models; namespace app\Models;
/** /**
* ModelReturn * ModelReturn

View File

@@ -2,7 +2,7 @@
/** /**
* Name * Name
*/ */
namespace app.Models; namespace app\Models;
/** /**
* Name * Name

View File

@@ -2,7 +2,7 @@
/** /**
* NumberOnly * NumberOnly
*/ */
namespace app.Models; namespace app\Models;
/** /**
* NumberOnly * NumberOnly

View File

@@ -2,7 +2,7 @@
/** /**
* Order * Order
*/ */
namespace app.Models; namespace app\Models;
/** /**
* Order * Order

View File

@@ -2,7 +2,7 @@
/** /**
* OuterComposite * OuterComposite
*/ */
namespace app.Models; namespace app\Models;
/** /**
* OuterComposite * OuterComposite

View File

@@ -2,7 +2,7 @@
/** /**
* OuterEnum * OuterEnum
*/ */
namespace app.Models; namespace app\Models;
/** /**
* OuterEnum * OuterEnum

View File

@@ -2,7 +2,7 @@
/** /**
* Pet * Pet
*/ */
namespace app.Models; namespace app\Models;
/** /**
* Pet * Pet
@@ -12,7 +12,7 @@ class Pet {
/** @var int $id */ /** @var int $id */
private $id; private $id;
/** @var \app.Models\Category $category */ /** @var \app\Models\Category $category */
private $category; private $category;
/** @var string $name */ /** @var string $name */
@@ -21,7 +21,7 @@ class Pet {
/** @var string[] $photo_urls */ /** @var string[] $photo_urls */
private $photo_urls; private $photo_urls;
/** @var \app.Models\Tag[] $tags */ /** @var \app\Models\Tag[] $tags */
private $tags; private $tags;
/** @var string $status pet status in the store*/ /** @var string $status pet status in the store*/

View File

@@ -2,7 +2,7 @@
/** /**
* ReadOnlyFirst * ReadOnlyFirst
*/ */
namespace app.Models; namespace app\Models;
/** /**
* ReadOnlyFirst * ReadOnlyFirst

View File

@@ -2,7 +2,7 @@
/** /**
* SpecialModelName * SpecialModelName
*/ */
namespace app.Models; namespace app\Models;
/** /**
* SpecialModelName * SpecialModelName

View File

@@ -2,7 +2,7 @@
/** /**
* StringBooleanMap * StringBooleanMap
*/ */
namespace app.Models; namespace app\Models;
/** /**
* StringBooleanMap * StringBooleanMap

View File

@@ -2,7 +2,7 @@
/** /**
* Tag * Tag
*/ */
namespace app.Models; namespace app\Models;
/** /**
* Tag * Tag

View File

@@ -2,7 +2,7 @@
/** /**
* User * User
*/ */
namespace app.Models; namespace app\Models;
/** /**
* User * User

View File

@@ -17,12 +17,12 @@
*/ */
/** /**
* patch testSpecialTags * patch 123testSpecialTags
* Summary: To test special tags * Summary: To test special tags
* Notes: To test special tags * Notes: To test special tags and operation ID starting with number
* Output-Formats: [application/json] * Output-Formats: [application/json]
*/ */
Route::patch('/v2/another-fake/dummy', 'AnotherFakeController@testSpecialTags'); Route::patch('/v2/another-fake/dummy', 'AnotherFakeController@123testSpecialTags');
/** /**
* patch testClientModel * patch testClientModel
* Summary: To test \"client\" model * Summary: To test \"client\" model