1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 # build-system
8 poetry-core,
9
10 # propagates
11 jsonschema,
12 jsonschema-specifications,
13 rfc3339-validator,
14
15 # tests
16 pytestCheckHook,
17 pytest-cov-stub,
18}:
19
20buildPythonPackage rec {
21 pname = "openapi-schema-validator";
22 version = "0.6.3";
23 format = "pyproject";
24
25 disabled = pythonOlder "3.8";
26
27 src = fetchFromGitHub {
28 owner = "p1c2u";
29 repo = "openapi-schema-validator";
30 tag = version;
31 hash = "sha256-1Y049W4TbqvKZRwnvPVwyLq6CH6NQDrEfJknuMn8dGo=";
32 };
33
34 nativeBuildInputs = [ poetry-core ];
35
36 propagatedBuildInputs = [
37 jsonschema
38 jsonschema-specifications
39 rfc3339-validator
40 ];
41
42 nativeCheckInputs = [
43 pytestCheckHook
44 pytest-cov-stub
45 ];
46
47 disabledTests = [
48 # https://github.com/python-openapi/openapi-schema-validator/issues/153
49 "test_array_prefixitems_invalid"
50 ];
51
52 pytestFlags = [ "-vvv" ];
53
54 pythonImportsCheck = [ "openapi_schema_validator" ];
55
56 meta = with lib; {
57 changelog = "https://github.com/python-openapi/openapi-schema-validator/releases/tag/${src.tag}";
58 description = "Validates OpenAPI schema against the OpenAPI Schema Specification v3.0";
59 homepage = "https://github.com/python-openapi/openapi-schema-validator";
60 license = licenses.bsd3;
61 maintainers = [ ];
62 };
63}