Dimas Ari
86c1675c58
make sure all ListModelMixin views considered as list view ( #306 )
...
* make sure all ListModelMixin views considered as list view
* test to make sure all ListModelMixin views considered as list view added
2019-04-01 02:57:14 +03:00
Cristi Vijdea
340a60324c
Add special exclusion for FileUploadParser
...
Fixes #288
2019-03-04 00:48:55 +02:00
Cristi Vîjdea
762467285c
Keep dict key order for Python 3.7
2019-01-14 14:25:10 +02:00
Cristi Vîjdea
bebcc982e6
Call APIView get_ methods instead of direct attribute access
...
queryset -> get_queryset
renderer_classes -> get_renderers
parser_classes -> get_parsers
2018-12-23 18:19:45 +02:00
Cristi Vîjdea
dd5965fa92
Fix tuple types in sphinx docstrings
2018-12-21 18:18:58 +02:00
Cristi Vîjdea
66026d3483
Fix lint errors
2018-12-21 15:07:38 +02:00
Cristi Vîjdea
db61c39ab1
Fix union types in sphinx docstrings
2018-12-21 15:04:25 +02:00
Cristi Vîjdea
1f95f4098b
Don't allow form parameters with non-form consumes
...
Closes #270 .
2018-12-12 12:43:33 +02:00
Vitali Fokin
f415a96aa6
Tags override support ( #259 )
2018-12-11 20:13:37 +02:00
Cristi Vîjdea
207a7e2b2d
Do not generate full schema in UI views
2018-10-09 01:38:12 +03:00
Cristi Vîjdea
27cd5f7f2a
Add some convenience methods
2018-09-11 02:41:55 +03:00
Cristi Vîjdea
271918a678
Fix empty swagger_auto_schema return value
2018-09-09 23:14:09 +03:00
Cristi Vîjdea
5fa35d5b81
Check for None before calling to_representation
...
Django REST Framework also does this in serializers.
https://github.com/encode/django-rest-framework/issues/2299
4d57d46bf8/rest_framework/serializers.py (L518)
Fixes #203 .
2018-09-09 22:22:58 +03:00
Terence D. Honles
f9b215deab
Fix missing backslashes found via pytest 3.8 ( #202 )
...
See: https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
Changed in version 3.6: Unrecognized escape sequences produce a DeprecationWarning
Closes #202 .
2018-09-09 22:17:04 +03:00
Nour Chawich
0837873f55
Add missing overrides to `swagger_auto_schema` ( #194 )
...
Add missing `operation_summary` and `deprecated` to `swagger_auto_schema` decorator data. The previous PR missed adding these to extra overrides.
- Added tests
- Updated reference.yaml
Refs #149 , #173 .
Closes #194 , #198 .
2018-09-09 22:15:50 +03:00
Cristi Vîjdea
d1ae81a27e
Fix relative imports
2018-08-09 03:52:09 +03:00
Cristi Vîjdea
23ebba4207
Rename swagger_serializer_method parameter and update docs
2018-08-08 01:41:54 +03:00
Cristi Vîjdea
12f1d23048
Fix lint errors
2018-08-08 01:24:36 +03:00
Cristi Vîjdea
a5eb3dfa91
Add EXCLUDED_MEDIA_TYPES setting
...
Closes #158 .
2018-08-08 00:59:01 +03:00
Cristi Vîjdea
5cd642c9a0
Show warning on ref_name collisions
...
Closes #156
2018-08-08 00:58:35 +03:00
Cristi Vîjdea
247c1a306a
Add `operation_summary` and `deprecated` to `swagger_auto_schema`
...
Closes #149 , #173 .
2018-08-08 00:57:30 +03:00
Cristi Vîjdea
37c00ab3fb
Make swagger_schema_fields work on serializer Fields
...
Closes #167 .
2018-08-07 22:54:24 +03:00
Cristi Vîjdea
65aac1da2c
Make swagger_auto_schema work with action mappings
...
Fixes #177 .
2018-08-07 22:38:36 +03:00
John Carter
748b5d3c2f
Add support for SerializerMethodField ( #179 )
...
Closes #137 , #179 .
2018-08-07 21:23:36 +03:00
Cristi Vîjdea
16b6ed7fd6
Test with Django 2.1 and Python 3.7 ( #176 )
...
* Test with Django 2.1 and Python 3.7
* Fix lint errors
* Remove setuptools-scm hack
* Factor out coverage script
* Cache .tox in travis
* Update README & docs
2018-08-06 12:24:56 +03:00
Cristi Vîjdea
904895ba3c
Add 1.9.2 changelog
2018-08-03 23:43:52 +03:00
Cristi Vîjdea
2965e08e39
Force descriptions to be str objects
...
Fixes #159
2018-08-03 20:27:31 +03:00
Cristi Vîjdea
9fa4765121
Ignore None when passed in as response override
...
Closes #148
2018-06-29 23:13:36 +03:00
Cristi Vîjdea
bfd88cbdb4
Fix security type hint
2018-05-12 13:30:57 +03:00
Roman Sichny
979ec84630
Django rest framework recursive support ( #110 )
...
* add get_serializer_ref_name utility function
* implement RecursiveFieldInspector
* add option to allow non-existing reference in SchemaRef
* add examples and README
* Update changelog and docs
2018-04-27 01:51:10 +03:00
Cristi Vîjdea
7270154828
Test with Django Rest Framework 3.8 ( #96 )
...
* Add djangorestframework 3.8 to tox and travis
* Add @action tests
* Limit tox to <3.0.0
2018-04-04 22:59:57 +03:00
Cristi Vîjdea
6ea8711a1f
Fix in-place modification of swagger_auto_schema arguments ( #75 )
...
Fixes #74
2018-03-05 11:51:51 +02:00
Cristi Vîjdea
73c60a8fda
Add assertion against mistaken swagger_auto_schema `methods` usage
2018-02-21 04:42:56 +02:00
Cristi Vîjdea
97cd1b63d9
Take coerce_to_string into account when handling DecimalField
...
Closes #62 .
2018-02-21 04:42:34 +02:00
Cristi Vîjdea
a211184478
Add documentation about excluding endpoints
...
Closes #50 .
2018-01-24 17:38:10 +02:00
Cristi Vîjdea
a3e81ef7f6
Improve handling of consumes and produces attributes ( #55 )
...
* Fix get_consumes
* Generate produces for Operation
* Set global consumes and produces from rest framework DEFAULT_ settings
2018-01-24 14:44:00 +02:00
Cristi Vîjdea
fc35d9043e
Add security requirements handling ( #54 )
...
* Add security requirements handling
* Update swagger-ui to 3.9.2, ReDoc to 1.20.0
Closes #39 .
2018-01-23 12:43:25 +02:00
Cristi Vîjdea
6608e0050c
Improve swagger_auto_schema usage error reports
2018-01-03 05:44:53 +01:00
Cristi Vîjdea
68b0dda0b9
Clean up and release 1.1.3
2018-01-02 22:27:09 +01:00
Cristi Vîjdea
faf81e7b6d
Simplify should_filter and should_page
2018-01-01 19:17:37 +01:00
Cristi Vîjdea
d39764d383
Add isort
2017-12-27 20:23:05 +01:00
Cristi Vîjdea
c89f96fcb0
Prepare for 1.1.0 ( #30 )
...
* refactor the view inspection process to be more modular and allow recursive customization
* add operation_id argument to @swagger_auto_
* add inspections for min/max validators
* add support for URLPathVersioning and NamespaceVersioning
* integrate with djangorestframework-camel-case
* fix bugs, improve tests and documentation
2017-12-26 22:50:59 +01:00
Cristi Vîjdea
73adc49b2c
Prepare release 1.0.6
2017-12-23 12:29:34 +01:00
Cristi Vîjdea
43034ddc4b
Fixed assumption of dict ordering
2017-12-23 12:04:02 +01:00
Cristi Vîjdea
9f6ee4da87
Improve RelatedField and callable default handling
...
- callable default values will now be properly called
- PrimaryKeyRelatedField and SlugRelatedField will now return an appropriate type based on the relation model's Field
- mock views now have a request object bound even when public is True
2017-12-23 11:52:57 +01:00
Nicolas Delaby
f05889292a
Add type inspection for PrimaryKeyRelatedField ( #26 )
...
Guess the type for PrimaryKeyRelatedField from the related ModelField.
2017-12-22 21:00:13 +01:00
Cristi Vîjdea
6060192a89
Update changelog and clean up code
2017-12-18 14:23:57 +01:00
Cristi Vîjdea
06a461ec09
Merge pull request #21 from h-hirokawa/file-field-response
...
Add support for FileField response.
2017-12-18 13:16:21 +01:00
h-hirokawa
cae07f3eaf
Add `read_only` to FileField response.
2017-12-18 20:30:14 +09:00
h-hirokawa
8a0d5a964d
Add support for serializers.FileField response.
2017-12-18 19:03:40 +09:00