about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/openapi-schema-pydantic/default.nix
blob: 1930dc237f058a943616047a05e0656093c9ce16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, pydantic
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "openapi-schema-pydantic";
  version = "1.2.4";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-PiLPWLdKafdSzH5fFTf25EFkKC2ycAy7zTu5nd0GUZY=";
  };

  propagatedBuildInputs = [
    pydantic
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  disabledTests = [
    # these tests are broken with `pydantic >= 1.10`
    # but this library seems to work fine.
    # e.g. https://github.com/hwchase17/langchain/blob/d86ed15d8884d5a3f120a433b9dda065647e4534/poetry.lock#L6011-L6012
    "test_pydantic_discriminator_schema_generation"
    "test_pydantic_discriminator_openapi_generation"
  ];

  meta = with lib; {
    description = "OpenAPI (v3) specification schema as pydantic class";
    homepage = "https://github.com/kuimono/openapi-schema-pydantic";
    changelog = "https://github.com/kuimono/openapi-schema-pydantic/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ natsukium ];
  };
}