Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.
ChoiceField
s (#400)Release date: Jun 13, 2019
reference_resolver_class
attribute hook to SwaggerAutoSchema
(#350)operation_keys
attribute to SwaggerAutoSchema
, along with __init__
parameter (#355)issubclass
check without isclass
checkswagger-ui
to version 3.22.3ReDoc
to version 2.0.0-rc.8-1Python 3.4 support has been dropped!
is_list_view
and has_list_response
extension points to SwaggerAutoSchema
(#331)swagger-ui
to version 3.22.0ReDoc
to version 2.0.0-rc.4ListModelMixin
will now always be treated as a list view (#306)choices
will now be handled properly (#340)🎉 400 commits 🎉
swagger-ui
to version 3.21.0ref_name
collisions will now throw an exceptionRecursiveField
will now also work as a child of ListSerializer
(#321)minLength
and maxLength
for ListSerializer
and ListField
items
property of Schema
, Parameter
and Items
objects was renamed to items_
; this is a mildly breaking change and was needed to fix the collision with the items
method of dict
(#308)get_summary
and get_description
methods have been removed (previously deprecated in 1.12.0)Optional
(#272)swagger-ui
to version 3.20.5ReDoc
to version 2.0.0-rc.2flex
validator; it will still work if the library is installed, but the setup.py requirement was removed and the validator will be silently skipped if not installed (#285)ReDoc
to version 2.0.0-rc.0DEFAULT_VERSION
for mock requestself
parameterget_security_definitions
and get_security_requirements
hooks to OpenAPISchemaGenerator
get_summary_and_description
and split_summary_from_description
extension points to SwaggerAutoSchema
to allow for better customisationswagger-ui
to version 3.20.4next
and previous
fields are now marked as x-nullable
(#263)tags
argument to swagger_auto_schema
(#259)enum
will now be automatically detected from ChoiceField
if all choices
values are objects of the same Python class (#264)SwaggerValidationError
details will now be logged and shown in the exception messageget_queryset
, get_parsers
and get_renderers
will no longer be bypassedread_only
serializer fields will be correctly ignored when generating form parameters (#261)UIRenderer
(#268)securityDefinitions
and security
objectsget_summary
and get_description
extension points have been deprecated in favor of the new get_summary_and_description
, and will be removed in a future releaseIMPORTANT PACKAGING NOTE
Starting with this version, the setup_requires
argument was dropped from setup.py
in favor of build-system.requires
in pyproject.toml
. This means that for correctly building or installing from sdist, you will need to use a PEP517/PEP518 compliant tool (tox>=3.3.0, setuptools>=40, pip>=10.0, pep517.build) or manually install the build requirements yourself (just setuptools
and setuptools-scm
, for now).
Additionally, for correct package version detection, a full git checkout is required when building (this was always the case). Building without .git
or without setuptools-scm
will result in a distribution with a version like drf-yasg-1!0.0.0.dev0+noscm.00000167d19bd859
.
swagger-ui
to version 3.20.1ReDoc
to version 2.0.0-alpha.41minLength
and maxLength
will now also work for ListSerializer
in addition to ListField
MultipleChoiceField
will now use the multi
collectionFormat
where appropriate (#257)format
, pattern
, enum
, min_length
and max_length
attributes of coreschema.Schema
will now be persited into the converted openapi.Parameter
(#212, #233)PERSIST_AUTH
, REFETCH_SCHEMA_WITH_AUTH
, REFETCH_SCHEMA_ON_LOGOUT
settings and related javascript implementation for persisting authentication data to swagger-ui localStorageSwagger
object with no paths
and definitions
FETCH_SCHEMA_WITH_QUERY
setting to enable fetching of the schema document using query parameters passed to the UI view (#208)x-nullable
extension (#217)swagger-ui.html
/redoc.html
and some JavaScript hooks in swagger-ui-init.js
inspect.signature
on python 2.7 (#222)