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
e0aec3ff45
Test that get_serializer is not called when overriden
...
Views' ``get_serializer`` methods should not be called when the serializer is provided by ``request_body`` or ``responses``.
Closes #154
2018-06-29 17:41:41 +03:00
Andrew Yager
4825ec70b1
Handle swagger_extra_fields in field_to_swagger_object ( #142 )
...
* Move add_manual_fields call to make_schema_definition
* Do not call add_manual_fields twice
2018-06-16 17:02:06 +03:00
Cristi Vîjdea
d627a1bc5d
Handle coreapi Fields without a schema attribute
...
Fixes #143
2018-06-16 15:08:59 +03:00
Cristi Vîjdea
38e884b5ea
Remove wrong 'count' in paginator response required fields
...
Fixes #141
2018-06-16 15:06:09 +03:00
Cristi Vîjdea
2ef7cfbfe3
Catch and log exceptions raised from get_serializer
...
Fixes #135
2018-06-01 16:21:25 +03:00
Cristi Vîjdea
58adbb8f4c
Coerce read_only into a boolean
2018-06-01 15:36:37 +03:00
Cristi Vîjdea
256a052564
Add ability to set Schema fields through the serializer Meta class ( #134 )
...
* Add swagger_schema_fields attribute to serializer Meta class
* Add documentation
Closes #132 .
2018-05-31 00:15:21 +03:00
Cristi Vîjdea
cc90bc1544
Add some coverage exemptions
2018-05-30 22:33:36 +03:00
werwty
408b31fc4f
Avoid marking read_only fields as required ( #133 )
...
* Avoid marking read_only fields as required
Read only properties cannot be marked as required by a schema.
2018-05-30 21:56:52 +03:00
Cristi Vîjdea
aca0c4713e
Allow body on HTTP DELETE view methods ( #122 )
...
* Allow body in delete requests
* Do not add request body to DELETE by default
* Check manual form parameters against body_methods
* Add tests
* Add changelog
Closes #118
2018-05-14 19:15:14 +03:00
Fabian Weisshaar
5b225423ae
Set min_length=1 when allow_blank=False ( #112 )
2018-04-27 13:02:26 +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
c0f37f6ec1
Avoid crash when hitting unknown model fields
...
Fixes #102
2018-04-25 22:41:06 +03:00
Cristi Vîjdea
ccdf646c0e
Run isort
2018-03-18 20:01:21 +02:00
John Carter
fb240f6a5b
Detect type of SlugRelatedField with readonly=True ( #83 )
...
* Added test for #82 - readonly SlugRelatedField not showing format uuid
* Added ArticleGroup model
* Added example of SlugRelatedField to a uuid field with and without readonly
* Check remote_field.model in get_related_model
Closes #82 .
2018-03-10 13:29:20 +02:00
John Carter
2c459024d1
Handle django rest framework HiddenField ( #79 )
...
* Added HiddenFieldInspector (#78 )
* Updated docs + added test for HiddenField
Added HiddenField to testproj (no change in yaml as expected)
Closes #78 .
2018-03-09 22:46:47 +02:00
Cristi Vîjdea
9ad55bac99
Guard against attempted deletion of inexistent attributes
...
Fixes #76
2018-03-05 19:59:03 +02:00
Cristi Vîjdea
ee46f59fb1
Infer ChoiceField type from model field when in ModelSerializer
...
Fixes part of issue #69
2018-02-26 20:32:57 +02:00
Cristi Vîjdea
b38d3e6805
Do not set pattern on non-string values
...
Fixes #68
2018-02-23 18:51:55 +02:00
Cristi Vîjdea
64c280e222
Allow Response objects with no schema
...
Fixes #66 .
2018-02-22 03:46:44 +02:00
Cristi Vîjdea
d5073081d9
Fix ModelViewSet Nested bug ( #65 )
...
* Add todo repro app
* Add explicit test against model named "Nested"
* Force serializers named NestedSerializer to be output as inline models
* Allow ref_name to rescue a NestedSerializer
* Add tests and documentation
2018-02-22 03:46:16 +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
c4379dc6a7
Run testproj in a Heroku demo app ( #38 )
...
* Add Heroku configuration
* Add links in API description
* Read database connection string from DATABASE_URL environment variable
* Restructure settings files for production
* Run server using gunicorn and servce static files with whitenoise
* Install drf-yasg from source instead of pypi in testproj
* Add readme links to demo app
2018-01-10 10:18:22 +01:00
Cristi Vîjdea
faf81e7b6d
Simplify should_filter and should_page
2018-01-01 19:17:37 +01:00
Cristi Vîjdea
02b72c466e
Do not generate readOnly outside Schema properties
2018-01-01 19:16:20 +01:00
Cristi Vîjdea
eba228a114
Prepare release 1.1.1
2017-12-27 21:05:07 +01:00
Cristi Vîjdea
d39764d383
Add isort
2017-12-27 20:23:05 +01:00
Cristi Vîjdea
60e266fe99
Make sphinx document CamelCaseJSONFilter
2017-12-27 20:14:12 +01:00
Cristi Vîjdea
c85acee405
Convert regex '\Z' to '$'
...
See https://github.com/swagger-api/swagger-editor/issues/1601 .
2017-12-27 03:00:47 +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