Skip to content

Releases: axnsan12/drf-yasg

1.12.0

24 Dec 10:15
Compare
Choose a tag to compare
  • ADDED: get_security_definitions and get_security_requirements hooks to OpenAPISchemaGenerator
  • ADDED: added get_summary_and_description and split_summary_from_description extension points to SwaggerAutoSchema to allow for better customisation
  • IMPROVED: updated swagger-ui to version 3.20.4
  • IMPROVED: paginator next and previous fields are now marked as x-nullable (#263)
  • IMPROVED: added the tags argument to swagger_auto_schema (#259)
  • IMPROVED: type of enum will now be automatically detected from ChoiceField if all choices values are objects of the same Python class (#264)
  • IMPROVED: SwaggerValidationError details will now be logged and shown in the exception message
  • FIXED: user implementations of get_queryset, get_parsers and get_renderers will no longer be bypassed
  • FIXED: fixed handling of lazy objects in user-supplied values
  • FIXED: read_only serializer fields will be correctly ignored when generating form parameters (#261)
  • FIXED: fixed incorrect return type from UIRenderer (#268)
  • FIXED: fixed incosistent ordering of global securityDefinitions and security objects
  • DEPRECATED: the get_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 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

29 Nov 00:34
Compare
Choose a tag to compare
  • IMPROVED: updated swagger-ui to version 3.20.1
  • IMPROVED: updated ReDoc to version 2.0.0-alpha.41
  • FIXED: minLength and maxLength will now also work for ListSerializer in addition to ListField
  • FIXED: MultipleChoiceField will now use the multi collectionFormat where appropriate (#257)
  • FIXED: the format, pattern, enum, min_length and max_length attributes of coreschema.Schema will now be persited into the converted openapi.Parameter (#212, #233)

1.11.0

14 Oct 18:38
Compare
Choose a tag to compare
  • ADDED: PERSIST_AUTH, REFETCH_SCHEMA_WITH_AUTH, REFETCH_SCHEMA_ON_LOGOUT settings 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 Swagger object with no paths and definitions
  • IMPROVED: added the FETCH_SCHEMA_WITH_QUERY setting to enable fetching of the schema document using query parameters passed to the UI view (#208)
  • IMPROVED: added support for the very common x-nullable extension (#217)
  • IMPROVED: extensibility of some classes was improved by adding more extension points, together with more blocks for swagger-ui.html/redoc.html and some JavaScript hooks in swagger-ui-init.js
  • FIXED: removed usage of inspect.signature on python 2.7 (#222)

1.10.2

13 Sep 02:23
Compare
Choose a tag to compare
  • 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 a RegexValidator (would previously not appear on fields with special formats such as EmailField)
  • FIXED: fixed an issue with RelatedFieldInspector handling of nested serializers
  • FIXED: fixed handling of reverse_lazy in URL settings (#209)

1.10.1

09 Sep 23:55
Compare
Choose a tag to compare
  • ADDED: added the SPEC_URL setting for controlling the download link in swagger-ui and ReDoc
  • ADDED: updated ReDoc settings (added NATIVE_SCROLLBARS and REQUIRED_PROPS_FIRST)
  • ADDED: added extra_styles and extra_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 and deprecated (#194, #198)
  • FIXED: fixed a bug related to nested typing hints (#195)
  • FIXED: removed dependency on future (#196)
  • FIXED: removed exceptions loged for fields with default=None (#203)
  • FIXED: fixed request_body=no_body handling and related tests (#188, #199)

1.10.0

07 Aug 22:50
Compare
Choose a tag to compare
  • ADDED: added EXCLUDED_MEDIA_TYPES setting for controlling produces MIME type filtering (#158)
  • ADDED: added support for 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 value
  • IMPROVED: updated swagger-ui to version 3.18.0
  • IMPROVED: added support for Python 3.7 and Django 2.1 (#176)
  • IMPROVED: swagger_schema_fields will now also work on serializer Fields (#167)
  • IMPROVED: ref_name collisions will now log a warning message (#156)
  • IMPROVED: added operation_summary and deprecated arguments to swagger_auto_schema (#149, #173)
  • FIXED: made swagger_auto_schema work with DRF 3.9 @action mappings (#177)

1.9.2

03 Aug 21:10
Compare
Choose a tag to compare
  • 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 the generate_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

29 Jun 21:33
Compare
Choose a tag to compare
  • 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 like get_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

29 Jun 21:28
Compare
Choose a tag to compare

Release date: Jun 16, 2018

  • ADDED: added DEFAULT_GENERATOR_CLASS setting and --generator-class argument to the generate_swagger management command (#140)
  • FIXED: fixed wrongly required 'count' response field on CursorPagination (#141)
  • FIXED: fixed some cases where swagger_extra_fields would not be handlded (#142)
  • FIXED: fixed crash when encountering coreapi.Fieldss without a schema (#143)

1.8.0

30 May 21:33
Compare
Choose a tag to compare
  • ADDED: added a :ref:swagger_schema_fields <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 as required (#133)