Skip to content

Commit

Permalink
[PHP] [Laravel] Fix syntax errors in models (OpenAPITools#721)
Browse files Browse the repository at this point in the history
* Fix syntax errors in Models

* Update samples

./bin/php-laravel-petstore-server.sh
  • Loading branch information
ackintosh authored and wing328 committed Aug 3, 2018
1 parent a9bc08b commit 556698b
Show file tree
Hide file tree
Showing 38 changed files with 51 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public PhpLaravelServerCodegen() {
/*
* Model Package. Optional, if needed, this can be used in templates
*/
modelPackage = "app.Models";
modelPackage = "app\\Models";

// template files want to be ignored
apiTestTemplateFiles.clear();
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2-SNAPSHOT
3.2.0-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ public function __construct()
}

/**
* Operation testSpecialTags
* Operation 123testSpecialTags
*
* To test special tags.
*
*
* @return Http response
*/
public function testSpecialTags()
public function 123testSpecialTags()
{
$input = Request::all();

Expand All @@ -47,11 +47,11 @@ public function testSpecialTags()

//not path params validation
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'];


return response('How about implementing testSpecialTags as a patch method ?');
return response('How about implementing 123testSpecialTags as a patch method ?');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* AdditionalPropertiesClass
*/
namespace app.Models;
namespace app\Models;

/**
* AdditionalPropertiesClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Animal
*/
namespace app.Models;
namespace app\Models;

/**
* Animal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* AnimalFarm
*/
namespace app.Models;
namespace app\Models;

/**
* AnimalFarm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ApiResponse
*/
namespace app.Models;
namespace app\Models;

/**
* ApiResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ArrayOfArrayOfNumberOnly
*/
namespace app.Models;
namespace app\Models;

/**
* ArrayOfArrayOfNumberOnly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ArrayOfNumberOnly
*/
namespace app.Models;
namespace app\Models;

/**
* ArrayOfNumberOnly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ArrayTest
*/
namespace app.Models;
namespace app\Models;

/**
* ArrayTest
Expand All @@ -15,7 +15,7 @@ class ArrayTest {
/** @var int[][] $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;

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Capitalization
*/
namespace app.Models;
namespace app\Models;

/**
* Capitalization
Expand Down
2 changes: 1 addition & 1 deletion samples/server/petstore/php-laravel/lib/app/Models/Cat.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Cat
*/
namespace app.Models;
namespace app\Models;

/**
* Cat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Category
*/
namespace app.Models;
namespace app\Models;

/**
* Category
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ClassModel
*/
namespace app.Models;
namespace app\Models;

/**
* ClassModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Client
*/
namespace app.Models;
namespace app\Models;

/**
* Client
Expand Down
2 changes: 1 addition & 1 deletion samples/server/petstore/php-laravel/lib/app/Models/Dog.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Dog
*/
namespace app.Models;
namespace app\Models;

/**
* Dog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* EnumArrays
*/
namespace app.Models;
namespace app\Models;

/**
* EnumArrays
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* EnumClass
*/
namespace app.Models;
namespace app\Models;

/**
* EnumClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* EnumTest
*/
namespace app.Models;
namespace app\Models;

/**
* EnumTest
Expand All @@ -21,7 +21,7 @@ class EnumTest {
/** @var double $enum_number */
private $enum_number;

/** @var \app.Models\OuterEnum $outer_enum */
/** @var \app\Models\OuterEnum $outer_enum */
private $outer_enum;

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
/**
* FileSchemaTestClass
*/
namespace app.Models;
namespace app\Models;

/**
* FileSchemaTestClass
*/
class FileSchemaTestClass {

/** @var \app.Models\File $file */
/** @var \app\Models\File $file */
private $file;

/** @var \app.Models\File[] $files */
/** @var \app\Models\File[] $files */
private $files;

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* FormatTest
*/
namespace app.Models;
namespace app\Models;

/**
* FormatTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* HasOnlyReadOnly
*/
namespace app.Models;
namespace app\Models;

/**
* HasOnlyReadOnly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* MapTest
*/
namespace app.Models;
namespace app\Models;

/**
* MapTest
Expand All @@ -18,7 +18,7 @@ class MapTest {
/** @var map[string,bool] $direct_map */
private $direct_map;

/** @var \app.Models\StringBooleanMap $indirect_map */
/** @var \app\Models\StringBooleanMap $indirect_map */
private $indirect_map;

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* MixedPropertiesAndAdditionalPropertiesClass
*/
namespace app.Models;
namespace app\Models;

/**
* MixedPropertiesAndAdditionalPropertiesClass
Expand All @@ -15,7 +15,7 @@ class MixedPropertiesAndAdditionalPropertiesClass {
/** @var \DateTime $date_time */
private $date_time;

/** @var map[string,\app.Models\Animal] $map */
/** @var map[string,\app\Models\Animal] $map */
private $map;

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Model200Response
*/
namespace app.Models;
namespace app\Models;

/**
* Model200Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ModelReturn
*/
namespace app.Models;
namespace app\Models;

/**
* ModelReturn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Name
*/
namespace app.Models;
namespace app\Models;

/**
* Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* NumberOnly
*/
namespace app.Models;
namespace app\Models;

/**
* NumberOnly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Order
*/
namespace app.Models;
namespace app\Models;

/**
* Order
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* OuterComposite
*/
namespace app.Models;
namespace app\Models;

/**
* OuterComposite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* OuterEnum
*/
namespace app.Models;
namespace app\Models;

/**
* OuterEnum
Expand Down
6 changes: 3 additions & 3 deletions samples/server/petstore/php-laravel/lib/app/Models/Pet.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Pet
*/
namespace app.Models;
namespace app\Models;

/**
* Pet
Expand All @@ -12,7 +12,7 @@ class Pet {
/** @var int $id */
private $id;

/** @var \app.Models\Category $category */
/** @var \app\Models\Category $category */
private $category;

/** @var string $name */
Expand All @@ -21,7 +21,7 @@ class Pet {
/** @var string[] $photo_urls */
private $photo_urls;

/** @var \app.Models\Tag[] $tags */
/** @var \app\Models\Tag[] $tags */
private $tags;

/** @var string $status pet status in the store*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ReadOnlyFirst
*/
namespace app.Models;
namespace app\Models;

/**
* ReadOnlyFirst
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* SpecialModelName
*/
namespace app.Models;
namespace app\Models;

/**
* SpecialModelName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* StringBooleanMap
*/
namespace app.Models;
namespace app\Models;

/**
* StringBooleanMap
Expand Down
Loading

0 comments on commit 556698b

Please sign in to comment.