-
Notifications
You must be signed in to change notification settings - Fork 440
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
Fix duration field inspector #549
Fix duration field inspector #549
Conversation
badbb87
to
4616577
Compare
4616577
to
00bd0e7
Compare
@axnsan12 this should be a pretty easy PR to review, I bumped it to run the CI tests again. |
Looks like the GitHub settings need to be updated for a recent travis change https://travis-ci.community/t/known-issue-travis-ci-reports-expected-waiting-for-status-to-be-reported-on-the-github-status-api-but-the-status-never-arrives/1154 |
00bd0e7
to
8b18e05
Compare
@johnthagen it looks like you might also have commit access to the repo? Do you mind reviewing? I just update the changes and kicked off the CI. |
- Durations should be represented as an `openapi.TYPE_STRING` so swagger and other tools do not prevent valid input ("00:10:00" is valid, but not a number) See: https://www.django-rest-framework.org/api-guide/fields/#durationfield and https://docs.djangoproject.com/en/3.0/ref/utils/#django.utils.dateparse.parse_duration
8b18e05
to
f5b0cb8
Compare
@axnsan12 any chance I can get a review on this / have this merged? |
@JoelLefkowitz Has been most active as of late. He'd be the best person to review. |
@terencehonles I've experienced the same problem, so thank you for your fix! @JoelLefkowitz @axnsan12 would it be possible to merge & release this soon? |
I'll take a look |
I've merged this into 1.20.x. I'm going to release 1.20.1 to include this and the other minor changes that were added to the master branch over the past couple weeks. |
@JoelLefkowitz thank you! |
@JoelLefkowitz hi! was wondering if we could get 1.20.1 released soon 🙂 |
Cheers for the reminder, I'll triage everything a little later today |
For anyone following this thread, I'm a little behind on completing the release, checking the tests cover everything and writing out the changelog is taking a little longer than expected as I don't want to rush. |
This is now present in 1.20.3 and onwards |
@JoelLefkowitz thanks! |
Durations should be represented as an
openapi.TYPE_STRING
so swagger and other tools do not prevent valid input ("00:10:00" is valid, but not a number)See:
https://www.django-rest-framework.org/api-guide/fields/#durationfield and
https://docs.djangoproject.com/en/3.0/ref/utils/#django.utils.dateparse.parse_duration