Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 883 Bytes

File metadata and controls

23 lines (15 loc) · 883 Bytes

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 :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-validator

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