pre-commit hook

pre-commit is a framework for building and running git hooks.

This document describes available pre-commit hook provided by openapi-spec-validator.

Usage

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 CLI (Command Line Interface).

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.5.5 # The version to use or 'master' for latest
    hooks:
    -   id: openapi-spec-validator

For more information on how to use pre-commit please see the official documentation.