Asif Saif Uddin
1260ed424a
jquery 3.5.1 ( #7313 )
...
* jquery 3.5.1
2020-05-11 13:08:40 +01:00
Ryan P Kilby
8a38991d6a
Fix SearchFilter.must_call_distinict for annotation+m2m ( #7146 )
...
* Test SearchFilter annotation+m2m distinct
* Fix SearchFilter annotation+m2m distinct
2020-05-11 10:55:39 +01:00
Daniil Okhlopkov
4ac0fae75b
use @admin decorator ( #7022 )
2020-05-11 09:04:37 +01:00
Mathieu Pillard
d7777ea10f
Pass custom code to PermissionDenied if permission class had one set ( #7306 )
2020-05-01 10:22:36 +01:00
Ryan P Kilby
e275b9036a
Allow context to be provided to get_serializer ( #7298 )
...
* Test generics serializer behavior
* Allow context to be provided to get_serializer
2020-04-29 11:19:44 +01:00
Dhaval Mehta
e1336387d1
Added example
for pagination in schemas. ( #7275 )
2020-04-24 16:13:13 +02:00
Matthaus Woolard
812f254bbd
SearchFilter to support JSONField and HStoreField ( #7121 )
...
* SearchFilter to support Custom query Transforms
Since Some fields support `__` as a custom Transform for query lookups we needed to update the m2m checking code to handle search_fields that contain __ that are not relationships.
* Update documentation on SearchFilter to include references to JSON and HStore Fields.
2020-04-23 09:38:14 +01:00
Byron Peebles
676aa77223
Fix punctuation in system check ( #7281 )
2020-04-20 16:40:05 -07:00
Carlton Gibson
b2497fc245
Convert openapi.AutoSchema methods to public API.
2020-04-09 20:05:16 +02:00
Carlton Gibson
d45e0005f3
Updated deprecation warnings for 3.12
2020-04-09 20:05:16 +02:00
Carlton Gibson
b1bfff4f1c
Revert "Schemas: Improved decimal handling when mapping ChoiceField. ( #7264 )"
...
This reverts commit 1872bde462
.
2020-04-09 19:35:46 +02:00
Dhaval Mehta
1872bde462
Schemas: Improved decimal handling when mapping ChoiceField. ( #7264 )
2020-04-09 19:18:00 +02:00
Clinton Blackburn
603aac7db1
Corrected OpenAPI schema type for DecimalField ( #7254 )
2020-04-09 19:16:17 +02:00
Dhaval Mehta
41f27c3b43
Schemas: Don't generate component for DELETE method. ( #7229 )
2020-04-09 19:10:50 +02:00
François Freitag
e6c1afbcf9
Tighten checks for invalid field name in ordering ( #7259 )
...
Django master removed the ORDER_PATTERN regex with commit
513948735b
2020-04-07 12:28:09 +02:00
Ryan P Kilby
dd33ebb4e2
Add Request repr ( #7239 )
2020-03-29 12:01:14 +01:00
Ryan P Kilby
908f91d8ef
Set action for HEAD requests ( #7223 )
...
* Test viewset action attr
* Add 'head' to viewset actions map
2020-03-09 09:43:02 +00:00
Tom Christie
73f7bf4941
Extra action detection is too permissive. Add failing test + fix ( #7217 )
...
* Add failing test
* Add failing test++
* Make get_extra_action less permissive
2020-03-05 10:18:22 +00:00
Martin Desrumaux
6a23fa0649
OpenAPI: Make operationId camelCase, matching spec examples. ( #7208 )
2020-03-03 17:51:51 +01:00
Martin Desrumaux
609f708a27
Fix schema generation for ObtainAuthToken view. ( #7211 )
2020-03-03 13:27:34 +01:00
Martin Desrumaux
8aa8be7653
Implement OpenAPI Components ( #7124 )
2020-03-02 19:35:27 +01:00
Martin Desrumaux
797518af6d
OpenAPI: Warn user about duplicate operationIds. ( #7207 )
2020-03-02 16:44:06 +01:00
Martin Desrumaux
5b16a17242
OpenAPI: Allow customizing operation name. ( #7190 )
2020-03-02 16:40:18 +01:00
Mateusz Legięcki
94a09149b6
OpenAPI: Use 201 status code for POST requests. ( #7206 )
2020-03-02 16:32:26 +01:00
Dhaval Mehta
2a5c2f3f70
Added OpenAPI tags to schemas. ( #7184 )
2020-02-28 12:06:03 +01:00
Kevin Kennell
d7b218f5eb
decode base64 credentials as utf8; adjust tests ( #7193 )
...
* decode base64 credentials as utf8; adjust tests
* basicauth: add dedicated test for utf8 credentials
* basicauth: add fallback to latin-1 encoding if utf-8 fails
2020-02-17 16:10:52 +00:00
Thorsten
f81ca78642
Add file option to generateschema ( #7130 )
2020-02-12 20:35:54 +01:00
Thorsten
4137ef41ef
Disable yaml aliases for schema generation. ( #7131 )
2020-02-03 14:41:47 +01:00
Kentalot
79d37bce4c
OpenAPI: Include type key in schema object properties dict. ( #7169 )
2020-01-30 12:14:17 +01:00
Dhaval Mehta
bc4d52558b
Schemas: Add mapping of type for ChoiceField. ( #7161 )
2020-01-29 19:15:56 +01:00
Stella
160f912a60
Schemas: Handle default=false for boolean fields ( #7165 )
2020-01-29 10:20:51 +01:00
Fábio Domingues
d22daf4e05
OpenAPI: Use _get_serializer() in _get_operation_id() ( #7160 )
2020-01-26 19:13:08 +01:00
Fábio Domingues
e4a26ad58a
Corrected _get_serializer() argument order. ( #7156 )
2020-01-23 15:53:47 +01:00
Kevin Brown
98c8af5291
ListField
mapping should map all options for the child
...
Previously it was only mapping the `type` and `format`, even though
for some field types (like a `MultipleChoiceField`) we map more
than just these. And for some fields (like a `ChoiceField`) we do
not map the `type` at all.
2020-01-21 20:45:07 +01:00
Carlton Gibson
496947be3a
Inline unnecessary method in OpenAPI schema generator.
2020-01-21 20:05:13 +01:00
Carlton Gibson
d0b9577605
Return valid OpenAPI schema even when empty.
2020-01-21 20:05:13 +01:00
Ryan P Kilby
5f3f2ef106
Add note that APISettings is an internal class ( #7144 )
2020-01-15 10:52:29 +00:00
Sebastian Pipping
373e521f36
Make CharField prohibit surrogate characters ( #7026 ) ( #7067 )
...
* CharField: Detect and prohibit surrogate characters
* CharField: Cover handling of surrogate characters
2020-01-06 14:12:21 +00:00
Tom Christie
430a567258
Update openapi.py
2020-01-03 13:50:26 +00:00
Noam
ced37a56cb
Avoid outputting callable defaults to schema. ( #7105 )
2020-01-03 13:49:46 +00:00
Ran Benita
62ae241894
Remove outdated comment in SerializerMethodField ( #7110 )
...
Since 91ea138406
.
2020-01-02 14:52:05 +00:00
Ran Benita
d985c7cbb9
Remove a few no longer needed compat checks and references ( #7092 )
...
* serializers: removes no longer needed compat checks
UUIDField and DurationField are both supported in all supported Django
versions.
IPAddressField was removed in Django 1.9, which is no longer supported.
* serializers: move related code closer together
This way it's easier to see all of the mappings in one place.
* serializers,docs: remove some DRF 2.x references
The last release of DRF 2.x was 5 years ago, it seems fine to remove
these references now.
2019-12-16 18:59:25 +00:00
Tom Christie
de497a9bf1
Version 3.11 ( #7083 )
...
* Version 3.11
* Added notes on OpenAPI changes for 3.11.
* Minor docs tweaking
* Update package version and supported versions
* Use a lazy import for django.test.client.encode_mutlipart. Closes #7078
2019-12-12 14:31:40 +00:00
Jordan Ephron
3c1428ff79
Fix NotImplementedError for Field.to_internal_value and Field.to_representation ( #6996 )
2019-12-12 14:09:34 +00:00
Ryan P Kilby
b8c369c4cf
Fix serializer multiple inheritance bug ( #6980 )
...
* Expand declared filtering tests
- Test declared filter ordering
- Test multiple inheritance
* Fix serializer multiple inheritance bug
* Improve field order test to check for field types
2019-12-12 14:03:55 +00:00
Ryan P Kilby
236667b717
Fix UniqueTogetherValidator with field sources ( #7086 )
...
* Add failing tests for unique_together+source
* Fix UniqueTogetherValidator source handling
* Fix read-only+default+source handling
* Update test to use functional serializer
* Test UniqueTogetherValidator error+source
2019-12-12 13:02:30 +00:00
Aarni Koskela
f744da74d2
Improve the docstring on @action ( #6951 )
2019-12-11 15:08:54 -08:00
Ryan P Kilby
de9f1d56c4
Followup to set_context removal ( #7076 )
...
* Raise framework-specific deprecation warnings
- Use `RemovedInDRF313Warning` instead of DeprecationWarning
- Update to follow deprecation policy
* Pass serializer instead of model to validator
The `UniqueTogetherValidator` may need to access attributes on the
serializer instead of just the model instance. For example, this is
useful for handling field sources.
* Fix framework deprecation warning in test
* Remove outdated validator attribute
2019-12-11 08:44:08 +00:00
Roy Segall
ebcd93163a
Adding I'm a teapot error code ( #7081 )
2019-12-10 09:18:35 +00:00
Ryan P Kilby
90eaf51839
Update framework deprecation warnings ( #7075 )
...
- Bump version numbers for deprecation warnings
- Drop deprecated features
2019-12-04 16:18:38 -08:00