src/Resources/config/validators.xml
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://symfony.com/schema/dic/services"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service class="Hmaus\Spas\Validation\ValidatorService" id="hmaus.spas.validator">
<argument type="service" id="hmaus.spas.logger"/>
</service>
<!-- Please note the order of the validators - the most likely run first; all run anyway -->
<service class="Hmaus\Spas\Validation\Validator\HttpStatusCode" id="hmaus.spas.validator.http_status_code">
<argument type="service" id="hmaus.spas.logger"/>
<tag name="hmaus.spas.tag.validator"/>
</service>
<service class="Hmaus\Spas\Validation\Validator\Header" id="hmaus.spas.validator.header">
<tag name="hmaus.spas.tag.validator"/>
</service>
<service class="Hmaus\Spas\Validation\Validator\JsonSchema" id="hmaus.spas.validator.json_schema">
<argument type="service" id="hmaus.spas.json_schema.validator"/>
<tag name="hmaus.spas.tag.validator"/>
</service>
<service class="JsonSchema\Validator" id="hmaus.spas.json_schema.validator"/>
<service class="Hmaus\Spas\Validation\Validator\NoContent" id="hmaus.spas.validator.no_content">
<tag name="hmaus.spas.tag.validator"/>
</service>
<service class="Hmaus\Spas\Validation\Validator\TextPlain" id="hmaus.spas.validator.text_plain">
<tag name="hmaus.spas.tag.validator"/>
</service>
<service class="Hmaus\Spas\Validation\Validator\RequestTaggedFailed" id="hmaus.spas.validator.request_tagged_failed">
<tag name="hmaus.spas.tag.validator"/>
</service>
</services>
</container>