Skip to content

Commit

Permalink
Merge pull request #1 from peachfinance/feature/we-only-accept-one-arg
Browse files Browse the repository at this point in the history
feature/accept-multiple-file-args-for-validation
  • Loading branch information
topher515 authored Mar 24, 2022
2 parents ecbc08c + 46c21d7 commit 38dcbfd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@
Python
language: python
files: (openapi|swagger).*\.(json|ya?ml)$
- id: check-many-openapi
name: check-many-openapi
entry: check-many-openapi
description: >-
Validate your OpenAPI/Swagger Specs with openapi-spec-validator in
Python--accepting multiple filenames as input
language: python
files: (openapi|swagger).*\.(json|ya?ml)$
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Add this to your `.pre-commit-config.yaml`

```yaml
- repo: https://github.com/dudefellah/pre-commit-openapi
rev: "v0.0.1"
rev: "v0.0.2"
hooks:
- id: check-openapi
```
Expand Down
3 changes: 3 additions & 0 deletions bin/check-many-openapi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

for var in "$@"; do openapi-spec-validator "$var"; done;
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from setuptools import setup

from setuptools import setup, find_packages

setup(
name='pre_commit_dummy_package',
version='0.0.0',
install_requires=['openapi-spec-validator==0.2.9'],
install_requires=['openapi-spec-validator==0.4.0'],
scripts=['bin/check-many-openapi'],
)

0 comments on commit 38dcbfd

Please sign in to comment.