code: public function createRelationshipDocumentValidator($document)
      {
          return new Validation\Spec\RelationValidator(
              $this->container->make(StoreInterface::class),
              $this->createErrorTranslator(),
              $document
          );
      }
docs: Create a validator to check that a relationship document complies with the JSON API specification.
  
  @param object $document
  @return DocumentValidatorInterface