[PHP][Lumen] Rename template folder (#2707)

* Rename template folder: lumen -> php-lumen

* Update a folder name for "-t"

* Rename script name: lumen-... -> php-lumen...

* Update templateDir

* Update samples

- ./bin/php-lumen-petstore-server.sh
- ./bin/openapi3/php-lumen-petstore-server.sh

* Update samples

./bin/php-lumen-petstore-server.sh
This commit is contained in:
Akihito Nakano
2019-04-22 12:26:19 +09:00
committed by William Cheng
parent 1e4f4ab9f2
commit 22f7cec552
37 changed files with 51 additions and 3 deletions

View File

@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/lumen -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-lumen -o samples/server/petstore/lumen $@"
ags="generate -t modules/openapi-generator/src/main/resources/php-lumen -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-lumen -o samples/server/petstore/php-lumen $@"
java $JAVA_OPTS -jar $executable $ags

View File

@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/lumen -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-lumen -o samples/server/petstore/php-lumen $@"
ags="generate -t modules/openapi-generator/src/main/resources/php-lumen -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-lumen -o samples/server/petstore/php-lumen $@"
java $JAVA_OPTS -jar $executable $ags

View File

@@ -61,7 +61,7 @@ public class PhpLumenServerCodegen extends AbstractPhpCodegen {
public PhpLumenServerCodegen() {
super();
embeddedTemplateDir = templateDir = "lumen";
embeddedTemplateDir = templateDir = "php-lumen";
/*
* packPath

View File

@@ -0,0 +1,48 @@
<?php
/**
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Request;
class DefaultApi extends Controller
{
/**
* Constructor
*/
public function __construct()
{
}
/**
* Operation fooGet
*
* .
*
*
* @return Http response
*/
public function fooGet()
{
$input = Request::all();
//path params validation
//not path params validation
return response('How about implementing fooGet as a get method ?');
}
}