1{ lib, buildPythonPackage, isPy27, fetchPypi
2, jsonschema, openapi-schema-validator, pyyaml, six, pathlib
3, mock, pytest, pytest-cov, pytest-flake8, tox, setuptools }:
4
5buildPythonPackage rec {
6 pname = "openapi-spec-validator";
7 version = "0.3.1";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "3d70e6592754799f7e77a45b98c6a91706bdd309a425169d17d8e92173e198a2";
12 };
13
14 propagatedBuildInputs = [ jsonschema openapi-schema-validator pyyaml six setuptools ]
15 ++ (lib.optionals (isPy27) [ pathlib ]);
16
17 checkInputs = [ mock pytest pytest-cov 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}