drf-spectacular icon indicating copy to clipboard operation
drf-spectacular copied to clipboard

Support `djangorestframework-dataclasses` `Union` type

Open johnthagen opened this issue 1 year ago • 1 comments

This PR added support for Union types in djangorestframework-dataclasses

  • https://github.com/oxan/djangorestframework-dataclasses/pull/82
  • https://github.com/oxan/djangorestframework-dataclasses#unionfield

I wasn't sure if drf-spectacular would need to be adjusted to support this or not? Just wanted to report it here for awareness as this is an exciting new feature.

It was released in 1.3.0

  • https://github.com/oxan/djangorestframework-dataclasses/releases/tag/v1.3.0

johnthagen avatar Aug 21 '23 18:08 johnthagen

This would be very handy, I'm currently trying to get this to work myself. As is, it currently throws a warning could not resolve serializer field "UnionField...

awwithro avatar Sep 26 '23 21:09 awwithro