diff --git a/bin/lumen-petstore-server.sh b/bin/lumen-petstore-server.sh index 15acb2fe2bd3..a4a5df0f817d 100755 --- a/bin/lumen-petstore-server.sh +++ b/bin/lumen-petstore-server.sh @@ -26,6 +26,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/swagger-codegen/src/main/resources/lumen -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l lumen -o samples/server/petstore/lumen" +ags="$@ generate -t modules/swagger-codegen/src/main/resources/lumen -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l lumen -o samples/server/petstore/lumen" java $JAVA_OPTS -jar $executable $ags diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/LumenServerCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/LumenServerCodegen.java index fbd98c034df0..abc747435bf8 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/LumenServerCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/LumenServerCodegen.java @@ -9,9 +9,20 @@ import java.io.File; public class LumenServerCodegen extends DefaultCodegen implements CodegenConfig { // source folder where to write the files - protected String sourceFolder = "src"; - protected String apiVersion = "1.0.0"; + protected String sourceFolder = ""; + public static final String SRC_BASE_PATH = "srcBasePath"; + public static final String COMPOSER_VENDOR_NAME = "composerVendorName"; + public static final String COMPOSER_PROJECT_NAME = "composerProjectName"; + protected String invokerPackage = "Swagger\\Client"; + protected String composerVendorName = null; + protected String composerProjectName = null; + protected String packagePath = "SwaggerClient-php"; + protected String artifactVersion = null; + protected String srcBasePath = "lib"; + protected String apiVersion = "1.0.0"; + protected String apiDirName = "Api"; + /** * Configures the type of generator. * @@ -46,13 +57,8 @@ public class LumenServerCodegen extends DefaultCodegen implements CodegenConfig super(); // set the output folder here - outputFolder = "generated-code/lumen"; - String packagePath = "lumen"; - - // modelPackage = packagePath + "\\lib\\Models"; - // apiPackage = packagePath + "\\lib"; - // // outputFolder = "generated-code" + File.separator + "slim"; - // modelTemplateFiles.put("model.mustache", ".php"); + outputFolder = "lumen"; + String packagePath = ""; /** * Models. You can write model files using the modelTemplateFiles map. @@ -75,7 +81,8 @@ public class LumenServerCodegen extends DefaultCodegen implements CodegenConfig // no api files - apiTemplateFiles.clear(); + // apiTemplateFiles.clear(); + apiTemplateFiles.put("api.mustache", ".php"); // embeddedTemplateDir = templateDir = "slim"; @@ -115,43 +122,18 @@ public class LumenServerCodegen extends DefaultCodegen implements CodegenConfig * entire object tree available. If the input file has a suffix of `.mustache * it will be processed by the template engine. Otherwise, it will be copied */ - // supportingFiles.add(new SupportingFile("index.mustache", packagePath, "index.php")); - // supportingFiles.add(new SupportingFile("routes.mustache", packagePath, "routes.php")); - - supportingFiles.add(new SupportingFile("composer.json", packagePath, "composer.json")); + supportingFiles.add(new SupportingFile("composer.mustache", packagePath, "composer.json")); supportingFiles.add(new SupportingFile("readme.md", packagePath, "readme.md")); - supportingFiles.add(new SupportingFile("artisan", packagePath, "artisan")); - // supportingFiles.add(new SupportingFile("server.php", packagePath, "server.php")); - - supportingFiles.add(new SupportingFile("bootstrap" + File.separator + "app.php", packagePath + File.separator + "bootstrap", "app.php")); - - supportingFiles.add(new SupportingFile("public" + File.separator + "index.php", packagePath + File.separator + "public", "index.php")); - - supportingFiles.add(new SupportingFile("app" + File.separator + "User.php", packagePath + File.separator + "app", "User.php")); - supportingFiles.add(new SupportingFile("app" + File.separator + "Console" + File.separator + "Kernel.php", packagePath + File.separator + "app" + File.separator + "Console", "Kernel.php")); - supportingFiles.add(new SupportingFile("app" + File.separator + "Exceptions" + File.separator + "Handler.php", packagePath + File.separator + "app" + File.separator + "Exceptions", "Handler.php")); - // supportingFiles.add(new SupportingFile("app" + File.separator + "Http" + File.separator + "Kernel.php", packagePath + File.separator + "app" + File.separator + "Http", "Kernel.php")); - supportingFiles.add(new SupportingFile("app" + File.separator + "Http" + File.separator + "routes.mustache", packagePath + File.separator + "app" + File.separator + "Http", "routes.php")); + supportingFiles.add(new SupportingFile("app.php", packagePath + File.separator + "bootstrap", "app.php")); + supportingFiles.add(new SupportingFile("index.php", packagePath + File.separator + "public", "index.php")); + supportingFiles.add(new SupportingFile("User.php", packagePath + File.separator + "app", "User.php")); + supportingFiles.add(new SupportingFile("Kernel.php", packagePath + File.separator + "app" + File.separator + "Console", "Kernel.php")); + supportingFiles.add(new SupportingFile("Handler.php", packagePath + File.separator + "app" + File.separator + "Exceptions", "Handler.php")); + supportingFiles.add(new SupportingFile("routes.mustache", packagePath + File.separator + "app" + File.separator + "Http", "routes.php")); - supportingFiles.add(new SupportingFile("app" + File.separator + "Http" + File.separator + "Controllers" + File.separator + "Controller.php", packagePath + File.separator + "app" + File.separator + "Http" + File.separator + "Controllers" + File.separator, "Controller.php")); - supportingFiles.add(new SupportingFile("app" + File.separator + "Http" + File.separator + "Controllers" + File.separator + "ExampleController.php", packagePath + File.separator + "app" + File.separator + "Http" + File.separator + "Controllers" + File.separator, "ExampleController.php")); - // supportingFiles.add(new SupportingFile("app" + File.separator + "Http" + File.separator + "Controllers" + File.separator + "Auth" + File.separator + "AuthController.php", packagePath + File.separator + "app" + File.separator + "Http" + File.separator + "Controllers" + File.separator + "Auth" + File.separator, "AuthController.php")); - // supportingFiles.add(new SupportingFile("app" + File.separator + "Http" + File.separator + "Controllers" + File.separator + "Auth" + File.separator + "PasswordController.php", packagePath + File.separator + "app" + File.separator + "Http" + File.separator + "Controllers" + File.separator + "Auth" + File.separator, "PasswordController.php")); + supportingFiles.add(new SupportingFile("Controller.php", packagePath + File.separator + "app" + File.separator + "Http" + File.separator + "Controllers" + File.separator, "Controller.php")); + supportingFiles.add(new SupportingFile("Authenticate.php", packagePath + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware" + File.separator, "Authenticate.php")); - supportingFiles.add(new SupportingFile("app" + File.separator + "Http" + File.separator + "Middleware" + File.separator + "Authenticate.php", packagePath + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware" + File.separator, "Authenticate.php")); - supportingFiles.add(new SupportingFile("app" + File.separator + "Http" + File.separator + "Middleware" + File.separator + "ExampleMiddleware.php", packagePath + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware" + File.separator, "ExampleMiddleware.php")); - // supportingFiles.add(new SupportingFile("app" + File.separator + "Http" + File.separator + "Middleware" + File.separator + "RedirectIfAuthenticated.php", packagePath + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware" + File.separator, "RedirectIfAuthenticated.php")); - // supportingFiles.add(new SupportingFile("app" + File.separator + "Http" + File.separator + "Middleware" + File.separator + "VerifyCsrfToken.php", packagePath + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware" + File.separator, "VerifyCsrfToken.php")); - - // supportingFiles.add(new SupportingFile("app" + File.separator + "Http" + File.separator + "Requests" + File.separator + "Request.php", packagePath + File.separator + "app" + File.separator + "Http" + File.separator + "Requests" + File.separator, "Request.php")); - - supportingFiles.add(new SupportingFile("app" + File.separator + "Providers" + File.separator + "AppServiceProvider.php", packagePath + File.separator + "app" + File.separator + "Providers", "AppServiceProvider.php")); - supportingFiles.add(new SupportingFile("app" + File.separator + "Providers" + File.separator + "AuthServiceProvider.php", packagePath + File.separator + "app" + File.separator + "Providers", "AuthServiceProvider.php")); - supportingFiles.add(new SupportingFile("app" + File.separator + "Providers" + File.separator + "EventServiceProvider.php", packagePath + File.separator + "app" + File.separator + "Providers", "EventServiceProvider.php")); - // supportingFiles.add(new SupportingFile("app" + File.separator + "Providers" + File.separator + "RouteServiceProvider.php", packagePath + File.separator + "app" + File.separator + "Providers", "RouteServiceProvider.php")); - - // supportingFiles.add(new SupportingFile("config" + File.separator + "app.php", packagePath + File.separator + "config" + File.separator, "app.php")); - /** * Language Specific Primitives. These types will not trigger imports by * the client generator @@ -188,7 +170,8 @@ public class LumenServerCodegen extends DefaultCodegen implements CodegenConfig */ @Override public String apiFileFolder() { - return outputFolder + "/" + sourceFolder + "/" + apiPackage().replace('.', File.separatorChar); + return outputFolder + "/app/Http/controllers"; + // return outputFolder + "/" + sourceFolder + "/" + apiPackage().replace('.', File.separatorChar); } /** diff --git a/modules/swagger-codegen/src/main/resources/lumen/app/Http/Middleware/Authenticate.php b/modules/swagger-codegen/src/main/resources/lumen/Authenticate.php similarity index 55% rename from modules/swagger-codegen/src/main/resources/lumen/app/Http/Middleware/Authenticate.php rename to modules/swagger-codegen/src/main/resources/lumen/Authenticate.php index 361a11eecd00..cbf5998f4126 100644 --- a/modules/swagger-codegen/src/main/resources/lumen/app/Http/Middleware/Authenticate.php +++ b/modules/swagger-codegen/src/main/resources/lumen/Authenticate.php @@ -1,5 +1,23 @@ licenseInfo}} + +namespace App\Http\Controllers; + +use Illuminate\Support\Facades\Request; + +{{#operations}}class {{classname}} extends Controller +{ + /** + * Constructor + */ + public function __construct() + { + } + + {{#operation}} + /** + * Operation {{{operationId}}} + * + * {{{summary}}}. + * + {{#pathParams}} * @param {{dataType}} ${{paramName}} {{description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} + {{/pathParams}} * + * @return Http response + */ + public function {{operationId}}({{#pathParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}) + { + $input = Request::all(); + + //path params validation + {{#pathParams}} + {{#hasValidation}} + {{#maxLength}} + if (strlen(${{paramName}}]) > {{maxLength}}) { + throw new \InvalidArgumentException('invalid length for ${{paramName}} when calling {{classname}}.{{operationId}}, must be smaller than or equal to {{maxLength}}.'); + } + {{/maxLength}} + {{#minLength}} + if (strlen(${{paramName}}]) < {{minLength}}) { + throw new \InvalidArgumentException('invalid length for ${{paramName}} when calling {{classname}}.{{operationId}}, must be bigger than or equal to {{minLength}}.'); + } + {{/minLength}} + {{#maximum}} + if (${{paramName}}] > {{maximum}}) { + throw new \InvalidArgumentException('invalid value for ${{paramName}} when calling {{classname}}.{{operationId}}, must be smaller than or equal to {{maximum}}.'); + } + {{/maximum}} + {{#minimum}} + if (${{paramName}}] < {{minimum}}) { + throw new \InvalidArgumentException('invalid value for ${{paramName}} when calling {{classname}}.{{operationId}}, must be bigger than or equal to {{minimum}}.'); + } + {{/minimum}} + {{#pattern}} + if (!preg_match("{{pattern}}", ${{paramName}}])) { + throw new \InvalidArgumentException('invalid value for ${{paramName}} when calling {{classname}}.{{operationId}}, must conform to the pattern {{pattern}}.'); + } + {{/pattern}} + {{/hasValidation}} + {{/pathParams}} + + + //not path params validation + {{#allParams}} + {{^pathParams}} + {{#required}} + if (!isset($input['{{paramName}}'])) { + throw new \InvalidArgumentException('Missing the required parameter ${{paramName}} when calling {{operationId}}'); + } + {{/required}} + {{#hasValidation}} + {{#maxLength}} + if (strlen($input['{{paramName}}']) > {{maxLength}}) { + throw new \InvalidArgumentException('invalid length for ${{paramName}} when calling {{classname}}.{{operationId}}, must be smaller than or equal to {{maxLength}}.'); + } + {{/maxLength}} + {{#minLength}} + if (strlen($input['{{paramName}}']) < {{minLength}}) { + throw new \InvalidArgumentException('invalid length for ${{paramName}} when calling {{classname}}.{{operationId}}, must be bigger than or equal to {{minLength}}.'); + } + {{/minLength}} + {{#maximum}} + if ($input['{{paramName}}'] > {{maximum}}) { + throw new \InvalidArgumentException('invalid value for ${{paramName}} when calling {{classname}}.{{operationId}}, must be smaller than or equal to {{maximum}}.'); + } + {{/maximum}} + {{#minimum}} + if ($input['{{paramName}}'] < {{minimum}}) { + throw new \InvalidArgumentException('invalid value for ${{paramName}} when calling {{classname}}.{{operationId}}, must be bigger than or equal to {{minimum}}.'); + } + {{/minimum}} + {{#pattern}} + if (!preg_match("{{pattern}}", $input['{{paramName}}'])) { + throw new \InvalidArgumentException('invalid value for ${{paramName}} when calling {{classname}}.{{operationId}}, must conform to the pattern {{pattern}}.'); + } + {{/pattern}} + {{/hasValidation}} + ${{paramName}} = $input['{{paramName}}']; + + {{/pathParams}} + {{/allParams}} + + return response('How about implementing {{nickname}} as a {{httpMethod}} method ?'); + } + {{/operation}} +} +{{/operations}} diff --git a/modules/swagger-codegen/src/main/resources/lumen/bootstrap/app.php b/modules/swagger-codegen/src/main/resources/lumen/app.php similarity index 79% rename from modules/swagger-codegen/src/main/resources/lumen/bootstrap/app.php rename to modules/swagger-codegen/src/main/resources/lumen/app.php index 9bc334dd8866..2811ed03ef94 100644 --- a/modules/swagger-codegen/src/main/resources/lumen/bootstrap/app.php +++ b/modules/swagger-codegen/src/main/resources/lumen/app.php @@ -1,5 +1,23 @@ withFacades(); +$app->withFacades(); // $app->withEloquent(); @@ -48,8 +66,6 @@ $app->singleton( App\Console\Kernel::class ); -class_alias('Illuminate\Support\Facades\Request', 'Request'); //to use the Reqesut facade - /* |-------------------------------------------------------------------------- | Register Middleware diff --git a/modules/swagger-codegen/src/main/resources/lumen/app/Console/Commands/.gitkeep b/modules/swagger-codegen/src/main/resources/lumen/app/Console/Commands/.gitkeep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/modules/swagger-codegen/src/main/resources/lumen/app/Console/Kernel.php b/modules/swagger-codegen/src/main/resources/lumen/app/Console/Kernel.php deleted file mode 100644 index ad6e311cdd04..000000000000 --- a/modules/swagger-codegen/src/main/resources/lumen/app/Console/Kernel.php +++ /dev/null @@ -1,29 +0,0 @@ -get('/', function () use ($app) { - return $app->version(); -}); - -{{#apis}}{{#operations}}{{#operation}} -/** - * {{httpMethod}} {{nickname}} - * Summary: {{summary}} - * Notes: {{notes}} -{{#hasProduces}} * Output-Formats: [{{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}]{{/hasProduces}} - */ -$app->{{httpMethod}}('{{path}}', function({{#pathParams}}${{paramName}}, {{/pathParams}}$null = null) use ($app) { - {{#hasHeaderParams}}$headers = Request::header();{{/hasHeaderParams}} - {{#hasQueryParams}}{{#queryParams}}${{paramName}} = Request::input('{{paramName}}');{{newline}} - {{/queryParams}}{{/hasQueryParams}} - {{#hasFormParams}}{{#formParams}}${{paramName}} = Request::input('{{paramName}}');{{newline}} {{/formParams}}{{/hasFormParams}} - - return response('How about implementing {{nickname}} as a {{httpMethod}} method ?'); - }); - -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} - diff --git a/modules/swagger-codegen/src/main/resources/lumen/app/Providers/AppServiceProvider.php b/modules/swagger-codegen/src/main/resources/lumen/app/Providers/AppServiceProvider.php deleted file mode 100644 index ddec04694c37..000000000000 --- a/modules/swagger-codegen/src/main/resources/lumen/app/Providers/AppServiceProvider.php +++ /dev/null @@ -1,18 +0,0 @@ -input('api_token')) { - return User::where('api_token', $request->input('api_token'))->first(); - } - }); - } -} diff --git a/modules/swagger-codegen/src/main/resources/lumen/app/Providers/EventServiceProvider.php b/modules/swagger-codegen/src/main/resources/lumen/app/Providers/EventServiceProvider.php deleted file mode 100644 index 0b8f3934fb3c..000000000000 --- a/modules/swagger-codegen/src/main/resources/lumen/app/Providers/EventServiceProvider.php +++ /dev/null @@ -1,19 +0,0 @@ - [ - 'App\Listeners\EventListener', - ], - ]; -} diff --git a/modules/swagger-codegen/src/main/resources/lumen/app/User.php b/modules/swagger-codegen/src/main/resources/lumen/app/User.php deleted file mode 100644 index fd4de31172cf..000000000000 --- a/modules/swagger-codegen/src/main/resources/lumen/app/User.php +++ /dev/null @@ -1,34 +0,0 @@ -=5.5.9", - "laravel/lumen-framework": "5.2.*", - "vlucas/phpdotenv": "~2.2" - }, - "autoload": { - "psr-4": { - "App\\": "app/" - } - } -} diff --git a/modules/swagger-codegen/src/main/resources/lumen/composer.mustache b/modules/swagger-codegen/src/main/resources/lumen/composer.mustache new file mode 100644 index 000000000000..c3ae9fddfbf1 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/lumen/composer.mustache @@ -0,0 +1,31 @@ +{ + "name": "{{#composerVendorName}}{{.}}{{/composerVendorName}}{{^composerVendorName}}{{gitUserId}}{{/composerVendorName}}/{{#composerProjectName}}{{.}}{{/composerProjectName}}{{^composerProjectName}}{{gitRepoId}}{{/composerProjectName}}", + {{#artifactVersion}} + "version": "{{artifactVersion}}", + {{/artifactVersion}} + "description": "{{description}}", + "keywords": [ + "swagger", + "php", + "sdk", + "api" + ], + "homepage": "http://swagger.io", + "license": "Apache v2", + "authors": [ + { + "name": "Swagger and contributors", + "homepage": "https://github.com/swagger-api/swagger-codegen" + } + ], + "require": { + "php": ">=5.5.9", + "laravel/lumen-framework": "5.2.*", + "vlucas/phpdotenv": "~2.2" + }, + "autoload": { + "psr-4": { + "App\\": "app/" + } + } +} diff --git a/samples/server/petstore/lumen/lumen/public/index.php b/modules/swagger-codegen/src/main/resources/lumen/index.php similarity index 55% rename from samples/server/petstore/lumen/lumen/public/index.php rename to modules/swagger-codegen/src/main/resources/lumen/index.php index 04aa08688e00..3fc941322319 100644 --- a/samples/server/petstore/lumen/lumen/public/index.php +++ b/modules/swagger-codegen/src/main/resources/lumen/index.php @@ -1,5 +1,23 @@ - - Options -MultiViews - - - RewriteEngine On - - # Redirect Trailing Slashes If Not A Folder... - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^(.*)/$ /$1 [L,R=301] - - # Handle Front Controller... - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^ index.php [L] - diff --git a/modules/swagger-codegen/src/main/resources/lumen/readme.md b/modules/swagger-codegen/src/main/resources/lumen/readme.md index 9605e5f3f459..c146781b7ae8 100644 --- a/modules/swagger-codegen/src/main/resources/lumen/readme.md +++ b/modules/swagger-codegen/src/main/resources/lumen/readme.md @@ -1,21 +1,16 @@ -## Lumen PHP Framework +# Swagger generated server -[![Build Status](https://travis-ci.org/laravel/lumen-framework.svg)](https://travis-ci.org/laravel/lumen-framework) -[![Total Downloads](https://poser.pugx.org/laravel/lumen-framework/d/total.svg)](https://packagist.org/packages/laravel/lumen-framework) -[![Latest Stable Version](https://poser.pugx.org/laravel/lumen-framework/v/stable.svg)](https://packagist.org/packages/laravel/lumen-framework) -[![Latest Unstable Version](https://poser.pugx.org/laravel/lumen-framework/v/unstable.svg)](https://packagist.org/packages/laravel/lumen-framework) -[![License](https://poser.pugx.org/laravel/lumen-framework/license.svg)](https://packagist.org/packages/laravel/lumen-framework) +## Overview +This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the +[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This +is an example of building a PHP server. -Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Lumen attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as routing, database abstraction, queueing, and caching. +This example uses the [Lumen Framework](http://lumen.laravel.com/). To see how to make this your own, please take a look at the template here: -## Official Documentation +[TEMPLATES](https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/resources/slim/) -Documentation for the framework can be found on the [Lumen website](http://lumen.laravel.com/docs). +## Installation & Usage +### Composer -## Security Vulnerabilities +Using `composer install` to install the framework and dependencies via [Composer](http://getcomposer.org/). -If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed. - -### License - -The Lumen framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT) diff --git a/modules/swagger-codegen/src/main/resources/lumen/routes.mustache b/modules/swagger-codegen/src/main/resources/lumen/routes.mustache index 3d91b32c8e49..c5f3bdf858ac 100644 --- a/modules/swagger-codegen/src/main/resources/lumen/routes.mustache +++ b/modules/swagger-codegen/src/main/resources/lumen/routes.mustache @@ -1,4 +1,6 @@ licenseInfo}} {{#apiInfo}}/** * {{appName}} * @version {{appVersion}} @@ -8,21 +10,18 @@ $app->get('/', function () use ($app) { return $app->version(); }); -{{#apis}}{{#operations}}{{#operation}} +{{#apis}} +{{#operations}} +{{#operation}} /** * {{httpMethod}} {{nickname}} * Summary: {{summary}} * Notes: {{notes}} {{#hasProduces}} * Output-Formats: [{{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}]{{/hasProduces}} */ -Route::{{httpMethod}}('{{path}}', function({{#pathParams}}${{paramName}}, {{/pathParams}}null) use ($app) { - {{#hasHeaderParams}}$headers = Request::header();{{/hasHeaderParams}} - {{#hasQueryParams}}{{#queryParams}}${{paramName}} = Request::input('{{paramName}}');{{newline}} - {{/queryParams}}{{/hasQueryParams}} - {{#hasFormParams}}{{#formParams}}${{paramName}} = Request::input('{{paramName}}');{{newline}} {{/formParams}}{{/hasFormParams}} - - return response('How about implementing {{nickname}} as a {{httpMethod}} method ?'); - }); - -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} +$app->{{httpMethod}}('{{path}}', '{{classname}}@{{operationId}}'); +{{/operation}} +{{/operations}} +{{/apis}} +{{/apiInfo}} diff --git a/modules/swagger-codegen/src/main/resources/lumen/storage/app/.gitignore b/modules/swagger-codegen/src/main/resources/lumen/storage/app/.gitignore deleted file mode 100644 index d6b7ef32c847..000000000000 --- a/modules/swagger-codegen/src/main/resources/lumen/storage/app/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/modules/swagger-codegen/src/main/resources/lumen/storage/framework/views/.gitignore b/modules/swagger-codegen/src/main/resources/lumen/storage/framework/views/.gitignore deleted file mode 100644 index d6b7ef32c847..000000000000 --- a/modules/swagger-codegen/src/main/resources/lumen/storage/framework/views/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/modules/swagger-codegen/src/main/resources/lumen/storage/logs/.gitignore b/modules/swagger-codegen/src/main/resources/lumen/storage/logs/.gitignore deleted file mode 100644 index d6b7ef32c847..000000000000 --- a/modules/swagger-codegen/src/main/resources/lumen/storage/logs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/modules/swagger-codegen/src/main/resources/lumen/tests/ExampleTest.php b/modules/swagger-codegen/src/main/resources/lumen/tests/ExampleTest.php deleted file mode 100644 index 2b206c66173e..000000000000 --- a/modules/swagger-codegen/src/main/resources/lumen/tests/ExampleTest.php +++ /dev/null @@ -1,20 +0,0 @@ -get('/'); - - $this->assertEquals( - $this->response->getContent(), $this->app->version() - ); - } -} diff --git a/modules/swagger-codegen/src/main/resources/lumen/tests/TestCase.php b/modules/swagger-codegen/src/main/resources/lumen/tests/TestCase.php deleted file mode 100644 index 651d9cbd67f3..000000000000 --- a/modules/swagger-codegen/src/main/resources/lumen/tests/TestCase.php +++ /dev/null @@ -1,14 +0,0 @@ - 543.2) { + throw new \InvalidArgumentException('invalid value for $number when calling FakeApi.testEndpointParameters, must be smaller than or equal to 543.2.'); + } + if ($input['number'] < 32.1) { + throw new \InvalidArgumentException('invalid value for $number when calling FakeApi.testEndpointParameters, must be bigger than or equal to 32.1.'); + } + $number = $input['number']; + + if (!isset($input['double'])) { + throw new \InvalidArgumentException('Missing the required parameter $double when calling testEndpointParameters'); + } + if ($input['double'] > 123.4) { + throw new \InvalidArgumentException('invalid value for $double when calling FakeApi.testEndpointParameters, must be smaller than or equal to 123.4.'); + } + if ($input['double'] < 67.8) { + throw new \InvalidArgumentException('invalid value for $double when calling FakeApi.testEndpointParameters, must be bigger than or equal to 67.8.'); + } + $double = $input['double']; + + if (!isset($input['string'])) { + throw new \InvalidArgumentException('Missing the required parameter $string when calling testEndpointParameters'); + } + if (!preg_match("/[a-z]/i", $input['string'])) { + throw new \InvalidArgumentException('invalid value for $string when calling FakeApi.testEndpointParameters, must conform to the pattern /[a-z]/i.'); + } + $string = $input['string']; + + if (!isset($input['byte'])) { + throw new \InvalidArgumentException('Missing the required parameter $byte when calling testEndpointParameters'); + } + $byte = $input['byte']; + + if ($input['integer'] > 100.0) { + throw new \InvalidArgumentException('invalid value for $integer when calling FakeApi.testEndpointParameters, must be smaller than or equal to 100.0.'); + } + if ($input['integer'] < 10.0) { + throw new \InvalidArgumentException('invalid value for $integer when calling FakeApi.testEndpointParameters, must be bigger than or equal to 10.0.'); + } + $integer = $input['integer']; + + if ($input['int32'] > 200.0) { + throw new \InvalidArgumentException('invalid value for $int32 when calling FakeApi.testEndpointParameters, must be smaller than or equal to 200.0.'); + } + if ($input['int32'] < 20.0) { + throw new \InvalidArgumentException('invalid value for $int32 when calling FakeApi.testEndpointParameters, must be bigger than or equal to 20.0.'); + } + $int32 = $input['int32']; + + $int64 = $input['int64']; + + if ($input['float'] > 987.6) { + throw new \InvalidArgumentException('invalid value for $float when calling FakeApi.testEndpointParameters, must be smaller than or equal to 987.6.'); + } + $float = $input['float']; + + $binary = $input['binary']; + + $date = $input['date']; + + $dateTime = $input['dateTime']; + + if (strlen($input['password']) > 64) { + throw new \InvalidArgumentException('invalid length for $password when calling FakeApi.testEndpointParameters, must be smaller than or equal to 64.'); + } + if (strlen($input['password']) < 10) { + throw new \InvalidArgumentException('invalid length for $password when calling FakeApi.testEndpointParameters, must be bigger than or equal to 10.'); + } + $password = $input['password']; + + + return response('How about implementing testEndpointParameters as a POST method ?'); + } +} diff --git a/samples/server/petstore/lumen/app/Http/controllers/PetApi.php b/samples/server/petstore/lumen/app/Http/controllers/PetApi.php new file mode 100644 index 000000000000..dd6a838eaef1 --- /dev/null +++ b/samples/server/petstore/lumen/app/Http/controllers/PetApi.php @@ -0,0 +1,217 @@ + 5.0) { + throw new \InvalidArgumentException('invalid value for $orderId when calling StoreApi.getOrderById, must be smaller than or equal to 5.0.'); + } + if ($orderId] < 1.0) { + throw new \InvalidArgumentException('invalid value for $orderId when calling StoreApi.getOrderById, must be bigger than or equal to 1.0.'); + } + + + //not path params validation + + return response('How about implementing getOrderById as a GET method ?'); + } + /** + * Operation placeOrder + * + * Place an order for a pet. + * + * + * @return Http response + */ + public function placeOrder() + { + $input = Request::all(); + + //path params validation + + + //not path params validation + if (!isset($input['body'])) { + throw new \InvalidArgumentException('Missing the required parameter $body when calling placeOrder'); + } + $body = $input['body']; + + + return response('How about implementing placeOrder as a POST method ?'); + } +} diff --git a/samples/server/petstore/lumen/app/Http/controllers/UserApi.php b/samples/server/petstore/lumen/app/Http/controllers/UserApi.php new file mode 100644 index 000000000000..f9ade75e98a4 --- /dev/null +++ b/samples/server/petstore/lumen/app/Http/controllers/UserApi.php @@ -0,0 +1,221 @@ +get('/', function () use ($app) { + return $app->version(); +}); + +/** + * POST testEndpointParameters + * Summary: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Notes: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Output-Formats: [application/xml; charset=utf-8, application/json; charset=utf-8] + */ +$app->POST('/fake', 'FakeApi@testEndpointParameters'); +/** + * POST addPet + * Summary: Add a new pet to the store + * Notes: + * Output-Formats: [application/xml, application/json] + */ +$app->POST('/pet', 'PetApi@addPet'); +/** + * DELETE deletePet + * Summary: Deletes a pet + * Notes: + * Output-Formats: [application/xml, application/json] + */ +$app->DELETE('/pet/{petId}', 'PetApi@deletePet'); +/** + * GET findPetsByStatus + * Summary: Finds Pets by status + * Notes: Multiple status values can be provided with comma separated strings + * Output-Formats: [application/xml, application/json] + */ +$app->GET('/pet/findByStatus', 'PetApi@findPetsByStatus'); +/** + * GET findPetsByTags + * Summary: Finds Pets by tags + * Notes: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * Output-Formats: [application/xml, application/json] + */ +$app->GET('/pet/findByTags', 'PetApi@findPetsByTags'); +/** + * GET getPetById + * Summary: Find pet by ID + * Notes: Returns a single pet + * Output-Formats: [application/xml, application/json] + */ +$app->GET('/pet/{petId}', 'PetApi@getPetById'); +/** + * PUT updatePet + * Summary: Update an existing pet + * Notes: + * Output-Formats: [application/xml, application/json] + */ +$app->PUT('/pet', 'PetApi@updatePet'); +/** + * POST updatePetWithForm + * Summary: Updates a pet in the store with form data + * Notes: + * Output-Formats: [application/xml, application/json] + */ +$app->POST('/pet/{petId}', 'PetApi@updatePetWithForm'); +/** + * POST uploadFile + * Summary: uploads an image + * Notes: + * Output-Formats: [application/json] + */ +$app->POST('/pet/{petId}/uploadImage', 'PetApi@uploadFile'); +/** + * DELETE deleteOrder + * Summary: Delete purchase order by ID + * Notes: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * Output-Formats: [application/xml, application/json] + */ +$app->DELETE('/store/order/{orderId}', 'StoreApi@deleteOrder'); +/** + * GET getInventory + * Summary: Returns pet inventories by status + * Notes: Returns a map of status codes to quantities + * Output-Formats: [application/json] + */ +$app->GET('/store/inventory', 'StoreApi@getInventory'); +/** + * GET getOrderById + * Summary: Find purchase order by ID + * Notes: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * Output-Formats: [application/xml, application/json] + */ +$app->GET('/store/order/{orderId}', 'StoreApi@getOrderById'); +/** + * POST placeOrder + * Summary: Place an order for a pet + * Notes: + * Output-Formats: [application/xml, application/json] + */ +$app->POST('/store/order', 'StoreApi@placeOrder'); +/** + * POST createUser + * Summary: Create user + * Notes: This can only be done by the logged in user. + * Output-Formats: [application/xml, application/json] + */ +$app->POST('/user', 'UserApi@createUser'); +/** + * POST createUsersWithArrayInput + * Summary: Creates list of users with given input array + * Notes: + * Output-Formats: [application/xml, application/json] + */ +$app->POST('/user/createWithArray', 'UserApi@createUsersWithArrayInput'); +/** + * POST createUsersWithListInput + * Summary: Creates list of users with given input array + * Notes: + * Output-Formats: [application/xml, application/json] + */ +$app->POST('/user/createWithList', 'UserApi@createUsersWithListInput'); +/** + * DELETE deleteUser + * Summary: Delete user + * Notes: This can only be done by the logged in user. + * Output-Formats: [application/xml, application/json] + */ +$app->DELETE('/user/{username}', 'UserApi@deleteUser'); +/** + * GET getUserByName + * Summary: Get user by user name + * Notes: + * Output-Formats: [application/xml, application/json] + */ +$app->GET('/user/{username}', 'UserApi@getUserByName'); +/** + * GET loginUser + * Summary: Logs user into the system + * Notes: + * Output-Formats: [application/xml, application/json] + */ +$app->GET('/user/login', 'UserApi@loginUser'); +/** + * GET logoutUser + * Summary: Logs out current logged in user session + * Notes: + * Output-Formats: [application/xml, application/json] + */ +$app->GET('/user/logout', 'UserApi@logoutUser'); +/** + * PUT updateUser + * Summary: Updated user + * Notes: This can only be done by the logged in user. + * Output-Formats: [application/xml, application/json] + */ +$app->PUT('/user/{username}', 'UserApi@updateUser'); + diff --git a/samples/server/petstore/lumen/app/User.php b/samples/server/petstore/lumen/app/User.php new file mode 100644 index 000000000000..df7e66efc044 --- /dev/null +++ b/samples/server/petstore/lumen/app/User.php @@ -0,0 +1,52 @@ +withFacades(); +$app->withFacades(); // $app->withEloquent(); @@ -48,8 +66,6 @@ $app->singleton( App\Console\Kernel::class ); -class_alias('Illuminate\Support\Facades\Request', 'Request'); //to use the Reqesut facade - /* |-------------------------------------------------------------------------- | Register Middleware diff --git a/samples/server/petstore/lumen/composer.json b/samples/server/petstore/lumen/composer.json new file mode 100644 index 000000000000..55559dfaac90 --- /dev/null +++ b/samples/server/petstore/lumen/composer.json @@ -0,0 +1,28 @@ +{ + "name": "GIT_USER_ID/GIT_REPO_ID", + "description": "", + "keywords": [ + "swagger", + "php", + "sdk", + "api" + ], + "homepage": "http://swagger.io", + "license": "Apache v2", + "authors": [ + { + "name": "Swagger and contributors", + "homepage": "https://github.com/swagger-api/swagger-codegen" + } + ], + "require": { + "php": ">=5.5.9", + "laravel/lumen-framework": "5.2.*", + "vlucas/phpdotenv": "~2.2" + }, + "autoload": { + "psr-4": { + "App\\": "app/" + } + } +} diff --git a/samples/server/petstore/lumen/lumen/app/Console/Kernel.php b/samples/server/petstore/lumen/lumen/app/Console/Kernel.php deleted file mode 100644 index ad6e311cdd04..000000000000 --- a/samples/server/petstore/lumen/lumen/app/Console/Kernel.php +++ /dev/null @@ -1,29 +0,0 @@ -get('/', function () use ($app) { - return $app->version(); -}); - - -/** - * POST addPet - * Summary: Add a new pet to the store - * Notes: - * Output-Formats: [application/xml, application/json] - */ -$app->POST('/pet', function($null = null) use ($app) { - - - - - return response('How about implementing addPet as a POST method ?'); - }); - - -/** - * DELETE deletePet - * Summary: Deletes a pet - * Notes: - * Output-Formats: [application/xml, application/json] - */ -$app->DELETE('/pet/{petId}', function($petId, $null = null) use ($app) { - $headers = Request::header(); - - - - return response('How about implementing deletePet as a DELETE method ?'); - }); - - -/** - * GET findPetsByStatus - * Summary: Finds Pets by status - * Notes: Multiple status values can be provided with comma separated strings - * Output-Formats: [application/xml, application/json] - */ -$app->GET('/pet/findByStatus', function($null = null) use ($app) { - - $status = Request::input('status'); - - - - return response('How about implementing findPetsByStatus as a GET method ?'); - }); - - -/** - * GET findPetsByTags - * Summary: Finds Pets by tags - * Notes: Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * Output-Formats: [application/xml, application/json] - */ -$app->GET('/pet/findByTags', function($null = null) use ($app) { - - $tags = Request::input('tags'); - - - - return response('How about implementing findPetsByTags as a GET method ?'); - }); - - -/** - * GET getPetById - * Summary: Find pet by ID - * Notes: Returns a single pet - * Output-Formats: [application/xml, application/json] - */ -$app->GET('/pet/{petId}', function($petId, $null = null) use ($app) { - - - - - return response('How about implementing getPetById as a GET method ?'); - }); - - -/** - * PUT updatePet - * Summary: Update an existing pet - * Notes: - * Output-Formats: [application/xml, application/json] - */ -$app->PUT('/pet', function($null = null) use ($app) { - - - - - return response('How about implementing updatePet as a PUT method ?'); - }); - - -/** - * POST updatePetWithForm - * Summary: Updates a pet in the store with form data - * Notes: - * Output-Formats: [application/xml, application/json] - */ -$app->POST('/pet/{petId}', function($petId, $null = null) use ($app) { - - - $name = Request::input('name'); $status = Request::input('status'); - - return response('How about implementing updatePetWithForm as a POST method ?'); - }); - - -/** - * POST uploadFile - * Summary: uploads an image - * Notes: - * Output-Formats: [application/json] - */ -$app->POST('/pet/{petId}/uploadImage', function($petId, $null = null) use ($app) { - - - $additionalMetadata = Request::input('additionalMetadata'); $file = Request::input('file'); - - return response('How about implementing uploadFile as a POST method ?'); - }); - - -/** - * DELETE deleteOrder - * Summary: Delete purchase order by ID - * Notes: For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors - * Output-Formats: [application/xml, application/json] - */ -$app->DELETE('/store/order/{orderId}', function($orderId, $null = null) use ($app) { - - - - - return response('How about implementing deleteOrder as a DELETE method ?'); - }); - - -/** - * GET getInventory - * Summary: Returns pet inventories by status - * Notes: Returns a map of status codes to quantities - * Output-Formats: [application/json] - */ -$app->GET('/store/inventory', function($null = null) use ($app) { - - - - - return response('How about implementing getInventory as a GET method ?'); - }); - - -/** - * GET getOrderById - * Summary: Find purchase order by ID - * Notes: For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions - * Output-Formats: [application/xml, application/json] - */ -$app->GET('/store/order/{orderId}', function($orderId, $null = null) use ($app) { - - - - - return response('How about implementing getOrderById as a GET method ?'); - }); - - -/** - * POST placeOrder - * Summary: Place an order for a pet - * Notes: - * Output-Formats: [application/xml, application/json] - */ -$app->POST('/store/order', function($null = null) use ($app) { - - - - - return response('How about implementing placeOrder as a POST method ?'); - }); - - -/** - * POST createUser - * Summary: Create user - * Notes: This can only be done by the logged in user. - * Output-Formats: [application/xml, application/json] - */ -$app->POST('/user', function($null = null) use ($app) { - - - - - return response('How about implementing createUser as a POST method ?'); - }); - - -/** - * POST createUsersWithArrayInput - * Summary: Creates list of users with given input array - * Notes: - * Output-Formats: [application/xml, application/json] - */ -$app->POST('/user/createWithArray', function($null = null) use ($app) { - - - - - return response('How about implementing createUsersWithArrayInput as a POST method ?'); - }); - - -/** - * POST createUsersWithListInput - * Summary: Creates list of users with given input array - * Notes: - * Output-Formats: [application/xml, application/json] - */ -$app->POST('/user/createWithList', function($null = null) use ($app) { - - - - - return response('How about implementing createUsersWithListInput as a POST method ?'); - }); - - -/** - * DELETE deleteUser - * Summary: Delete user - * Notes: This can only be done by the logged in user. - * Output-Formats: [application/xml, application/json] - */ -$app->DELETE('/user/{username}', function($username, $null = null) use ($app) { - - - - - return response('How about implementing deleteUser as a DELETE method ?'); - }); - - -/** - * GET getUserByName - * Summary: Get user by user name - * Notes: - * Output-Formats: [application/xml, application/json] - */ -$app->GET('/user/{username}', function($username, $null = null) use ($app) { - - - - - return response('How about implementing getUserByName as a GET method ?'); - }); - - -/** - * GET loginUser - * Summary: Logs user into the system - * Notes: - * Output-Formats: [application/xml, application/json] - */ -$app->GET('/user/login', function($null = null) use ($app) { - - $username = Request::input('username'); - $password = Request::input('password'); - - - - return response('How about implementing loginUser as a GET method ?'); - }); - - -/** - * GET logoutUser - * Summary: Logs out current logged in user session - * Notes: - * Output-Formats: [application/xml, application/json] - */ -$app->GET('/user/logout', function($null = null) use ($app) { - - - - - return response('How about implementing logoutUser as a GET method ?'); - }); - - -/** - * PUT updateUser - * Summary: Updated user - * Notes: This can only be done by the logged in user. - * Output-Formats: [application/xml, application/json] - */ -$app->PUT('/user/{username}', function($username, $null = null) use ($app) { - - - - - return response('How about implementing updateUser as a PUT method ?'); - }); - - - diff --git a/samples/server/petstore/lumen/lumen/app/Providers/AppServiceProvider.php b/samples/server/petstore/lumen/lumen/app/Providers/AppServiceProvider.php deleted file mode 100644 index ddec04694c37..000000000000 --- a/samples/server/petstore/lumen/lumen/app/Providers/AppServiceProvider.php +++ /dev/null @@ -1,18 +0,0 @@ -input('api_token')) { - return User::where('api_token', $request->input('api_token'))->first(); - } - }); - } -} diff --git a/samples/server/petstore/lumen/lumen/app/Providers/EventServiceProvider.php b/samples/server/petstore/lumen/lumen/app/Providers/EventServiceProvider.php deleted file mode 100644 index 0b8f3934fb3c..000000000000 --- a/samples/server/petstore/lumen/lumen/app/Providers/EventServiceProvider.php +++ /dev/null @@ -1,19 +0,0 @@ - [ - 'App\Listeners\EventListener', - ], - ]; -} diff --git a/samples/server/petstore/lumen/lumen/app/User.php b/samples/server/petstore/lumen/lumen/app/User.php deleted file mode 100644 index fd4de31172cf..000000000000 --- a/samples/server/petstore/lumen/lumen/app/User.php +++ /dev/null @@ -1,34 +0,0 @@ -make( - 'Illuminate\Contracts\Console\Kernel' -); - -exit($kernel->handle(new ArgvInput, new ConsoleOutput)); diff --git a/samples/server/petstore/lumen/lumen/composer.json b/samples/server/petstore/lumen/lumen/composer.json deleted file mode 100644 index 62df199e76a7..000000000000 --- a/samples/server/petstore/lumen/lumen/composer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "laravel/lumen", - "description": "The Laravel Lumen Framework.", - "keywords": ["framework", "laravel", "lumen"], - "license": "MIT", - "type": "project", - "require": { - "php": ">=5.5.9", - "laravel/lumen-framework": "5.2.*", - "vlucas/phpdotenv": "~2.2" - }, - "autoload": { - "psr-4": { - "App\\": "app/" - } - } -} diff --git a/samples/server/petstore/lumen/lumen/readme.md b/samples/server/petstore/lumen/lumen/readme.md deleted file mode 100644 index 9605e5f3f459..000000000000 --- a/samples/server/petstore/lumen/lumen/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -## Lumen PHP Framework - -[![Build Status](https://travis-ci.org/laravel/lumen-framework.svg)](https://travis-ci.org/laravel/lumen-framework) -[![Total Downloads](https://poser.pugx.org/laravel/lumen-framework/d/total.svg)](https://packagist.org/packages/laravel/lumen-framework) -[![Latest Stable Version](https://poser.pugx.org/laravel/lumen-framework/v/stable.svg)](https://packagist.org/packages/laravel/lumen-framework) -[![Latest Unstable Version](https://poser.pugx.org/laravel/lumen-framework/v/unstable.svg)](https://packagist.org/packages/laravel/lumen-framework) -[![License](https://poser.pugx.org/laravel/lumen-framework/license.svg)](https://packagist.org/packages/laravel/lumen-framework) - -Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Lumen attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as routing, database abstraction, queueing, and caching. - -## Official Documentation - -Documentation for the framework can be found on the [Lumen website](http://lumen.laravel.com/docs). - -## Security Vulnerabilities - -If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed. - -### License - -The Lumen framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT) diff --git a/modules/swagger-codegen/src/main/resources/lumen/public/index.php b/samples/server/petstore/lumen/public/index.php similarity index 55% rename from modules/swagger-codegen/src/main/resources/lumen/public/index.php rename to samples/server/petstore/lumen/public/index.php index 04aa08688e00..3fc941322319 100644 --- a/modules/swagger-codegen/src/main/resources/lumen/public/index.php +++ b/samples/server/petstore/lumen/public/index.php @@ -1,5 +1,23 @@