Commit Graph

18 Commits (e538e0713a9a8fb715a14b46aca182c68737dcab)

Author SHA1 Message Date
Cristi Vijdea df82fe59d7 Remove recommandations for unmaintained flex library
Fixes #285
2019-01-29 09:04: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 a7d3066677 Create testproj default user in data migration 2018-12-21 01:07:10 +02:00
Cristi Vîjdea 2965e08e39 Force descriptions to be str objects
Fixes #159
2018-08-03 20:27:31 +03:00
Amoki bbc70a7e3d Allow specific version generation in command
* Add --api-version parameter
* Fix request mocking
* Add tests
2018-08-03 16:43:26 +03:00
Cristi Vîjdea 22853b87c7 Fix test_noop_inspectors 2017-12-27 20:23:21 +01:00
Beau Gunderson 1f190744cd Add 'generate_swagger' management command (#31)
Closes #29.
2017-12-27 20:00:24 +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 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 174f1153b4
Fix broken SwaggerDict pickling (#15)
Closes #14.
2017-12-15 18:47:10 +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
Cristi Vîjdea 93c51b992d Fix python 3.7 -> 3.7-dev and add flake8 testing
Also fixed flake8 errors.
2017-12-02 23:48:58 +01:00
Cristi Vîjdea 2b0d80dc0f Restructure project to add test support
* separated drf_swagger and testproj modules, moved both out of project root
* added testing support via pytest and tox
* enabled Travis CI
* integrated coverage & Coveralls
2017-12-02 22:48:29 +01:00