django-rest-framework/rest_framework/schemas
Carlton Gibson a0cdba6277
Extract method for manual_fields processing (#5633)
* Extract method for `manual_fields` processing

Allows reuse of logic to replace Field instances in a field list by `Field.name`.

Adds a utility function for the logic plus a wrapper method on `AutoSchema`.

Closes #5632

* Manual fields suggestions (#2)

* Use OrderedDict in inspectors

* Move empty check to 'update_fields()'

* Make 'update_fields()' an AutoSchema staticmethod

* Add 'AutoSchema.get_manual_fields()'

* Conform '.get_manual_fields()' to other methods

* Add test for update_fields

* Make sure `manual_fields` is a list.

(As documented to be)

* Add docs for new AutoSchema methods.

* `get_manual_fields`
* `update_fields`

* Add release notes for PR.
2017-12-04 09:07:43 +01:00
..
__init__.py allow custom authentication and permission classes for docs view 2017-09-25 16:17:25 +02:00
generators.py Compat cleanup (#5581) 2017-11-10 09:41:03 +01:00
inspectors.py Extract method for manual_fields processing (#5633) 2017-12-04 09:07:43 +01:00
utils.py Have is_list_view recognise RetrieveModel… views (#5480) 2017-10-05 20:41:14 +02:00
views.py Allow schema = None. Deprecate exclude_from_schema (#5422) 2017-09-20 11:29:47 +02:00