dotnet: improve language coverage of passthru.tests for dotnet sdks (#370789)
[NixPkgs.git] / pkgs / development / python-modules / openapi-spec-validator / default.nix
blob0086d6098141212ac2a726dc2d9268a2a006055a
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
7   # build-system
8   poetry-core,
10   # propagates
11   importlib-resources,
12   jsonschema,
13   jsonschema-path,
14   lazy-object-proxy,
15   openapi-schema-validator,
17   # tests
18   pytestCheckHook,
21 buildPythonPackage rec {
22   pname = "openapi-spec-validator";
23   version = "0.7.1";
24   pyproject = true;
26   disabled = pythonOlder "3.8";
28   # no tests via pypi sdist
29   src = fetchFromGitHub {
30     owner = "python-openapi";
31     repo = "openapi-spec-validator";
32     tag = version;
33     hash = "sha256-X0ePdHQeBSWjsCFQgCoNloQZRhKbvPBE43aavBppvmg=";
34   };
36   postPatch = ''
37     sed -i '/--cov/d' pyproject.toml
38   '';
40   nativeBuildInputs = [ poetry-core ];
42   propagatedBuildInputs = [
43     jsonschema
44     jsonschema-path
45     lazy-object-proxy
46     openapi-schema-validator
47   ] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
49   nativeCheckInputs = [ pytestCheckHook ];
51   disabledTests = [
52     # network access
53     "test_default_valid"
54     "test_urllib_valid"
55     "test_valid"
56   ];
58   pythonImportsCheck = [
59     "openapi_spec_validator"
60     "openapi_spec_validator.readers"
61   ];
63   meta = with lib; {
64     changelog = "https://github.com/p1c2u/openapi-spec-validator/releases/tag/${version}";
65     description = "Validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger) and OpenAPI 3.0.0 specification";
66     mainProgram = "openapi-spec-validator";
67     homepage = "https://github.com/p1c2u/openapi-spec-validator";
68     license = licenses.asl20;
69   };