Merge pull request #177534 from fabaff/mitmproxy2swagger

mitmproxy2swagger: init at 0.6.0
This commit is contained in:
Fabian Affolter 2022-06-13 22:00:05 +02:00 committed by GitHub
commit d57af7fa69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1,39 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, requests
}:
buildPythonPackage rec {
pname = "json-stream";
version = "1.3.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-J5DBa8zeandkDIXpEaRN6cneZIIG2aRHS5zjmM/H0Uw=";
};
propagatedBuildInputs = [
requests
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"json_stream"
];
meta = with lib; {
description = "Streaming JSON parser";
homepage = "https://github.com/daggaz/json-stream";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,41 @@
{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "mitmproxy2swagger";
version = "0.6.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "alufers";
repo = pname;
rev = version;
hash = "sha256-NTxRq7lIm3Y5RxOxdXiKVv39Co8GG9YE2kuEryRUw1Y=";
};
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
propagatedBuildInputs = with python3.pkgs; [
json-stream
mitmproxy
ruamel-yaml
];
# No tests available
doCheck = false;
pythonImportsCheck = [
"mitmproxy2swagger"
];
meta = with lib; {
description = "Tool to automagically reverse-engineer REST APIs";
homepage = "https://github.com/alufers/mitmproxy2swagger";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -8381,6 +8381,8 @@ with pkgs;
mitmproxy = with python3Packages; toPythonApplication mitmproxy;
mitmproxy2swagger = callPackage ../tools/security/mitmproxy2swagger { };
mjpegtools = callPackage ../tools/video/mjpegtools { };
mjpegtoolsFull = mjpegtools.override {

View File

@ -4550,6 +4550,8 @@ in {
json-schema-for-humans = callPackage ../development/python-modules/json-schema-for-humans { };
json-stream = callPackage ../development/python-modules/json-stream { };
jsonnet = buildPythonPackage { inherit (pkgs.jsonnet) name src; };
jsonpatch = callPackage ../development/python-modules/jsonpatch { };