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

Reference enums in path parameters

Open mrginglymus opened this issue 2 years ago • 2 comments

We're just switching to drf-spectacular from a heavily patched 'vanilla' drf schema generator, and it's great to see so many of the issues we'd fixed already fixed here.

This PR ensures that enums in paths also use the same reference as enums in schemas.

mrginglymus avatar May 09 '22 09:05 mrginglymus

Ahh, I've just seen https://github.com/tfranzel/drf-spectacular/issues/520

I think these are valid concerns, and that's why I didn't also extract from path parameters. However, the key issue is that there is currently no easy way to hook the hook to reuse the logic in ones own code.

mrginglymus avatar May 09 '22 09:05 mrginglymus