Skip to content

Commit a2f6ffc

Browse files
authored
Merge pull request #248 from python-openapi/feature/pre-commit-hook-doc-update
pre-commit hook doc update
2 parents 6b025e8 + 718581c commit a2f6ffc

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

README.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ OpenAPI Spec validator
2020
About
2121
#####
2222

23-
OpenAPI Spec Validator is a Python library that validates OpenAPI Specs
23+
OpenAPI Spec Validator is a CLI, pre-commit hook and python package that validates OpenAPI Specs
2424
against the `OpenAPI 2.0 (aka Swagger)
2525
<https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`__,
2626
`OpenAPI 3.0 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md>`__
@@ -80,6 +80,19 @@ or more pythonic way:
8080
8181
For more details, read about `CLI (Command Line Interface) <https://openapi-spec-validator.readthedocs.io/en/latest/cli.html>`__.
8282

83+
pre-commit hook
84+
***************
85+
86+
.. code-block:: yaml
87+
88+
repos:
89+
- repo: https://github.com/python-openapi/openapi-spec-validator
90+
rev: 0.5.5 # The version to use or 'master' for latest
91+
hooks:
92+
- id: openapi-spec-validator
93+
94+
For more details, read about `pre-commit hook <https://openapi-spec-validator.readthedocs.io/en/latest/hook.html>`__.
95+
8396
Python package
8497
**************
8598

docs/index.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ openapi-spec-validator
1010
hook
1111
contributing
1212

13-
OpenAPI Spec Validator is a Python library that validates OpenAPI Specs
13+
OpenAPI Spec Validator is a CLI, pre-commit hook and python package that validates OpenAPI Specs
1414
against the `OpenAPI 2.0 (aka Swagger)
1515
<https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`__,
1616
`OpenAPI 3.0 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md>`__
@@ -71,6 +71,18 @@ Usage
7171
7272
Read more about the :doc:`cli`.
7373

74+
.. md-tab-item:: pre-commit hook
75+
76+
.. code-block:: yaml
77+
78+
repos:
79+
- repo: https://github.com/python-openapi/openapi-spec-validator
80+
rev: 0.5.5 # The version to use or 'master' for latest
81+
hooks:
82+
- id: openapi-spec-validator
83+
84+
Read more about the :doc:`hook`.
85+
7486
.. md-tab-item:: Python package
7587

7688
.. code-block:: python

0 commit comments

Comments
 (0)