Changelog¶
1.21.7¶
Release date: Jul 20, 2023
ADDED: Added drf_yasg.inspectors.query.DrfAPICompatInspector (#857)
ADDED: Added DrfAPICompatInspector to serve as a replacement CoreAPICompatInspector (#857)
ADDED: Allow DEFAULT_SPEC_RENDERERS default renderers to be overriden in the settings (#857)
FIXED: Fixed redoc source mapping (#859)
1.21.6¶
Release date: Jun 15, 2023
IMPROVED: Remove required coreapi dependency (#854) IMPROVED: Feature: Migrate to PyYAML for yaml generator (#845) FIXED: Keep path parameters in their given order (#841) FIXED: Provide support for enums in codecs (#837)
1.21.5¶
Release date: Feb 09, 2023
ADDED: Python 3.10 support (#818) DEPRECATED: Python 3.6 support as it’s been deprecated by swagger-spec-validator FIXED: RecursiveField resolver (#822)
1.21.4¶
Release date: Sep 26, 2022
FIXED: Remove NullBooleanFields if the django-rest-framework version >= 3.14.0 (#814)
1.21.3¶
Release date: Jul 18, 2022
FIXED: Set generator url for swagger_settings.DEFAULT_API_URL (#682) FIXED: Check fields for allow_null attribute (#688) FIXED: Encode pytz object field as a string by default (#717) FIXED: Handle errors rendering with TemplateHTMLRenderer (#742)
1.21.1¶
Release date: Jul 17, 2022
FIXED: Refer to permission_classes as a tuple (#678) IMPROVED: Document drf-extra-fields base64 integration (#445) ADDED: Added many support to example code (#695) ADDED: Allow specifying response as a reference (#757) FIXED: Fix old spelling errors and add a cspell configuration (#796) FIXED: Remove universal wheel, python 2 is unsupported (#782) FIXED: Fix duration field inspector (#549)
1.20.3¶
Release date: Jul 14, 2022
1.20.0¶
Release date: Oct 25, 2020
- IMPROVED: updated
swagger-uito version 3.36.0 - IMPROVED: updated
ReDocto version 2.0.0-rc.40 - FIXED: fixed compatibility with Django Rest Framework 3.12
- FIXED: fixed compatibility with Python 3.9 typing generics
- FIXED: dropped support for obsolete
django.conf.settings.LOGOUT_URL(#646)
The 1.18 and 1.19 series was skipped to avoid confusion with the drf-yasg2 fork. I would also like to take this opportunity to extend my apologies to the community at large for the large gap in the maintenance of drf-yasg and the problems it has caused.
1.17.1¶
Release date: Feb 17, 2020
- FIXED: fixed compatibility issue with CurrentUserDefault in Django Rest Framework 3.11
- FIXED: respect USERNAME_FIELD in generate_swagger command (#486)
Support was dropped for Python 3.5, Django 2.0, Django 2.1, DRF 3.7
1.17.0¶
Release date: Oct 03, 2019
1.16.1¶
Release date: Jul 16, 2019
1.16.0¶
Release date: Jun 13, 2019
1.15.1¶
Release date: Jun 13, 2019
- IMPROVED: updated
swagger-uito version 3.22.3 - IMPROVED: updated
ReDocto version 2.0.0-rc.8-1 - FIXED: fixed an issue with inspection of typing hints on Python 2.7 (#363)
- FIXED: fixed an issue with inspection of typing hints on Python 3.7 (#371)
Python 3.4 support has been dropped!
1.15.0¶
Release date: Apr 01, 2019
- ADDED: added
is_list_viewandhas_list_responseextension points toSwaggerAutoSchema(#331) - IMPROVED: updated
swagger-uito version 3.22.0 - IMPROVED: updated
ReDocto version 2.0.0-rc.4 - FIXED:
ListModelMixinwill now always be treated as a list view (#306) - FIXED: non-primitive values in field
choiceswill now be handled properly (#340)
1.14.0¶
Release date: Mar 04, 2019
- IMPROVED: updated
swagger-uito version 3.21.0 - FIXED: implicit
ref_namecollisions will now throw an exception - FIXED:
RecursiveFieldwill now also work as a child ofListSerializer(#321) - FIXED: fixed
minLengthandmaxLengthforListSerializerandListField - FIXED: the
itemsproperty ofSchema,ParameterandItemsobjects was renamed toitems_; this is a mildly breaking change and was needed to fix the collision with theitemsmethod ofdict(#308) - REMOVED: the
get_summaryandget_descriptionmethods have been removed (previously deprecated in 1.12.0)
1.13.0¶
Release date: Jan 29, 2019
- IMPROVED: type hint inspection is now supported for collections and
Optional(#272) - IMPROVED: updated
swagger-uito version 3.20.5 - IMPROVED: updated
ReDocto version 2.0.0-rc.2 - DEPRECATED: quietly dropped support for the
flexvalidator; 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)
1.12.1¶
Release date: Dec 28, 2018
- IMPROVED: updated
ReDocto version 2.0.0-rc.0 - FIXED: management command will now correctly fall back to
DEFAULT_VERSIONfor mock request - FIXED: fixed bad “raised exception during schema generation” warnings caused by missing
selfparameter
1.12.0¶
Release date: Dec 23, 2018
- ADDED:
get_security_definitionsandget_security_requirementshooks toOpenAPISchemaGenerator - ADDED: added
get_summary_and_descriptionandsplit_summary_from_descriptionextension points toSwaggerAutoSchemato allow for better customization - IMPROVED: updated
swagger-uito version 3.20.4 - IMPROVED: paginator
nextandpreviousfields are now marked asx-nullable(#263) - IMPROVED: added the
tagsargument toswagger_auto_schema(#259) - IMPROVED: type of
enumwill now be automatically detected fromChoiceFieldif allchoicesvalues are objects of the same Python class (#264) - IMPROVED:
SwaggerValidationErrordetails will now be logged and shown in the exception message - FIXED: user implementations of
get_queryset,get_parsersandget_rendererswill no longer be bypassed - FIXED: fixed handling of lazy objects in user-supplied values
- FIXED:
read_onlyserializer fields will be correctly ignored when generating form parameters (#261) - FIXED: fixed incorrect return type from
UIRenderer(#268) - FIXED: fixed inconsistent ordering of global
securityDefinitionsandsecurityobjects - DEPRECATED: the
get_summaryandget_descriptionextension points have been deprecated in favor of the newget_summary_and_description, and will be removed in a future release
IMPORTANT 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.
1.11.1¶
Release date: Nov 29, 2018
- IMPROVED: updated
swagger-uito version 3.20.1 - IMPROVED: updated
ReDocto version 2.0.0-alpha.41 - FIXED:
minLengthandmaxLengthwill now also work forListSerializerin addition toListField - FIXED:
MultipleChoiceFieldwill now use themulticollectionFormatwhere appropriate (#257) - FIXED: the
format,pattern,enum,min_lengthandmax_lengthattributes ofcoreschema.Schemawill now be persisted into the convertedopenapi.Parameter(#212, #233)
1.11.0¶
Release date: Oct 14, 2018
- ADDED:
PERSIST_AUTH,REFETCH_SCHEMA_WITH_AUTH,REFETCH_SCHEMA_ON_LOGOUTsettings and related javascript implementation for persisting authentication data to swagger-ui localStorage - IMPROVED: UI-enabled views will now no longer generate the full specification document twice; the HTML part
of the view will only generate a barebones
Swaggerobject with nopathsanddefinitions - IMPROVED: added the
FETCH_SCHEMA_WITH_QUERYsetting to enable fetching of the schema document using query parameters passed to the UI view (#208) - IMPROVED: added support for the very common
x-nullableextension (#217) - IMPROVED: extensibility of some classes was improved by adding more extension points, together with more blocks
for
swagger-ui.html/redoc.htmland some JavaScript hooks inswagger-ui-init.js - FIXED: removed usage of
inspect.signatureon python 2.7 (#222)
1.10.2¶
Release date: Sep 13, 2018
- ADDED: added the
DISPLAY_OPERATION_IDswagger-uisetting - IMPROVED: updated
ReDocto version 2.0.0-alpha.38 - IMPROVED: Operation summary will now be parsed from multi-line view method docstrings (#205)
- IMPROVED:
patternwill now work on any field with aRegexValidator(would previously not appear on fields with special formats such asEmailField) - FIXED: fixed an issue with
RelatedFieldInspectorhandling of nested serializers - FIXED: fixed handling of
reverse_lazyin URL settings (#209)
1.10.1¶
Release date: Sep 10, 2018
- ADDED: added the
SPEC_URLsetting for controlling the download link inswagger-uiandReDoc - ADDED: updated
ReDocsettings (addedNATIVE_SCROLLBARSandREQUIRED_PROPS_FIRST) - ADDED: added
extra_stylesandextra_scriptsblocks to ui templates (#178) - IMPROVED: updated
swagger-uito version 3.18.2 - IMPROVED: updated
ReDocto version 2.0.0-alpha.37 - FIXED: stopped generating invalid OpenAPI by improper placement of
readOnlySchemas - FIXED: fixed broken CSS when
USE_SESSION_AUTH=False - FIXED: fixed implementation of
operation_summaryanddeprecated(#194, #198) - FIXED: fixed a bug related to nested
typinghints (#195) - FIXED: removed dependency on
future(#196) - FIXED: fixed exceptions logged for fields with
default=None(#203) - FIXED: fixed
request_body=no_bodyhandling and related tests (#188, #199)
1.10.0¶
Release date: Aug 08, 2018
ADDED: added
EXCLUDED_MEDIA_TYPESsetting for controllingproducesMIME type filtering (#158)ADDED: added support for
SerializerMethodField, via theswagger_serializer_methoddecorator 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.SerializerMethodFieldInspectorto yourDEFAULT_FIELD_INSPECTORSarray if you changed it from the default valueIMPROVED: updated
swagger-uito version 3.18.0IMPROVED: added support for Python 3.7 and Django 2.1 (#176)
IMPROVED:
swagger_schema_fieldswill now also work on serializerFields (#167)IMPROVED:
ref_namecollisions will now log a warning message (#156)IMPROVED: added
operation_summaryanddeprecatedarguments toswagger_auto_schema(#149, #173)FIXED: made
swagger_auto_schemawork with DRF 3.9@actionmappings (#177)
1.9.2¶
Release date: Aug 03, 2018
- IMPROVED: updated
swagger-uito version 3.17.6 - IMPROVED: updated
ReDocto version 2.0.0-alpha.32 - IMPROVED: added
--api-versionargument to thegenerate_swaggermanagement command (#170) - FIXED: corrected various documentation typos (#160, #162, #171, #172)
- FIXED: made
generate_swaggerwork for projects without authentication (#161) - FIXED: fixed
SafeTextinteraction with YAML codec (#159)
1.9.1¶
Release date: Jun 30, 2018
- IMPROVED: added a
swagger_fake_viewmarker to more easily detect mock views in view methods;getattr(self, 'swagger_fake_view', False)inside a view method likeget_serializer_classwill tell you if the view instance is being used for swagger schema introspection (#154) - IMPROVED: updated
swagger-uito version 3.17.1 - IMPROVED: updated
ReDocto version 2.0.0-alpha.25 - FIXED: fixed wrong handling of duplicate urls in urlconf (#155)
- FIXED: fixed crash when passing
Noneas a response override (#148)
1.9.0¶
Release date: Jun 16, 2018
- ADDED: added
DEFAULT_GENERATOR_CLASSsetting and--generator-classargument to thegenerate_swaggermanagement command (#140) - FIXED: fixed wrongly required
'count'response field onCursorPagination(#141) - FIXED: fixed some cases where
swagger_schema_fieldswould not be handled (#142) - FIXED: fixed crash when encountering
coreapi.Fieldss without aschema(#143)
1.8.0¶
Release date: Jun 01, 2018
- ADDED: added a swagger_schema_fields field on serializer
Metaclasses for customizing schema generation (#132, #134) - FIXED: error responses from schema views are now rendered with
JSONRendererinstead of throwing confusing errors (#130, #58) - FIXED:
readOnlyschema fields will now no longer be marked asrequired(#133)
1.7.4¶
Release date: May 14, 2018
- IMPROVED: updated
swagger-uito version 3.14.2 - IMPROVED: updated
ReDocto version 2.0.0-alpha.20 - FIXED: ignore
Nonereturn fromget_operationto avoid emptyPathobjects in output - FIXED: request body is now allowed on
DELETEendpoints (#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_REQUIREMENTSto match documented behavior - FIXED: ordering of
SECURITY_REQUIREMENTSandSECURITY_DEFINITIONSis now stable
1.7.1¶
Release date: May 05, 2018
- IMPROVED: updated
swagger-uito version 3.14.1 - IMPROVED: set
swagger-uishowCommonExtensionstoTrueby default and addSHOW_COMMON_EXTENSIONSsetting key - IMPROVED: set
min_length=1whenallow_blank=False(#112, thanks to @elnappo) - FIXED: made documentation ordering of
SwaggerDictextra 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.RecursiveFieldInspectorto yourDEFAULT_FIELD_INSPECTORSarray if you changed it from the default valueFIXED:
SchemaRefnow supports cyclical references via theignore_unresolvedargument
1.6.2¶
Release date: Apr 25, 2018
1.6.0¶
Release date: Mar 24, 2018
- IMPROVED:
OAUTH2_REDIRECT_URLwill now default to the built inoauth2-redirect.htmlfile
1.5.1¶
Release date: Mar 18, 2018
1.5.0¶
Release date: Mar 12, 2018
IMPROVED:
serializers.HiddenFieldare now hidden (#78, #79, thanks to @therefromhere)NOTE: in order for this to work, you will have to add the new
drf_yasg.inspectors.HiddenFieldInspectorto yourDEFAULT_FIELD_INSPECTORSarray if you changed it from the default valueIMPROVED: type of model field is now detected for
serializers.SlugRelatedFieldwithread_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-uito version 3.12.0 - IMPROVED: updated
ReDocto 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
defaultargument 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_stringis now respected when setting the type, default value and min/max values ofDecimalFieldin the OpenAPI schema (#62) - FIXED: error responses from web UI views are now rendered with
TemplateHTMLRendererinstead of throwing confusing errors (#58) - IMPROVED: updated
swagger-uito version 3.10.0 - IMPROVED: updated
ReDocto 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-uito 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-uiTry it out! (#50, #54) - IMPROVED: updated
swagger-uito version 3.9.2 - IMPROVED: updated
ReDocto 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:
basePathis now generated by taking into account theSCRIPT_NAMEvariable 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 accessing 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
Varyon theCookieandAuthentication(theVaryheader was previously only added ifpublicwas set toTrue) - this fixes issues related to Django authentication inswagger-uiandCurrentUserDefaultvalues in the schema
1.1.2¶
Release date: Jan 01, 2018
- IMPROVED: updated
swagger-uito 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
\Zregex tokens - will now be replaced by$
1.1.0¶
Release date: Dec 27, 2017
- ADDED: added support for APIs versioned with
URLPathVersioningorNamespaceVersioning - ADDED: added ability to recursively customize schema generation using plugable inspector classes
- ADDED: added
operation_idparameter 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
titleto never be generated for Schemas;titleis now correctly populated from the field’slabelproperty
1.0.6¶
Release date: Dec 23, 2017
- FIXED: Swagger UI “Try it out!” should now work with Django login
- FIXED: callable
defaultvalues on serializer fields will now be properly called (#24, #25) - IMPROVED: updated
swagger-uito version 3.8.0 - IMPROVED:
PrimaryKeyRelatedFieldandSlugRelatedFieldwill 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-uito version 3.7.0 - IMPROVED:
FileFieldis 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_serializerparameter to@swagger_auto_schema(#16, #17)