You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The outputted yaml contains the schema for Main as:
components:
schemas:
Main:
type: objectproperties:
name:
type: stringid:
type: integeritems:
type: arrayitems: {}required:
- id
- items
- name
Items is correctly marked as an array, but the items is not correct. I'd expect oneOf being used here (although i'm not 100%).
The same happens using item: Food | Drink.
I believe the issue is within this library, and not marshmallow_dataclass, as i'm able to deserialise serialise with the schemas without issue
It seems that the API spec is not properly generated when using Union typehints.
The below snippet is on python 3.10 and 3.11
The outputted yaml contains the schema for Main as:
Items is correctly marked as an array, but the items is not correct. I'd expect oneOf being used here (although i'm not 100%).
The same happens using
item: Food | Drink
.I believe the issue is within this library, and not marshmallow_dataclass, as i'm able to deserialise serialise with the schemas without issue
Note: I've also tried without the inheritance involved, and the result is the same.
The text was updated successfully, but these errors were encountered: