Skip to content

Commit

Permalink
[PHP][Lumen] Rename template folder (#2707)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ackintosh authored and wing328 committed Apr 22, 2019
1 parent 1e4f4ab commit 22f7cec
Show file tree
Hide file tree
Showing 37 changed files with 51 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion bin/php-lumen-petstore-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public String getHelp() {
public PhpLumenServerCodegen() {
super();

embeddedTemplateDir = templateDir = "lumen";
embeddedTemplateDir = templateDir = "php-lumen";

/*
* packPath
Expand Down
Original file line number Diff line number Diff line change
@@ -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 ?');
}
}

0 comments on commit 22f7cec

Please sign in to comment.