def validate_vocabulary(f):
    """Decorator to validate vocabulary schema."""
    def inner(self):
        vocabularies = f(self)
        for vocabulary in vocabularies:
            self.validate(vocabulary)
        return vocabularies
    return inner