docs: def validate(self):
          """Validate the resource"""
          if not self._resource.get('permissions'):
              self.permissions = self.default_permissions
  
          try:
              # update _resource so have default values from the schema
              self._resource = self.schema(self._resource)
          except MultipleInvalid as e:
              errors = [format_error(err, self.resource_type) for err in e.errors]
              raise exceptions.ValidationError({'errors': errors})
  
          yield self.check_service()
          yield self.check_unique()