django-rest-auth icon indicating copy to clipboard operation
django-rest-auth copied to clipboard

Prevent logout GET from getting documented by schema generation

Open sloria opened this issue 8 years ago • 4 comments

If ACCOUNT_LOGOUT_ON_GET is False, a 405 response is appropriately returned.

However, when using DRF's automatic schema/docs generation, the GET method is still documented.

til api 2017-10-24 19-49-18

Conditionally implementing the get method on the LogoutView will prevent the get endpoint from appearing in the schema/docs.

sloria avatar Oct 24 '17 23:10 sloria

Coverage Status

Coverage decreased (-0.3%) to 96.774% when pulling 76fd218958828f252f7cc566746ec966269c852e on sloria:undoc-logout-get into 42d039b473bc18080d58656f50f379005cd70499 on Tivix:master.

coveralls avatar Oct 24 '17 23:10 coveralls

Thanks for contributing! This looks good to me and we'll get to merging it soon.

verkaufer avatar Oct 24 '17 23:10 verkaufer

Thanks for contributing! This looks good to me and we'll get to merging it soon.

soon is how many years?

bclermont avatar Oct 14 '19 08:10 bclermont

Hi, as a user of rest-auth, thanks for the contribution! This repo is not maintained anymore, so the development moved to dj-rest-auth. (reference: https://github.com/Tivix/django-rest-auth/issues/568) It may be best, if you move this PR there. (and upgrade to using dj_rest_auth)

new repo link: https://github.com/jazzband/dj-rest-auth (I'm not the upkeeper of that repo, it just makes sense for me to help you merge your PR)

Many Thanks, Barney

BarnabasSzabolcs avatar May 30 '20 01:05 BarnabasSzabolcs