2021-05-03 20:48:10 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-02-10 20:34:41 +00:00
|
|
|
, fetchFromGitHub
|
2023-08-10 07:59:29 +00:00
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# build-system
|
2022-02-10 20:34:41 +00:00
|
|
|
, poetry-core
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
# propagates
|
2021-05-03 20:48:10 +00:00
|
|
|
, jsonschema
|
2023-08-10 07:59:29 +00:00
|
|
|
, jsonschema-specifications
|
2021-05-03 20:48:10 +00:00
|
|
|
, rfc3339-validator
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, pytestCheckHook
|
2021-05-03 20:48:10 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "openapi-schema-validator";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.6.2";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "p1c2u";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-CfSlF6DWkYxxVNTNBkr0+KVeKpqxEEqkz4VBenqo+l0=";
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jsonschema
|
2023-08-10 07:59:29 +00:00
|
|
|
jsonschema-specifications
|
2023-03-08 16:32:21 +00:00
|
|
|
rfc3339-validator
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-05-03 20:48:10 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/python-openapi/openapi-schema-validator/issues/153
|
|
|
|
"test_array_prefixitems_invalid"
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "-vvv" ];
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
pythonImportsCheck = [ "openapi_schema_validator" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-08-10 07:59:29 +00:00
|
|
|
changelog = "https://github.com/python-openapi/openapi-schema-validator/releases/tag/${version}";
|
2021-05-03 20:48:10 +00:00
|
|
|
description = "Validates OpenAPI schema against the OpenAPI Schema Specification v3.0";
|
2024-01-13 08:15:51 +00:00
|
|
|
homepage = "https://github.com/python-openapi/openapi-schema-validator";
|
2021-05-03 20:48:10 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ AluisioASG ];
|
|
|
|
};
|
|
|
|
}
|