Commit Graph

8192 Commits

Author SHA1 Message Date
Aaron Yong
14d740d088 Update DEFAULT_SCHEMA_CLASSES default value in Settings docs (#7014)
The default value was changed to point to the OpenAPI AutoSchema class.  The docs were leading users to believe that rest_framework.schemas.AutoSchema was the default.  As of this commit, the root AutoSchema is in fact imported from the coreapi module.
2019-11-06 21:37:13 +01:00
Erwan Rouchet
5e8fe6edf0 Fix link to Django docs (#7040) 2019-11-06 09:34:28 -08:00
Tom Christie
82f2569895
Update __init__.py 2019-11-05 16:43:32 +00:00
Chris Guo
5521eacb02 Update docs imports (#7030) 2019-11-01 10:56:59 -07:00
Daniel Hnyk
ab40b80fa6 Remove unmaintained django-rest-framework-bulk from docs (#7021) 2019-10-28 03:46:44 -07:00
Erwan Rouchet
39bd6cc5cb Set the proper JSON schema type for HStoreFields in OpenAPI schemas (#6914) 2019-10-27 21:13:01 -04:00
Chris Guo
5ee970c090 Fix docs typos (#7015) 2019-10-24 11:31:12 -07:00
Jeremy Lainé
c9f06bf73f Fix a spelling error in openapi AutoSchema method (#7004)
Replace "pagninator" by "paginator".
2019-10-24 10:51:16 +02:00
Aaron Yong
4d57cd31f6 Update method override example in Schemas docs (#6887) (#7013)
get_link() was a method in the old CoreAPI-based AutoSchema implementation.  The new OpenAPI one defines get_operation() instead: the example code block was overlooked.
2019-10-24 08:54:37 +02:00
Bastien Vallet
64f567a021 Bump CI to Python 3.8 (#7008) 2019-10-22 14:39:01 -07:00
Ryan P Kilby
a8c86be660
Update linter requirements (#7010) 2019-10-22 11:18:51 -07:00
nautikos1235
65ed7be754 Fix markdown code indent in schemas (#7009) 2019-10-22 11:10:15 -07:00
Sergey
43397a81ae Fixed decimal snan deserialization (#7002)
* Added test case causes exception in DecimalField deserialization

* Fixed NaN checking which throws exception with sNaN value
2019-10-22 10:06:37 +01:00
Chris Guo
a734e58d44 Fix docs typos (#7006) 2019-10-21 15:11:12 -07:00
zach valenta
f98b6f3577 proper Github repo issue already resolved (#6999)
per the ticket anyway https://github.com/encode/django-rest-framework/issues/2162
2019-10-17 13:58:12 +01:00
Braden MacDonald
3aa1089a6a Update serializer docs to use correct param name (#6995)
Avoids a pylint warning ".to_representation: Parameters differ from overridden 'to_representation' method" if people copy these examples.
2019-10-15 15:47:05 +01:00
Guilherme Munarolo
0fd72f17ee Fixed crash deleting required schema parameter key on PATCH requests. (#6944)
Closes #6941
2019-10-10 08:50:20 +02:00
David Sanders
9850441e6f Fix docs typo (#6974) 2019-10-08 16:37:58 -07:00
Law Karingithi
0e4811e9ce Fix minor grammatical errors in docs (#6979) 2019-10-08 09:38:14 -07:00
Tom Christie
f9cc190177 Crop width on premium sponsor images 2019-10-07 14:31:16 +01:00
Tom Christie
1f3505931c
Update README.md 2019-10-07 14:22:40 +01:00
Tom Christie
f36ff9b08b
Add Retool as a new premium sponsor (#6977) 2019-10-07 14:21:58 +01:00
Francisco Couzo
37dcd55370 Fix bug in escape_curly_brackets (#6909) 2019-10-04 13:50:19 -07:00
mehrab
b4db2dfacf Fixed no-cls-argument on staticmethod __new__ (#6960) 2019-10-04 12:40:09 -07:00
Konstantinos Tselepakis
30e56f62ba Fix nested write of non-relational fields (#6916) 2019-10-03 09:33:37 -07:00
Xavier Ordoquy
0dac98d215
Merge pull request #6953 from felixxm/import-FieldDoesNotExist
Fixed import of FieldDoesNotExist exception.
2019-09-29 08:53:20 +02:00
Mariusz Felisiak
75afe48b6c Fixed import of FieldDoesNotExist exception. 2019-09-28 20:52:22 +02:00
Ted Stoychev
60f9c12900 Fixed broken link in documentation (#6937) 2019-09-27 09:47:51 -07:00
Yezy Ilomo
5b990d4092 Add django-restql to 3rd party packages in docs (#6947) 2019-09-24 00:22:25 -07:00
Oxan van Leeuwen
2664e65019 Add djangorestframework-dataclasses to 3rd party package docs (#6939) 2019-09-18 11:21:32 -07:00
napsterv
7a3b7d2001 Fixed method signature in docs (#6931) 2019-09-16 10:47:29 -07:00
Tom Christie
89ac0a1c7e
Version 3.10.3 (#6908)
* Version 3.10.3

* Version 3.10.3 release notes
2019-09-04 14:28:25 +01:00
Tom Christie
4b30b32014
Default OpenAPI version to the empty string (#6907) 2019-09-04 12:53:50 +01:00
Pramod Pujara
c0cf37e35d Update tutorial links (#6890) 2019-09-03 11:21:53 -07:00
Yann Savary
e57c1505fc Replaced 'TODO' hardcoded version info by a parameter with default '0.1.0' (#6899) 2019-09-03 16:07:30 +02:00
Peter J. Farrell
b3f032fb8f Fixed #6875 -- Made OpenAPI Schema operationId casing consistent. (#6876) 2019-09-03 16:05:43 +02:00
Dima Knivets
1cc4be47b4 Fixed min/max attributes for serializers.ListField (#6866) 2019-09-03 15:43:54 +02:00
Reupen Shah
f8c16441fa Add support for pagination in OpenAPI response schemas (#6867)
Refs #6846

This provides a way for pagination classes to add pagination properties (`count`, `next`, `results` etc.) to OpenAPI response schemas.

A new method `get_paginated_response_schema()` has been added to `BasePagination`. This method is intended to mirror `get_paginated_response()` (which takes a `list` and wraps it in a `dict`). 

Hence, `get_paginated_response_schema()` takes an unpaginated response schema (of type `array`) and wraps that with a schema object of type `object` containing the relevant properties that the pagination class adds to responses.

The default implementation of `BasePagination.get_paginated_response_schema()` simply passes the schema through unmodified, for backwards compatibility.
2019-09-03 15:25:44 +02:00
Min ho Kim
ec1b14174f Fixed typos (#6872) 2019-08-14 14:39:45 -07:00
Christopher Grebs
5a8736ae45 Handle 'None' return value of wait() properly during throttling. (#6837) 2019-08-12 11:36:05 -07:00
Dima Knivets
a142467586 Fixed incorrect OpenAPI response schema generation for a DELETE method in generic views (#6860) 2019-08-09 15:02:41 +02:00
Chris Vigelius
f7dc6b5656 OpenAPI: Added required description to responses. (#6850) 2019-08-07 22:09:27 +02:00
Chris Vigelius
0ebfbfdf81 OpenAPI: only include non-empty required property. (#6851)
Closes #6834
2019-08-07 21:40:21 +02:00
Gregory N. Schmit
335054a5d3 replace force_text with force_str 2019-08-07 21:05:24 +02:00
Reupen Shah
b45ff07294 Use an array type for list view response schemas
This is the first part of #6846.

Previously, the response schema for list views was an object representing a single item. However, list views return a list of items, and hence it should be an array.

Further work will need to be done to support how pagination classes modify list responses.

There should be no change for views not determined to be list views.
2019-08-07 20:40:22 +02:00
Reupen Shah
a3f244d85e Move AutoSchema serializer instantiation to common method 2019-08-07 20:40:22 +02:00
zeroohub
7e1c4be7ce Avoided double call for remote url in FileField.to_representation. (#6841) 2019-08-06 12:31:46 +02:00
Greg Schmit
0cc09f0c0d Add drf-action-sreializer to third party packages (#6845) 2019-07-30 12:37:49 -07:00
Ryan P Kilby
bcf196d0ac
Remove outdated note about read_only+default (#6847) 2019-07-29 15:10:57 -07:00
Min ho Kim
0e1c5d3132 Fix typos (#6835) 2019-07-25 10:04:01 -07:00