Commit Graph

24 Commits (acc204e4ea6f16f8541eed1e940e9b7e4ebe6ea6)

Author SHA1 Message Date
elliott-omosheye b5aba7243d Fix unicode attribute error if typing installed on py2.7 (#363) 2019-06-13 00:51:47 +03:00
Cristi Vîjdea b15535995f Add assertion against TYPE_ARRAY with no items 2018-12-23 15:32:06 +02:00
Cristi Vîjdea de950461c7 Fix absolute urls for swagger-ui oauth settings 2018-12-21 12:40:31 +02:00
Cristi Vîjdea b385228f7d Add mock OAuth2 provider to testproj 2018-12-21 01:07:11 +02:00
Cristi Vîjdea a7d3066677 Create testproj default user in data migration 2018-12-21 01:07:10 +02:00
Vitali Fokin f415a96aa6 Tags override support (#259) 2018-12-11 20:13:37 +02:00
Cristi Vîjdea 708e70a526 Use collectionFormat=multi for MultiChoiceField in query and formData
Fixes #257.
2018-11-29 01:38:40 +02:00
Cristi Vîjdea 41b1ca4483 Do not bail on response when request body is formData 2018-09-10 00:02:39 +03:00
Cristi Vîjdea b109d4c847 Fix bad test for no_body 2018-09-09 23:14: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 37c00ab3fb Make swagger_schema_fields work on serializer Fields
Closes #167.
2018-08-07 22:54:24 +03:00
John Carter 748b5d3c2f Add support for SerializerMethodField (#179)
Closes #137, #179.
2018-08-07 21:23:36 +03: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 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 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
Cristi Vîjdea 521172c195 Clean up Django 2 path backslashes
In Django 2, routes defines via urls.path are aggresively escaped when converted into regex.

This is a naive fix which unescapes all characters outside capture groups, but in the context of OpenAPI is okay because regular expressions inside paths are not supported anyway.

This issue affects django-rest-framework as well, as outlined in encode/django-rest-framework#5672, encode/django-rest-framework#5675.
2017-12-18 01:06:14 +01:00
Cristi Vîjdea 73bd7a136d
Add query_serializer argument to swagger_auto_schema (#17)
Closes #16.
2017-12-16 15:37:42 +01:00
Cristi Vîjdea c66f7e8e01 Rename to drf-yasg
drf-swagger was already taken
2017-12-13 10:22:03 +01:00
Cristi Vîjdea 8883894775
Add more tests and cleanup coverage reports (#13)
Closes #11
2017-12-12 17:30:58 +01:00
Cristi Vîjdea bfced82ae4
Add suport for Response schemas (#10)
Schemas generated from Serializers will now be added to the `definitions` section by default, and used as `$ref` objects where needed.  
The Schema definition name is based on the serializer class name, and can be overriden by specifying a `__ref_name__` property on the Serializer. If this property is set to None, the schema will not be added to `definitions` and will be forced inline.

Closes #6, #7.
2017-12-10 03:06:49 +01:00
Cristi Vîjdea 652795f5db Add swagger_auto_schema method decorator for Operation customization
See #5.
2017-12-08 17:45:00 +01:00
Cristi Vîjdea dce00156d5
Rewrite schema generation (#1)
* Completeley rewritten schema generation
* Added support for python 2.7 and 3.4
* Restructured testing and build configuration
* Added nested request schemas

This rewrite completely replaces the public interface of the django rest schema generation library, so 
further changes will be needed to re-enable and further extend the customization points one might want.
2017-12-05 19:46:02 +01:00