Update default value for PHP server generators (slim, silex) (#272)

* update php slim samples

* update php silex samples

* update php silex default value
This commit is contained in:
William Cheng
2018-04-30 15:18:13 +08:00
committed by GitHub
parent 799b033c22
commit 7ad92572e4
69 changed files with 546 additions and 535 deletions

View File

@@ -1,13 +1,13 @@
<?php
/**
* SwaggerServerApiPass
* OpenAPIServerApiPass
*
* PHP version 5
*
* @category Class
* @package Swagger\Server\DependencyInjection\Compiler
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
* @package OpenAPI\Server\DependencyInjection\Compiler
* @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator
*/
/**
@@ -17,31 +17,31 @@
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Generated by: https://github.com/openapitools/openapi-generator.git
*
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
*/
namespace Swagger\Server\DependencyInjection\Compiler;
namespace OpenAPI\Server\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
/**
* SwaggerServerApiPass Class Doc Comment
* OpenAPIServerApiPass Class Doc Comment
*
* @category Class
* @package Swagger\Server\DependencyInjection\Compiler
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
* @package OpenAPI\Server\DependencyInjection\Compiler
* @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator
*/
class SwaggerServerApiPass implements CompilerPassInterface
class OpenAPIServerApiPass implements CompilerPassInterface
{
/**
@@ -51,14 +51,14 @@ class SwaggerServerApiPass implements CompilerPassInterface
*/
public function process(ContainerBuilder $container) {
// always first check if the primary service is defined
if (!$container->has('swagger_server.api.api_server')) {
if (!$container->has('open_apiserver.api.api_server')) {
return;
}
$definition = $container->findDefinition('swagger_server.api.api_server');
$definition = $container->findDefinition('open_apiserver.api.api_server');
// find all service IDs with the swagger_server.api tag
$taggedServices = $container->findTaggedServiceIds('swagger_server.api');
// find all service IDs with the open_apiserver.api tag
$taggedServices = $container->findTaggedServiceIds('open_apiserver.api');
foreach ($taggedServices as $id => $tags) {
foreach ($tags as $tag) {

View File

@@ -1,13 +1,13 @@
<?php
/**
* SwaggerServerExtension
* OpenAPIServerExtension
*
* PHP version 5
*
* @category Class
* @package Swagger\Server\DependencyInjection
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
* @package OpenAPI\Server\DependencyInjection
* @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator
*/
/**
@@ -17,17 +17,17 @@
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Generated by: https://github.com/openapitools/openapi-generator.git
*
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* https://github.com/openapitools/openapi-generator
* Do not edit the class manually.
*/
namespace Swagger\Server\DependencyInjection;
namespace OpenAPI\Server\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -35,14 +35,14 @@ use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
/**
* SwaggerServerExtension Class Doc Comment
* OpenAPIServerExtension Class Doc Comment
*
* @category Class
* @package Swagger\Server\DependencyInjection
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
* @package OpenAPI\Server\DependencyInjection
* @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator
*/
class SwaggerServerExtension extends Extension
class OpenAPIServerExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container)
{
@@ -52,6 +52,6 @@ class SwaggerServerExtension extends Extension
public function getAlias()
{
return 'swagger_server';
return 'open_apiserver';
}
}