code: def validate(self):
          
          validator = Draft7Validator(self.SCHEMA)
  
          errors = set()  # make errors a set to avoid duplicates
  
          for error in validator.iter_errors(self.serialize()):
              errors.add('.'.join(
                  list(map(str, error.path)) + [error.message]
              ))
  
          if errors:
              raise JSONValidationException(type(self).__name__, errors)
docs: Using the SCHEMA property, validate the attributes
          of this instance. If any attributes are missing or
          invalid, raise a ValidationException.