1{ lib, buildPythonPackage, isPy27, fetchPypi
2, jsonschema, pyyaml, six, pathlib
3, mock, pytest, pytestcov, pytest-flake8, tox, setuptools }:
4
5buildPythonPackage rec {
6 pname = "openapi-spec-validator";
7 version = "0.2.9";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "1jw59mmd3n1d5zihdqz2a3j2axxf3m34lqp1190fw8rlndlilf3r";
12 };
13
14 propagatedBuildInputs = [ jsonschema pyyaml six setuptools ]
15 ++ (lib.optionals (isPy27) [ pathlib ]);
16
17 checkInputs = [ mock pytest pytestcov pytest-flake8 tox ];
18
19 meta = with lib; {
20 homepage = "https://github.com/p1c2u/openapi-spec-validator";
21 description = "Validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger) and OpenAPI 3.0.0 specification";
22 license = licenses.asl20;
23 maintainers = with maintainers; [ rvl ];
24 };
25}