Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.
DISPLAY_OPERATION_ID
swagger-ui
settingReDoc
to version 2.0.0-alpha.38pattern
will now work on any field with a RegexValidator
(would previously not appear on fields with special formats such as EmailField
)RelatedFieldInspector
handling of nested serializersreverse_lazy
in URL settings (#209)SPEC_URL
setting for controlling the download link in swagger-ui
and ReDoc
ReDoc
settings (added NATIVE_SCROLLBARS
and REQUIRED_PROPS_FIRST
)extra_styles
and extra_scripts
blocks to ui templates (#178)swagger-ui
to version 3.18.2ReDoc
to version 2.0.0-alpha.37readOnly
SchemasUSE_SESSION_AUTH=False
operation_summary
and deprecated
(#194, #198)typing
hints (#195)future
(#196)default=None
(#203)request_body=no_body
handling and related tests (#188, #199)EXCLUDED_MEDIA_TYPES
setting for controlling produces
MIME type filtering (#158)SerializerMethodField
, via the swagger_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 your DEFAULT_FIELD_INSPECTORS
array if you changed it from the default valueswagger-ui
to version 3.18.0swagger_schema_fields
will now also work on serializer Field
s (#167)ref_name
collisions will now log a warning message (#156)operation_summary
and deprecated
arguments to swagger_auto_schema
(#149, #173)swagger_auto_schema
work with DRF 3.9 @action
mappings (#177)swagger-ui
to version 3.17.6ReDoc
to version 2.0.0-alpha.32--api-version
argument to the generate_swagger
management command (#170)generate_swagger
work for projects without authentication (#161)SafeText
interaction with YAML codec (#159)swagger_fake_view
marker to more easily detect mock views in view methods; getattr(self, 'swagger_fake_view', False)
inside a view method like get_serializer_class
will tell you if the view instance is being used for swagger schema introspection (#154)swagger-ui
to version 3.17.1ReDoc
to version 2.0.0-alpha.25None
as a response override (#148)Release date: Jun 16, 2018
DEFAULT_GENERATOR_CLASS
setting and --generator-class
argument to the generate_swagger
management command (#140)'count'
response field on CursorPagination
(#141)swagger_extra_fields
would not be handlded (#142)coreapi.Fields
s without a schema
(#143)swagger_schema_fields <swagger_schema_fields>
field on serializer Meta
classes for
customizing schema generation (#132, #134)JSONRenderer
instead of throwing
confusing errors (#130, #58)readOnly
schema fields will now no longer be marked as required
(#133)Release date: May 14, 2018
swagger-ui
to version 3.14.2ReDoc
to version 2.0.0-alpha.20None
return from get_operation
to avoid empty Path
objects in outputDELETE
endpoints (#118)__init__
methods throw exceptions will now be ignored during endpoint enumerationSECURITY_REQUIREMENTS
to match documented behaviourSECURITY_REQUIREMENTS
and SECURITY_DEFINITIONS
is now stable