Changelog¶
1.10.2¶
Release date: Sep 13, 2018
- ADDED: added the
DISPLAY_OPERATION_ID `` ``swagger-ui
setting - IMPROVED: updated
ReDoc
to version 2.0.0-alpha.38 - IMPROVED: Operation summary will now be parsed from multi-line view method docstrings (#205)
- IMPROVED:
pattern
will now work on any field with aRegexValidator
(would previously not appear on fields with special formats such asEmailField
) - FIXED: fixed an issue with
RelatedFieldInspector
handling of nested serializers - FIXED: fixed handling of
reverse_lazy
in URL settings (#209)
1.10.1¶
Release date: Sep 10, 2018
- ADDED: added the
SPEC_URL
setting for controlling the download link inswagger-ui
andReDoc
- ADDED: updated
ReDoc
settings (addedNATIVE_SCROLLBARS
andREQUIRED_PROPS_FIRST
) - ADDED: added
extra_styles
andextra_scripts
blocks to ui templates (#178) - IMPROVED: updated
swagger-ui
to version 3.18.2 - IMPROVED: updated
ReDoc
to version 2.0.0-alpha.37 - FIXED: stopped generating invalid OpenAPI by improper placement of
readOnly
Schemas - FIXED: fixed broken CSS when
USE_SESSION_AUTH=False
- FIXED: fixed implementation of
operation_summary
anddeprecated
(#194, #198) - FIXED: fixed a bug related to nested
typing
hints (#195) - FIXED: removed dependency on
future
(#196) - FIXED: fixed exceptions logged for fields with
default=None
(#203) - FIXED: fixed
request_body=no_body
handling and related tests (#188, #199)
1.10.0¶
Release date: Aug 08, 2018
ADDED: added
EXCLUDED_MEDIA_TYPES
setting for controllingproduces
MIME type filtering (#158)ADDED: added support for
SerializerMethodField
, via theswagger_serializer_method
decorator for the method field, and support for Python 3.5 style type hinting of the method field return type (#137, #175, #179)NOTE: in order for this to work, you will have to add the new
drf_yasg.inspectors.SerializerMethodFieldInspector
to yourDEFAULT_FIELD_INSPECTORS
array if you changed it from the default valueIMPROVED: updated
swagger-ui
to version 3.18.0IMPROVED: added support for Python 3.7 and Django 2.1 (#176)
IMPROVED:
swagger_schema_fields
will now also work on serializerField
s (#167)IMPROVED:
ref_name
collisions will now log a warning message (#156)IMPROVED: added
operation_summary
anddeprecated
arguments toswagger_auto_schema
(#149, #173)FIXED: made
swagger_auto_schema
work with DRF 3.9@action
mappings (#177)
1.9.2¶
Release date: Aug 03, 2018
- IMPROVED: updated
swagger-ui
to version 3.17.6 - IMPROVED: updated
ReDoc
to version 2.0.0-alpha.32 - IMPROVED: added
--api-version
argument to thegenerate_swagger
management command (#170) - FIXED: corrected various documentation typos (#160, #162, #171, #172)
- FIXED: made
generate_swagger
work for projects without authentication (#161) - FIXED: fixed
SafeText
interaction with YAML codec (#159)
1.9.1¶
Release date: Jun 30, 2018
- IMPROVED: added a
swagger_fake_view
marker to more easily detect mock views in view methods;getattr(self, 'swagger_fake_view', False)
inside a view method likeget_serializer_class
will tell you if the view instance is being used for swagger schema introspection (#154) - IMPROVED: updated
swagger-ui
to version 3.17.1 - IMPROVED: updated
ReDoc
to version 2.0.0-alpha.25 - FIXED: fixed wrong handling of duplicate urls in urlconf (#155)
- FIXED: fixed crash when passing
None
as a response override (#148)
1.9.0¶
Release date: Jun 16, 2018
- ADDED: added
DEFAULT_GENERATOR_CLASS
setting and--generator-class
argument to thegenerate_swagger
management command (#140) - FIXED: fixed wrongly required
'count'
response field onCursorPagination
(#141) - FIXED: fixed some cases where
swagger_schema_fields
would not be handlded (#142) - FIXED: fixed crash when encountering
coreapi.Fields
s without aschema
(#143)
1.8.0¶
Release date: Jun 01, 2018
- ADDED: added a swagger_schema_fields field on serializer
Meta
classes for customizing schema generation (#132, #134) - FIXED: error responses from schema views are now rendered with
JSONRenderer
instead of throwing confusing errors (#130, #58) - FIXED:
readOnly
schema fields will now no longer be marked asrequired
(#133)
1.7.4¶
Release date: May 14, 2018
- IMPROVED: updated
swagger-ui
to version 3.14.2 - IMPROVED: updated
ReDoc
to version 2.0.0-alpha.20 - FIXED: ignore
None
return fromget_operation
to avoid emptyPath
objects in output - FIXED: request body is now allowed on
DELETE
endpoints (#118)
1.7.3¶
Release date: May 12, 2018
- FIXED: views whose
__init__
methods throw exceptions will now be ignored during endpoint enumeration
1.7.2¶
Release date: May 12, 2018
- FIXED: fixed generation of default
SECURITY_REQUIREMENTS
to match documented behaviour - FIXED: ordering of
SECURITY_REQUIREMENTS
andSECURITY_DEFINITIONS
is now stable
1.7.1¶
Release date: May 05, 2018
- IMPROVED: updated
swagger-ui
to version 3.14.1 - IMPROVED: set
swagger-ui
showCommonExtensions
toTrue
by default and addSHOW_COMMON_EXTENSIONS
setting key - IMPROVED: set
min_length=1
whenallow_blank=False
(#112, thanks to @elnappo) - FIXED: made documentation ordering of
SwaggerDict
extra attributes stable
1.7.0¶
Release date: Apr 27, 2018
ADDED: added integration with djangorestframework-recursive (#109, #110, thanks to @rsichny)
NOTE: in order for this to work, you will have to add the new
drf_yasg.inspectors.RecursiveFieldInspector
to yourDEFAULT_FIELD_INSPECTORS
array if you changed it from the default valueFIXED:
SchemaRef
now supports cyclical references via theignore_unresolved
argument
1.6.2¶
Release date: Apr 25, 2018
1.6.0¶
Release date: Mar 24, 2018
- IMPROVED:
OAUTH2_REDIRECT_URL
will now default to the built inoauth2-redirect.html
file
1.5.1¶
Release date: Mar 18, 2018
1.5.0¶
Release date: Mar 12, 2018
IMPROVED:
serializers.HiddenField
are now hidden (#78, #79, thanks to @therefromhere)NOTE: in order for this to work, you will have to add the new
drf_yasg.inspectors.HiddenFieldInspector
to yourDEFAULT_FIELD_INSPECTORS
array if you changed it from the default valueIMPROVED: type of model field is now detected for
serializers.SlugRelatedField
withread_only=True
(#82, #83, thanks to @therefromhere)
1.4.7¶
Release date: Mar 05, 2018
- FIXED: prevent crashes caused by attempting to delete object attributes which do not exist in the first place (#76)
1.4.6¶
Release date: Mar 05, 2018
- IMPROVED: updated
swagger-ui
to version 3.12.0 - IMPROVED: updated
ReDoc
to version 1.21.2
1.4.5¶
Release date: Mar 05, 2018
1.4.4¶
Release date: Feb 26, 2018
1.4.3¶
Release date: Feb 22, 2018
- FIXED: added a missing assignment that would cause the
default
argument toopenapi.Parameter.__init__
to be ignored
1.4.2¶
Release date: Feb 22, 2018
1.4.1¶
Release date: Feb 21, 2018
- FIXED: the
coerce_to_string
is now respected when setting the type, default value and min/max values ofDecimalField
in the OpenAPI schema (#62) - FIXED: error responses from web UI views are now rendered with
TemplateHTMLRenderer
instead of throwing confusing errors (#58) - IMPROVED: updated
swagger-ui
to version 3.10.0 - IMPROVED: updated
ReDoc
to version 1.21.0
1.4.0¶
Release date: Feb 04, 2018
- ADDED: added settings for OAuth2 client configuration in
swagger-ui
(#53) - IMPROVED: updated
swagger-ui
to version 3.9.3
1.3.1¶
Release date: Jan 24, 2018
1.3.0¶
Release date: Jan 23, 2018
- ADDED: security requirements are now correctly set and can be customized; this should fix problems related
to authentication in
swagger-ui
Try it out! (#50, #54) - IMPROVED: updated
swagger-ui
to version 3.9.2 - IMPROVED: updated
ReDoc
to version 1.20.0 - FIXED: fixed an exception caused by a warning in get_path_from_regex (#49, thanks to @blueyed)
1.2.2¶
Release date: Jan 12, 2018
- FIXED: djangorestframework>=3.7.7 is now required because of breaking changes (#44, #45, thanks to @h-hirokawa)
1.2.0¶
Release date: Jan 12, 2018 (missing from PyPI due to deployment issues)
- ADDED:
basePath
is now generated by taking into account theSCRIPT_NAME
variable and the longest common prefix of API urls (#37, #42) - IMPROVED: removed inline scripts and styles from bundled HTML templates to increase CSP compatibility
- IMPROVED: improved validation errors and added more assertion sanity checks (#37, #40)
- IMPROVED: improved handling of NamespaceVersioning by excluding endpoints of differing versions (i.e. when accesing the schema view for v1, v2 endpoints will not be included in swagger)
1.1.3¶
Release date: Jan 02, 2018
- FIXED: schema view cache will now always
Vary
on theCookie
andAuthentication
(theVary
header was previously only added ifpublic
was set toTrue
) - this fixes issues related to Django authentication inswagger-ui
andCurrentUserDefault
values in the schema
1.1.2¶
Release date: Jan 01, 2018
- IMPROVED: updated
swagger-ui
to version 3.8.1 - IMPROVED: removed some unneeded static files
1.1.1¶
Release date: Dec 27, 2017
- ADDED: generate_swagger management command (#29, #31, thanks to @beaugunderson)
- FIXED: fixed improper generation of
\Z
regex tokens - will now be repalced by$
1.1.0¶
Release date: Dec 27, 2017
- ADDED: added support for APIs versioned with
URLPathVersioning
orNamespaceVersioning
- ADDED: added ability to recursively customize schema generation using pluggable inspector classes
- ADDED: added
operation_id
parameter to@swagger_auto_schema
- ADDED: integration with djangorestframework-camel-case (#28)
- IMPROVED: strings, arrays and integers will now have min/max validation attributes inferred from the field-level validators
- FIXED: fixed a bug that caused
title
to never be generated for Schemas;title
is now correctly populated from the field’slabel
property
1.0.6¶
Release date: Dec 23, 2017
- FIXED: Swagger UI “Try it out!” should now work with Django login
- FIXED: callable
default
values on serializer fields will now be properly called (#24, #25) - IMPROVED: updated
swagger-ui
to version 3.8.0 - IMPROVED:
PrimaryKeyRelatedField
andSlugRelatedField
will now have appropriate types based on the related model (#26) - IMPROVED: mock views will now have a bound request even with
public=False
(#23)
1.0.5¶
Release date: Dec 18, 2017
- FIXED: fixed a crash caused by having read-only Serializers nested by reference
- FIXED: removed erroneous backslashes in paths when routes are generated using Django 2 path()
- IMPROVED: updated
swagger-ui
to version 3.7.0 - IMPROVED:
FileField
is now generated as an URL or file name in response Schemas (#21, thanks to @h-hirokawa)
1.0.4¶
Release date: Dec 16, 2017
- FIXED: fixed improper generation of YAML references
- ADDED: added
query_serializer
parameter to@swagger_auto_schema
(#16, #17)