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