remove silex samples, config (#6736)

This commit is contained in:
William Cheng 2020-06-22 11:01:43 +08:00 committed by GitHub
parent b47f3fadee
commit 0cf31704cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 0 additions and 204 deletions

View File

@ -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

View File

@ -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

View File

@ -1 +0,0 @@
4.0.0-SNAPSHOT

View File

@ -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

View File

@ -1,5 +0,0 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
</IfModule>

View File

@ -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

View File

@ -1,5 +0,0 @@
.gitignore
.htaccess
README.md
composer.json
index.php

View File

@ -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/)

View File

@ -1,5 +0,0 @@
{
"require": {
"silex/silex": "~1.2"
}
}

View File

@ -1,119 +0,0 @@
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Silex\Application;
$app = new Silex\Application();
$app->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();