1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 flask, 6 jsonschema, 7 pytestCheckHook, 8}: 9 10buildPythonPackage rec { 11 pname = "flask-expects-json"; 12 version = "1.7.0"; 13 format = "setuptools"; 14 15 src = fetchFromGitHub { 16 owner = "Fischerfredl"; 17 repo = "flask-expects-json"; 18 rev = version; 19 hash = "sha256-CUxuwqjjAb9Fy6xWtX1WtSANYaYr5//vY8k89KghYoQ="; 20 }; 21 22 propagatedBuildInputs = [ 23 flask 24 jsonschema 25 ] 26 ++ flask.optional-dependencies.async; 27 28 nativeCheckInputs = [ pytestCheckHook ]; 29 30 pythonImportsCheck = [ "flask_expects_json" ]; 31 32 disabledTests = [ 33 # https://github.com/Fischerfredl/flask-expects-json/issues/26 34 "test_check_mimetype" 35 "test_default_behaviour" 36 "test_default_gets_validated" 37 "test_format_validation_rejection" 38 "test_ignore_multiple" 39 "test_ignore_one" 40 "test_valid_decorator_no_schema_async" 41 "test_valid_decorator" 42 "test_validation_invalid" 43 ]; 44 45 meta = with lib; { 46 homepage = "https://github.com/fischerfredl/flask-expects-json"; 47 description = "Decorator for REST endpoints in flask. Validate JSON request data"; 48 license = licenses.mit; 49 maintainers = [ ]; 50 }; 51}