pre-commit is a framework for building and running git hooks.
This document describes available pre-commit hook provided by openapi-spec-validator.
The openapi-spec-validator hook calls the openapi-spec-validator command to make sure the specification does not get committed in a broken state. For more information see the :doc:`cli`.
A full .pre-commit-config.yaml example you can use in your repository:
repos:
- repo: https://github.com/python-openapi/openapi-spec-validator
rev: 0.8.4 # The version to use or 'master' for latest
hooks:
- id: openapi-spec-validatorFor more information on how to use pre-commit please see the official documentation.