-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PHP][Symfony] Generate valid PHP code
Fixes #5985 We were experiencing syntax issues when generating the Petstore example. See some of the examples below: StoreApiInterface.php namespace Swagger\Server\Api; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Swagger\Server\Model\Order; **use maparray<string,int>;** use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; UserApiInterface.php public function createUsersWithArrayInput(**User[]** $body); public function createUsersWithListInput(User[] $body); As far as I know, it is not possible to use array of objects in this way. PetApiInterface.php namespace Swagger\Server\Api; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Swagger\Server\Model\Pet; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; use Swagger\Server\Model\ApiResponse; **use string[];** use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; public function findPetsByStatus(string[] $status); public function findPetsByTags(string[] $tags);
- Loading branch information
Nael Rashdeen
committed
Sep 27, 2017
1 parent
28a3206
commit 92a6ea3
Showing
6 changed files
with
134 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
modules/swagger-codegen/src/main/resources/php-symfony/model_generic.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters