drf-spectacular
drf-spectacular copied to clipboard
Reference enums in path parameters
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.
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.