forked from loafle/openapi-generator-original
* use .yaml instead of .yml This is recommended by Symfony standards * save Bundle files also to src path * add test for generate ping * add package imports * fix expected file names * why is Api/ApiServer.php missing * output filenames * use getAbsolutePath for debug purpose * do not use punctuation as current directory * refactor: remove todos * use also .yaml in test to fix it * add test for setting a different source directory * use correct const for setting source dir property in tests * import the AbstractPhpCodegen in test class * put also Resources to source path * save docs not to Resources * update samples and improve src path in autoload.php and composer.json * update moved samples
58 lines
1.5 KiB
PHP
58 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* OpenAPIServerExtension
|
|
*
|
|
* PHP version 8.1.1
|
|
*
|
|
* @category Class
|
|
* @package OpenAPI\Server\DependencyInjection
|
|
* @author OpenAPI Generator team
|
|
* @link https://github.com/openapitools/openapi-generator
|
|
*/
|
|
|
|
/**
|
|
* OpenAPI Petstore
|
|
*
|
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
|
*
|
|
* The version of the OpenAPI document: 1.0.0
|
|
*
|
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
|
*
|
|
*/
|
|
|
|
/**
|
|
* NOTE: This class is auto generated by the openapi generator program.
|
|
* https://github.com/openapitools/openapi-generator
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
namespace OpenAPI\Server\DependencyInjection;
|
|
|
|
use Symfony\Component\Config\FileLocator;
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
use Symfony\Component\DependencyInjection\Extension\Extension;
|
|
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
|
|
|
/**
|
|
* OpenAPIServerExtension Class Doc Comment
|
|
*
|
|
* @category Class
|
|
* @package OpenAPI\Server\DependencyInjection
|
|
* @author OpenAPI Generator team
|
|
* @link https://github.com/openapitools/openapi-generator
|
|
*/
|
|
class OpenAPIServerExtension extends Extension
|
|
{
|
|
public function load(array $configs, ContainerBuilder $container): void
|
|
{
|
|
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
|
$loader->load('services.yaml');
|
|
}
|
|
|
|
public function getAlias(): string
|
|
{
|
|
return 'open_api_server';
|
|
}
|
|
}
|