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 = pname; 18 rev = version; 19 hash = "sha256-CUxuwqjjAb9Fy6xWtX1WtSANYaYr5//vY8k89KghYoQ="; 20 }; 21 22 propagatedBuildInputs = [ 23 flask 24 jsonschema 25 ] ++ flask.optional-dependencies.async; 26 27 nativeCheckInputs = [ pytestCheckHook ]; 28 29 pythonImportsCheck = [ "flask_expects_json" ]; 30 31 disabledTests = [ 32 # https://github.com/Fischerfredl/flask-expects-json/issues/26 33 "test_check_mimetype" 34 "test_default_behaviour" 35 "test_default_gets_validated" 36 "test_format_validation_rejection" 37 "test_ignore_multiple" 38 "test_ignore_one" 39 "test_valid_decorator_no_schema_async" 40 "test_valid_decorator" 41 "test_validation_invalid" 42 ]; 43 44 meta = with lib; { 45 homepage = "https://github.com/fischerfredl/flask-expects-json"; 46 description = "Decorator for REST endpoints in flask. Validate JSON request data."; 47 license = licenses.mit; 48 maintainers = [ ]; 49 }; 50}