You might want to look at the docs for different methods of versioning. The way you do versioning is directly related to how you will use mime types in your code. I personally use the mine type to determine the versions, this allows you to change the version on any endpoint just by changing the version on the mime type. https://www.django-rest-framework.org/api-guide/versioning/
~Carl On Sun, Oct 11, 2020 at 2:36 PM Adam Fletcher <a...@bit.io> wrote: > Hi folks, > > I'd like to limit the request body types I accept to just JSON (this is > oddly to work around an `openapi-generator` bug). I see that I can add a > `accepted_media_type` to requests - but is there a way to do this for all > DRF requests? > > Thanks! > > -Adam > > -- > You received this message because you are subscribed to the Google Groups > "Django REST framework" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-rest-framework+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-rest-framework/CAEP43uPn7UR4gDECrHHk6eZj%3Dnd9y3ETs2irSRJgrq-gFJWSHA%40mail.gmail.com > <https://groups.google.com/d/msgid/django-rest-framework/CAEP43uPn7UR4gDECrHHk6eZj%3Dnd9y3ETs2irSRJgrq-gFJWSHA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- ------------------------------------------------------------------------------- Carl J. Nobile (Software Engineer) carl.nob...@gmail.com ------------------------------------------------------------------------------- -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/CAGQqDQJq-%3DUuOkxSm_9njcPyvH9h2G7ub0rNSs_W%2BUfvNx3Tag%40mail.gmail.com.
