<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <!-- Controllers -->
        <service id="nelmio_api_doc.controller.swagger_ui" class="Nelmio\ApiDocBundle\Controller\SwaggerUiController" public="true">
            <argument type="service" id="nelmio_api_doc.generator_locator" />
            <argument type="service" id="twig" />
        </service>

        <service id="nelmio_api_doc.controller.swagger" class="Nelmio\ApiDocBundle\Controller\DocumentationController" public="true">
            <argument type="service" id="nelmio_api_doc.generator_locator" />
        </service>

        <!-- Swagger Spec Generator -->
        <service id="nelmio_api_doc.generator" alias="nelmio_api_doc.generator.default" public="true" />

        <service id="nelmio_api_doc.controller_reflector" class="Nelmio\ApiDocBundle\Util\ControllerReflector" public="false">
            <argument type="service" id="service_container" />
        </service>

        <!-- Describers -->
        <service id="nelmio_api_doc.describers.config" class="Nelmio\ApiDocBundle\Describer\ExternalDocDescriber" public="false">
            <argument type="collection" />

            <tag name="nelmio_api_doc.describer" priority="1000" />
        </service>

        <service id="nelmio_api_doc.describers.default" class="Nelmio\ApiDocBundle\Describer\DefaultDescriber" public="false">
            <tag name="nelmio_api_doc.describer" priority="-1000" />
        </service>

        <!-- Routing Describers -->
        <service id="nelmio_api_doc.route_describers.route_metadata" class="Nelmio\ApiDocBundle\RouteDescriber\RouteMetadataDescriber" public="false">
            <tag name="nelmio_api_doc.route_describer" priority="-300" />
        </service>

        <!-- Model Describers -->
        <service id="nelmio_api_doc.model_describers.object" class="Nelmio\ApiDocBundle\ModelDescriber\ObjectModelDescriber" public="false">
            <argument type="service" id="property_info" />
            <argument type="service" id="annotation_reader" />
            <argument type="tagged" tag="nelmio_api_doc.object_model.property_describer" />
            <argument type="service" id="serializer.name_converter.metadata_aware" on-invalid="ignore" />

            <tag name="nelmio_api_doc.model_describer" />
        </service>

        <service id="nelmio_api_doc.model_describers.object_fallback" class="Nelmio\ApiDocBundle\ModelDescriber\FallbackObjectModelDescriber" public="false">
            <tag name="nelmio_api_doc.model_describer" priority="-1000" />
        </service>

        <!-- Property Describers -->
        <service id="nelmio_api_doc.object_model.property_describers.array" class="Nelmio\ApiDocBundle\PropertyDescriber\ArrayPropertyDescriber" public="false">
            <argument type="tagged" tag="nelmio_api_doc.object_model.property_describer" />

            <tag name="nelmio_api_doc.object_model.property_describer" />
        </service>

        <service id="nelmio_api_doc.object_model.property_describers.boolean" class="Nelmio\ApiDocBundle\PropertyDescriber\BooleanPropertyDescriber" public="false">
            <tag name="nelmio_api_doc.object_model.property_describer" />
        </service>

        <service id="nelmio_api_doc.object_model.property_describers.float" class="Nelmio\ApiDocBundle\PropertyDescriber\FloatPropertyDescriber" public="false">
            <tag name="nelmio_api_doc.object_model.property_describer" />
        </service>

        <service id="nelmio_api_doc.object_model.property_describers.integer" class="Nelmio\ApiDocBundle\PropertyDescriber\IntegerPropertyDescriber" public="false">
            <tag name="nelmio_api_doc.object_model.property_describer" />
        </service>

        <service id="nelmio_api_doc.object_model.property_describers.string" class="Nelmio\ApiDocBundle\PropertyDescriber\StringPropertyDescriber" public="false">
            <tag name="nelmio_api_doc.object_model.property_describer" />
        </service>

        <service id="nelmio_api_doc.object_model.property_describers.date_time" class="Nelmio\ApiDocBundle\PropertyDescriber\DateTimePropertyDescriber" public="false">
            <tag name="nelmio_api_doc.object_model.property_describer" />
        </service>

        <service id="nelmio_api_doc.object_model.property_describers.object" class="Nelmio\ApiDocBundle\PropertyDescriber\ObjectPropertyDescriber" public="false">
            <tag name="nelmio_api_doc.object_model.property_describer" priority="-1000" />
        </service>

        <!-- Form Type Extensions -->

        <service id="nelmio_api_doc.form.documentation_extension" class="Nelmio\ApiDocBundle\Form\Extension\DocumentationExtension">
            <tag name="form.type_extension" extended-type="Symfony\Component\Form\Extension\Core\Type\FormType"/>
        </service>
    </services>

</container>
