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
{{ message }}
Repository navigation
Schema Generator: serializer field from models.DurationField with MinValueValidator produces invalid output #8063
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have found that as yaml Dumper convert time delta into python tag which is not renderable. so here we can add a custom representer for datetime.timedelta which converts it into 'str' tag which is similar to JSON OpenAPI Schema fix. #7641.
I have found that as yaml Dumper convert time delta into python tag which is not renderable. so here we can add a custom representer for datetime.timedelta which converts it into 'str' tag which is similar to JSON OpenAPI Schema fix. #7641.
Sorry for being late! I looked over the PR and couldn't spot anything problematic; OTOH I'm not too familiar with schema representations, and I'm not sure how specialized types are best represented. So, superficially, lgtm.
That said, I very MUCH appreciate that DRF is seeing some movement now. Thank you very very much for working on it! <3
Activity
stale commentedon Apr 28, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
sbrandtb commentedon Jun 10, 2022
The problem still occurs in 3.13.1. I would guess this is related to #7641
stale commentedon Aug 11, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
peterthomassen commentedon Aug 11, 2022
I believe this is still current.
lovelydinosaur commentedon Aug 22, 2022
Any keen code archeologists up for digging into what's needed to resolve this?
stale commentedon Oct 22, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
peterthomassen commentedon Oct 24, 2022
I believe this is still current.
rnshaikh commentedon Jun 12, 2023
I have found that as yaml Dumper convert time delta into python tag which is not renderable. so here we can add a custom representer for datetime.timedelta which converts it into 'str' tag which is similar to JSON OpenAPI Schema fix. #7641.
Dumper.add_representer(datetime.timedelta, encoders.CustomScalar.represent_timedelta)I have created PR for this #9007.
auvipy commentedon Jun 13, 2023
@peterthomassen can you also review the PR please?
peterthomassen commentedon Jun 19, 2023
Sorry for being late! I looked over the PR and couldn't spot anything problematic; OTOH I'm not too familiar with schema representations, and I'm not sure how specialized types are best represented. So, superficially, lgtm.
That said, I very MUCH appreciate that DRF is seeing some movement now. Thank you very very much for working on it! <3
auvipy commentedon Jun 19, 2023
I will put effort to it. no worries