marshmallow_dataclass icon indicating copy to clipboard operation
marshmallow_dataclass copied to clipboard

Automatic generation of marshmallow schemas from dataclasses.

Results 80 marshmallow_dataclass issues
Sort by recently updated
recently updated
newest added

The following snippet runs successfully using `marshmallow_dataclass[enum,union]==8.5.2`: ```python import enum from typing import Union import marshmallow_dataclass from dataclasses import dataclass, field class Fruit(enum.Enum): apple = "Apple" banana = "Banana" tomato...

Add (new in 3.10) arguments to `@dataclass` Similar to #204 , with sys.version_info guarding. I tried using a common dispatch handler, but I think custom mypy handling of this class...

Since UnionType from Python 3.10 currently unsupported in `typing_inspect` added workaround to use `type | type` syntax in dataclasses.

I want to use marshmallow_dataclass to do the following. The input dict will have a field `a`, and will use it to compute field `b` (let's say `b = 2...

In https://github.com/lovasoa/marshmallow_dataclass/pull/187 a change was implemented that included the current stack frame in an internal cache, therefore causing all local variables of the entire call stack to never be freed....

Consider the following code: ```python from enum import Enum from dataclasses import dataclass from typing import Literal import marshmallow_dataclass class Color(Enum): RED = 0 GREEN = 1 BLUE = 2...

Previously, generic dataclasses were not supported even if they had type arguments, now it is possible to do the following: ```python T = typing.TypeVar("T") @dataclasses.dataclass class SimpleGeneric(typing.Generic[T]): data: T schema_int...

https://github.com/lovasoa/marshmallow_dataclass/blob/ad4d654561a8f6514f7ee63e90642ee3417ccf3f/marshmallow_dataclass/__init__.py#L716 If a field is declared as follows, the line referenced above drops the parameters default and by_value (and any other parameters specified). ```python3 some_field: SomeEnum = EnumField(enum=SomeEnum, default=SomeEnum.FOO, by_value=True)...

Hi, I'm using marshmallow-dataclass with Flask, the documentation is generated via [api-spec](https://github.com/marshmallow-code/apispec) Since version 8.5.4 I observed a regression. The object model are not generated in the openapi file. Here...