Skip to content

Commit ee1935b

Browse files
authored
Merge pull request #557 from joscha/joscha/openapi-spec-validator
feat: openapi spec validator
2 parents c9d05ed + 3234ee6 commit ee1935b

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ clang-format supports.
378378
- [headache](https://github.com/frama-c/headache)
379379
- [mixed-line-endings](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/mixed_line_ending.py)
380380
- [mkdocs-linkcheck](https://github.com/byrnereese/linkchecker-mkdocs)
381+
- [openapi-spec-validator](https://github.com/python-openapi/openapi-spec-validator)
381382
- [prettier](https://prettier.io)
382383
- [sort-file-contents](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/file_contents_sorter.py)
383384
- [tagref](https://github.com/stepchowfun/tagref)

modules/hooks.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3261,6 +3261,14 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
32613261
entry = "${hooks.opam-lint.package}/bin/opam lint";
32623262
files = "\\.opam$";
32633263
};
3264+
openapi-spec-validator =
3265+
{
3266+
name = "openapi spec validator";
3267+
description = "A tool to validate OpenAPI spec files";
3268+
package = tools.openapi-spec-validator;
3269+
entry = "${hooks.openapi-spec-validator.package}/bin/openapi-spec-validator";
3270+
files = ".*openapi.*\\.(json|yaml|yml)$";
3271+
};
32643272
ormolu =
32653273
{
32663274
name = "ormolu";

nix/tools.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ in
178178
inherit (luaPackages) luacheck;
179179
inherit (nodePackages) eslint markdownlint-cli prettier cspell;
180180
inherit (ocamlPackages) ocp-indent;
181-
inherit (python3Packages) autoflake black flake8 flynt isort mkdocs-linkcheck mypy pre-commit-hooks pylint pyupgrade;
181+
inherit (python3Packages) autoflake black flake8 flynt isort mkdocs-linkcheck mypy openapi-spec-validator pre-commit-hooks pylint pyupgrade;
182182
inherit (php82Packages) php-cs-fixer psalm;
183183
# FIXME: workaround build failure
184184
phpstan = php82Packages.phpstan.overrideAttrs (old: {

0 commit comments

Comments
 (0)