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

Fix duration field inspector #549

Merged

Conversation

terencehonles
Copy link
Contributor

@terencehonles terencehonles commented Feb 22, 2020

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

@terencehonles
Copy link
Contributor Author

@axnsan12 this should be a pretty easy PR to review, I bumped it to run the CI tests again.

@terencehonles
Copy link
Contributor Author

@terencehonles
Copy link
Contributor Author

@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
@terencehonles
Copy link
Contributor Author

@axnsan12 any chance I can get a review on this / have this merged?

@johnthagen
Copy link
Collaborator

@JoelLefkowitz Has been most active as of late. He'd be the best person to review.

@vmax
Copy link
Contributor

vmax commented Jan 6, 2022

@terencehonles I've experienced the same problem, so thank you for your fix!

@JoelLefkowitz @axnsan12 would it be possible to merge & release this soon?

@JoelLefkowitz
Copy link
Collaborator

I'll take a look

@JoelLefkowitz JoelLefkowitz changed the base branch from master to 1.20.x January 10, 2022 15:52
@JoelLefkowitz JoelLefkowitz merged commit 1795ed1 into axnsan12:1.20.x Jan 10, 2022
@JoelLefkowitz
Copy link
Collaborator

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.

@vmax
Copy link
Contributor

vmax commented Jan 10, 2022

@JoelLefkowitz thank you!

@terencehonles terencehonles deleted the update-duration-field-inspector branch January 11, 2022 00:01
@vmax
Copy link
Contributor

vmax commented Jul 10, 2022

@JoelLefkowitz hi! was wondering if we could get 1.20.1 released soon 🙂

@JoelLefkowitz
Copy link
Collaborator

@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

@JoelLefkowitz
Copy link
Collaborator

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.

@JoelLefkowitz
Copy link
Collaborator

This is now present in 1.20.3 and onwards

@vmax
Copy link
Contributor

vmax commented Jul 14, 2022

@JoelLefkowitz thanks!

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

Successfully merging this pull request may close these issues.

None yet

4 participants