code: public function createExistingResourceDocumentValidator($document, $expectedType, $expectedId)
      {
          $store = $this->container->make(StoreInterface::class);
          $errors = $this->createErrorTranslator();
  
          return new Validation\Spec\UpdateResourceValidator(
              $store,
              $errors,
              $document,
              $expectedType,
              $expectedId
          );
      }
docs: Create a validator to check that a resource document complies with the JSON API specification.
  
  @param object $document
  @param string $expectedType
  @param string $expectedId
  @return Validation\Spec\UpdateResourceValidator