1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5 click,
6 essentials,
7 flask,
8 hatchling,
9 httpx,
10 jinja2,
11 markupsafe,
12 pydantic,
13 pytestCheckHook,
14 pythonImportsCheckHook,
15 pyyaml,
16 rich,
17 setuptools,
18}:
19buildPythonPackage rec {
20 pname = "essentials-openapi";
21 version = "1.0.9";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "Neoteroi";
26 repo = "essentials-openapi";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-/NYv0NrE8+0kQg5G3Qf2DtesMHlmKQYczNT8pFlNFZE=";
29 };
30
31 nativeBuildInputs = [ hatchling ];
32
33 nativeCheckInputs = [
34 flask
35 httpx
36 pydantic
37 pytestCheckHook
38 rich
39 setuptools
40 ];
41
42 propagatedBuildInputs = [
43 pyyaml
44 essentials
45 markupsafe
46 ];
47
48 passthru.optional-dependencies = {
49 full = [
50 click
51 jinja2
52 rich
53 httpx
54 ];
55 };
56
57 pythonImportsCheck = [ "openapidocs" ];
58
59 meta = with lib; {
60 homepage = "https://github.com/Neoteroi/essentials-openapi";
61 description = "Functions to handle OpenAPI Documentation";
62 changelog = "https://github.com/Neoteroi/essentials-openapi/releases/v${version}";
63 license = licenses.mit;
64 maintainers = with maintainers; [
65 aldoborrero
66 zimbatm
67 ];
68 };
69}