Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with drf-yasg #70

Closed
q0w opened this issue Sep 3, 2022 · 2 comments
Closed

Compatibility with drf-yasg #70

q0w opened this issue Sep 3, 2022 · 2 comments

Comments

@q0w
Copy link

q0w commented Sep 3, 2022

ProjectionSerializer does not have a label attribute, so drf-yasg fails:

AttributeError: 'ProjectionSerializer' object has no attribute 'label'
@j4mie
Copy link
Member

j4mie commented Sep 5, 2022

Hi,

I don't think this is going to be an easy fix, because the ProjectionSerializer doesn't know anything at all about what it's serializing. We might be able to silence the error, but even if we did the schema would be empty/meaningless.

I'm currently thinking about how django-readers might work with schemas. It's not simple because we (deliberately) don't consider types in our specs currently, and because of the way the library is designed we can't statically introspect the types from the underlying models easily. This will be a long-term piece of work I imagine, but I'll leave this issue open for now just so we can track it.

Thanks!

@j4mie j4mie mentioned this issue Dec 20, 2022
2 tasks
@j4mie
Copy link
Member

j4mie commented Jan 13, 2023

#76 should give you everything you need to make this work 🎉 closing for now, please let me know if you have any issues.

@j4mie j4mie closed this as completed Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants