get_schema_view parameters lack SchemaGenerator parameters · Issue #4751 · encode/django-rest-framework (original) (raw)
Checklist
- [ x ] I have verified that that issue exists against the
master
branch of Django REST framework. - [ x ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [ x ] This is not a usage question. (Those should be directed to the discussion group instead.)
- [ x ] This cannot be dealt with as a third party library. (We prefer new functionality to be in the form of third party libraries where possible.)
- [ x ] 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
Call get_schema_view
with patterns=something
and you get an error because it is not defined.
get_schema_view(title=None, url=None, renderer_classes=None):
generator = SchemaGenerator(title=title, url=url)
but SchemaGenerator
object allows:
class SchemaGenerator(object):
def __init__(self, title=None, url=None, patterns=None, urlconf=None)
Expected behavior
Be able to call get_schema_view
with patterns
.
I don't know why it is not allowed given that the SchemaGenerator
object that is instantiated allows patterns
to limit the inspected urls.
Actual behavior
TypeError
unexpected keyword argument