From 0cf31704cc0ed186c4af2fa101509e90c1e33a8c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 22 Jun 2020 11:01:43 +0800 Subject: [PATCH] remove silex samples, config (#6736) --- .../php-silex-deprecated-OpenAPIServer.yaml | 4 - .../php-silex/.openapi-generator-ignore | 23 ---- .../php-silex/.openapi-generator/VERSION | 1 - .../php-silex/OpenAPIServer/.gitignore | 8 -- .../php-silex/OpenAPIServer/.htaccess | 5 - .../OpenAPIServer/.openapi-generator-ignore | 23 ---- .../OpenAPIServer/.openapi-generator/FILES | 5 - .../OpenAPIServer/.openapi-generator/VERSION | 1 - .../php-silex/OpenAPIServer/README.md | 10 -- .../php-silex/OpenAPIServer/composer.json | 5 - .../php-silex/OpenAPIServer/index.php | 119 ------------------ 11 files changed, 204 deletions(-) delete mode 100644 bin/configs/php-silex-deprecated-OpenAPIServer.yaml delete mode 100644 samples/server/petstore/php-silex/.openapi-generator-ignore delete mode 100644 samples/server/petstore/php-silex/.openapi-generator/VERSION delete mode 100644 samples/server/petstore/php-silex/OpenAPIServer/.gitignore delete mode 100644 samples/server/petstore/php-silex/OpenAPIServer/.htaccess delete mode 100644 samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator-ignore delete mode 100644 samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/FILES delete mode 100644 samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION delete mode 100644 samples/server/petstore/php-silex/OpenAPIServer/README.md delete mode 100644 samples/server/petstore/php-silex/OpenAPIServer/composer.json delete mode 100644 samples/server/petstore/php-silex/OpenAPIServer/index.php diff --git a/bin/configs/php-silex-deprecated-OpenAPIServer.yaml b/bin/configs/php-silex-deprecated-OpenAPIServer.yaml deleted file mode 100644 index 58e4b4fa111..00000000000 --- a/bin/configs/php-silex-deprecated-OpenAPIServer.yaml +++ /dev/null @@ -1,4 +0,0 @@ -generatorName: php-silex-deprecated -outputDir: samples/server/petstore/php-silex/OpenAPIServer -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml -templateDir: modules/openapi-generator/src/main/resources/php-silex diff --git a/samples/server/petstore/php-silex/.openapi-generator-ignore b/samples/server/petstore/php-silex/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/server/petstore/php-silex/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/server/petstore/php-silex/.openapi-generator/VERSION b/samples/server/petstore/php-silex/.openapi-generator/VERSION deleted file mode 100644 index afa63656064..00000000000 --- a/samples/server/petstore/php-silex/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-silex/OpenAPIServer/.gitignore b/samples/server/petstore/php-silex/OpenAPIServer/.gitignore deleted file mode 100644 index 390a8878ede..00000000000 --- a/samples/server/petstore/php-silex/OpenAPIServer/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore - -composer.phar -/vendor/ - -# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control -# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file -# composer.lock \ No newline at end of file diff --git a/samples/server/petstore/php-silex/OpenAPIServer/.htaccess b/samples/server/petstore/php-silex/OpenAPIServer/.htaccess deleted file mode 100644 index e47b5fb8a0c..00000000000 --- a/samples/server/petstore/php-silex/OpenAPIServer/.htaccess +++ /dev/null @@ -1,5 +0,0 @@ - - RewriteEngine On - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L] - \ No newline at end of file diff --git a/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator-ignore b/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/FILES b/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/FILES deleted file mode 100644 index 1e24269e178..00000000000 --- a/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -.gitignore -.htaccess -README.md -composer.json -index.php diff --git a/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION b/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/server/petstore/php-silex/OpenAPIServer/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-silex/OpenAPIServer/README.md b/samples/server/petstore/php-silex/OpenAPIServer/README.md deleted file mode 100644 index 03f2825681d..00000000000 --- a/samples/server/petstore/php-silex/OpenAPIServer/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenAPI generated server - -## Overview -This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the -[OpenAPI-Spec](https://www.openapis.org/) from a remote server, you can easily generate a server stub. This -is an example of building a PHP server. - -This example uses the [Silex](http://silex.sensiolabs.org/) micro-framework. To see how to make this your own, please take a look at the template here: - -[TEMPLATES](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/silex/) diff --git a/samples/server/petstore/php-silex/OpenAPIServer/composer.json b/samples/server/petstore/php-silex/OpenAPIServer/composer.json deleted file mode 100644 index 466cd3fbc77..00000000000 --- a/samples/server/petstore/php-silex/OpenAPIServer/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "require": { - "silex/silex": "~1.2" - } -} \ No newline at end of file diff --git a/samples/server/petstore/php-silex/OpenAPIServer/index.php b/samples/server/petstore/php-silex/OpenAPIServer/index.php deleted file mode 100644 index ef5c65d8e73..00000000000 --- a/samples/server/petstore/php-silex/OpenAPIServer/index.php +++ /dev/null @@ -1,119 +0,0 @@ -POST('/v2/pet', function(Application $app, Request $request) { - return new Response('How about implementing addPet as a POST method ?'); - }); - - -$app->DELETE('/v2/pet/{petId}', function(Application $app, Request $request, $petId) { - return new Response('How about implementing deletePet as a DELETE method ?'); - }); - - -$app->GET('/v2/pet/findByStatus', function(Application $app, Request $request) { - $status = $request->get('status'); - return new Response('How about implementing findPetsByStatus as a GET method ?'); - }); - - -$app->GET('/v2/pet/findByTags', function(Application $app, Request $request) { - $tags = $request->get('tags'); - return new Response('How about implementing findPetsByTags as a GET method ?'); - }); - - -$app->GET('/v2/pet/{petId}', function(Application $app, Request $request, $petId) { - return new Response('How about implementing getPetById as a GET method ?'); - }); - - -$app->PUT('/v2/pet', function(Application $app, Request $request) { - return new Response('How about implementing updatePet as a PUT method ?'); - }); - - -$app->POST('/v2/pet/{petId}', function(Application $app, Request $request, $petId) { - $name = $request->get('name'); - $status = $request->get('status'); - return new Response('How about implementing updatePetWithForm as a POST method ?'); - }); - - -$app->POST('/v2/pet/{petId}/uploadImage', function(Application $app, Request $request, $petId) { - $additional_metadata = $request->get('additional_metadata'); - $file = $request->get('file'); - return new Response('How about implementing uploadFile as a POST method ?'); - }); - - -$app->DELETE('/v2/store/order/{orderId}', function(Application $app, Request $request, $orderId) { - return new Response('How about implementing deleteOrder as a DELETE method ?'); - }); - - -$app->GET('/v2/store/inventory', function(Application $app, Request $request) { - return new Response('How about implementing getInventory as a GET method ?'); - }); - - -$app->GET('/v2/store/order/{orderId}', function(Application $app, Request $request, $orderId) { - return new Response('How about implementing getOrderById as a GET method ?'); - }); - - -$app->POST('/v2/store/order', function(Application $app, Request $request) { - return new Response('How about implementing placeOrder as a POST method ?'); - }); - - -$app->POST('/v2/user', function(Application $app, Request $request) { - return new Response('How about implementing createUser as a POST method ?'); - }); - - -$app->POST('/v2/user/createWithArray', function(Application $app, Request $request) { - return new Response('How about implementing createUsersWithArrayInput as a POST method ?'); - }); - - -$app->POST('/v2/user/createWithList', function(Application $app, Request $request) { - return new Response('How about implementing createUsersWithListInput as a POST method ?'); - }); - - -$app->DELETE('/v2/user/{username}', function(Application $app, Request $request, $username) { - return new Response('How about implementing deleteUser as a DELETE method ?'); - }); - - -$app->GET('/v2/user/{username}', function(Application $app, Request $request, $username) { - return new Response('How about implementing getUserByName as a GET method ?'); - }); - - -$app->GET('/v2/user/login', function(Application $app, Request $request) { - $username = $request->get('username'); - $password = $request->get('password'); - return new Response('How about implementing loginUser as a GET method ?'); - }); - - -$app->GET('/v2/user/logout', function(Application $app, Request $request) { - return new Response('How about implementing logoutUser as a GET method ?'); - }); - - -$app->PUT('/v2/user/{username}', function(Application $app, Request $request, $username) { - return new Response('How about implementing updateUser as a PUT method ?'); - }); - - -$app->run();