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
I have reduced the issue to the simplest possible case.
I have included a failing test as a pull request. (If you are unable to do so we can still accept the issue.)
Steps to reproduce
If you have two end points:
/self supporting [DELETE, GET, PUT] and /version/self supporting [GET, PUT]
both will have same category self. Thus when schema is generated the GET and PUT methods from 1st end point will be overwritten and the schema will only show DELETE as accepted method for that endpoint
for category, action, link in links:
if category is None:
content[action] = link
elif link.url in content:
content[link.url][action] = link
else:
content[link.url] = {action: link}
The text was updated successfully, but these errors were encountered:
Checklist
master
branch of Django REST framework.Steps to reproduce
If you have two end points:
/self
supporting[DELETE, GET, PUT]
and/version/self
supporting[GET, PUT]
both will have same category
self
. Thus when schema is generated theGET
andPUT
methods from 1st end point will be overwritten and the schema will only showDELETE
as accepted method for that endpointExpected behavior
Methods should not be overwritten.
Work Around
I have edited https://github.com/tomchristie/django-rest-framework/blob/d0ed482d7094e94b8cbfdc6c0f8335e02d79b765/rest_framework/schemas.py#L108 portion with this for now so it would behave as expected
The text was updated successfully, but these errors were encountered: