diff --git a/Config/module.xml b/Config/module.xml
index f4fc075..a7c10dd 100644
--- a/Config/module.xml
+++ b/Config/module.xml
@@ -20,7 +20,7 @@
en_US
fr_FR
- 2.1.10
+ 2.1.11
Vincent Lopes-Vicente
diff --git a/Model/Api/BaseApiModel.php b/Model/Api/BaseApiModel.php
index d3ed923..ab4bb7d 100644
--- a/Model/Api/BaseApiModel.php
+++ b/Model/Api/BaseApiModel.php
@@ -47,16 +47,15 @@ public function __construct(
ModelFactory $modelFactory,
RequestStack $requestStack,
TaxEngine $taxEngine,
- EventDispatcherInterface $dispatcher
+ EventDispatcherInterface $dispatcher,
+ ValidatorInterface $validator
) {
if (class_exists(AnnotationRegistry::class)) {
AnnotationRegistry::registerLoader('class_exists');
}
$this->dispatcher = $dispatcher;
- $this->validator = Validation::createValidatorBuilder()
- ->enableAnnotationMapping()
- ->getValidator();
+ $this->validator = $validator;
$this->modelFactory = $modelFactory;
$this->request = $requestStack->getCurrentRequest();