Changelog

0.15.1 (2021-04-08)

  • bugfix prefix estimation with RE special char literals in path #358

Breaking changes / important additions:

  • minor release to fix newly introduced default prefix estimation.

0.15.0 (2021-04-03)

  • fix boundaries for decimals coerced to strings #335

  • improve util type hints

  • add convenience response wrapper OpenApiResponse #345 #272 #116

  • adapt for dj-rest-auth upstream changes in iMerica/dj-rest-auth#227

  • Fixed traversing of ‘Optional’ type annotations [Luke Plant]

  • prevent pagination on error responses. #277

  • fix SCHEMA_PATH_PREFIX_TRIM ^/ pitfall & remove unused old URL mounting

  • slighly improve #332 for django-filter range filters

  • introduce non-redundant title field. #191 #286

  • improve schema version string handling including variations #303

  • bugfix ENUM_NAME_OVERRIDES for categorized choices #339

  • improve SCHEMA_PATH_PREFIX handling, add auto-detect default, introduce prefix trimming #336

  • add support for all django-filters RangeFilter [Jules Waldhart]

  • Added default value for missing attribute [Matthias Erll]

  • Fix map_renderers where format is None [Matthias Erll]

Breaking changes / important additions:

  • explicitly set responses via @extend_schema will not get paginated/listed anymore for non 2XX status codes.

  • New default None for SCHEMA_PATH_PREFIX will attempt to determine a reasonable prefix. Previous behavior is restored with ''

  • Added OpenApiResponses to gain access to response object descriptions.

0.14.0 (2021-03-09)

  • Fixed bug with cached_property non-Model objects not being traversed [Luke Plant]

  • Fixed issue #314 - include information about view/serializer in warnings. [Luke Plant]

  • bugfix forward/reverse model traversal #323

  • fix nested serializer detection & smarter metadata extraction #319

  • add drf-yasg compatibility feature ‘swagger_fake_view’ #321

  • fix django-filter through model edge case & catch exceptions #320

  • refactor/bugfix PATCH & Serializer(partial=True) behaviour.

  • bugfix django-filter custom filter class resolution #317

  • bugfix django-filter for Django 2.2 AutoField

  • improved/restructured resolution priority in django-filter extension #317 #234

  • handle Decimals for YAML #316

  • remove deprecated django-filter backend solution

  • update swagger-ui version

  • bugfix [] case and lint #312

  • discriminate None and typing.Any usage #315

  • fix multi-step source relation field resolution, again. #274 #296

  • Add any type for OpenApiTypes [André da Silva]

  • improve Extension usage documentation #307

  • restructure request body for extend_schema #266 #279

  • bugfix multipart boundary showing up in Accept header

  • bugfix: use get_parsers() and get_renderers() #266

  • Fix for better support of PEP 563 compatible annotations. [Luke Plant]

  • Add document authentication [gongul]

  • Do not override query params [Fabricio Aguiar]

  • New setting for enabling/disabling error/warn messages [Fabricio Aguiar]

  • bugfix response headers without body #297

  • issue #296 [Luis Saavedra]

  • Fixes #283 – implement response header parameters [Sergei Maertens]

  • Added feature test for response headers [Sergei Maertens]

  • robustify django-filter enum sorting #295

Breaking changes / important additions:

  • drf-spectacular’s custom DjangoFilterBackend removed after previous deprecation. Just use the original class again.

  • django-filter extension received a significant refactoring so your schema may have several changes, hopefully positive ones.

  • Added response headers feature

  • Extended @extend_schema(request=X), where X may now also be a Dict[content_type, serializer_etc]

  • Updated Swagger UI version

  • Fixed several model traveral issues that may lead to PK changes in the schema

  • Added drf-yasg’s swagger_fake_view

0.13.2 (2021-02-11)

  • add setting for operation parameter sorting #281

  • bugfix/generalize Union hint extraction #284

  • bugfix functools.partial methods in django-filters #290

  • bugfix django-filter method filter #290

  • Check serialzer help_text field is passed to the query description [Jorge Rodríguez-Flores Esparza]

  • QUERY Parameters from serializer ignore description in SwaggerUI [Jorge Rodríguez-Flores Esparza]

  • README.rst encoding change [gongul]

  • Add support for SCOPES_BACKEND_CLASS setting from django-oauth-toolkit [diesieben07]

  • use source instead of field_name for model field detection #274 [diesieben07]

  • bugfix parameter removal from custom AutoSchema #212

  • add specification extension option to info section #165

  • add default to OpenApiParameter #271

  • show violating view for easier fixing #278

  • fix readonly related fields generating incorrect schema #274 [diesieben07]

  • bugfix save parameter removal #212

0.13.1 (2021-01-21)

  • bugfix/handle more django-filter cases #263

  • bugfix missing meta on extend_serializer_field, raw schema, and breakout

  • expose explode and style for OpenApiParameter #267

  • Only generate mock request if there is no actual request [Matthias Erll]

  • Update blueprints.rst [takizuka]

  • bugfix enum substitution for enumed arrays (multiple choice)

  • Update README.rst [Chad Ramos]

  • Create new mock request on each operation [Matthias Erll]

0.13.0 (2021-01-13)

  • add setting for additionalProperties handling #238

  • bugfix path param extraction for PrimaryKeyRelatedField #258

  • use injected django-filter help_text #234

  • robustify normalization of tyes #257

  • bugfix PATCH split serializer disparity #249

  • django-filter description bugfix #234

  • bugfix unsupported http verbs #244

  • bugfix assert on methods in django-filter #252 #234 #241

  • Regression: Filterset defined as method (and from a @property) are not supported [Nicolas Delaby]

  • bugfix view-level AutoSchema noneffective with extend_schema #241

  • bugfix incorrect warning on paginated actions #233

Breaking changes:

  • several small improvements that should not have a big impact. this is a y-stream release mainly due to schema changes that may occur with django-filter.

0.12.0 (2020-12-19)

  • add exclusion for discovered parameters #212

  • bugfix incorrect collision warning #233

  • introduce filter extensions #234

  • revert Swagger UI view to single request and alternative #211 #173

  • bugfix Simple JWT token refresh #232

  • bugfix simple JWT serializer schema #232

  • Fix enum postprocessor to allow 0 as possible value [Vikas]

  • bugfix/restore optional default parameter value #226

  • Include QuerySerializer in documentation [KimSoungRyoul]

  • support OAS3.0 ExampleObject to @extend_schema & @extend_schema_serializer #115 [KimSoungRyoul]

  • add explicit double and int32 types. #214

  • added type extension for int64 format support [Peter Dreuw]

  • fix TokenAuthentication handling of keyword #205

  • Allow callable limit_value in schema [Serkan Hosca]

  • @extend_schema responses param now accepts tuples with media type #201

  • bugfix List hint extraction with non-basic sub types #207

Breaking changes:

  • reverted back to 0.10.0 Swagger UI behavior as default. Users relying on stricter CSP should use SpectacularSwaggerSplitView

  • tokenAuth slightly changed to properly model correct Authorization header

  • a lot of minor improvements that may slightly alter the schema

0.11.1 (2020-11-15)

  • bugfix hint extraction on @cached_property #198

  • add support for basic TypedDict hints #184

  • improve type hint resolution #199

  • add option to disable Null/Blank enum choice feature #185

  • bugfix return code for Viewset create methods #196

  • honor SCHEMA_COERCE_PATH_PK on path param type resolution #194

  • bugfix absolute schema URL to relative in UI #193

Breaking changes:

  • return code for create on ViewSet changed from 200 to 201. Some generator targets are picky, others don’t care.

0.11.0 (2020-11-06)

  • Remove unnecessary view permission from action [Vikas]

  • Fix security definition for IsAuthenticatedOrReadOnly permission [Vikas]

  • introduce convenience decorator @schema_extend_view #182

  • bugfix override behaviour of extend_schema with methods and views

  • move some plumbing to drainage to make importable without cirular import issues

  • bugfix naming for ListSerializer with pagination #183

  • cleanup trailing whitespace in docstrings

  • normalize regex in pattern, remove ECMA-incompatible URL pattern #175

  • remove Swagger UI inline script for stricter CSP #173

  • fixed typo [Sebastian Pabst]

  • add the PASSWORD format to types.py [Sebastian Pabst]

  • docs(settings): fix favicon example [Max Wittig]

Breaking changes:

  • @extend_schema override mechanics are now consistent. may affect schema only if used on both view and view method

  • otherwise mainly small improvement/fixes that should have minimal impact on the schema.

0.10.0 (2020-10-20)

  • bugfix non-effective multi-usage of view extension.

  • improve resolvable enum collisions with split components

  • Update README.rst [Jose Luis da Cruz Junior]

  • fix regular expression in detype_pattern [Ruslan Ibragimov]

  • improve enum naming with resolvable collisions

  • improve handling of discouraged SECURITY setting (fixes #48 fixes #136)

  • instance check with ViewSetMixin instead of GenericViewSet [SoungRyoul Kim]

  • support swagger-ui-settings [SoungRyoul Kim]

  • Change Settings variable, allow override of default swagger settings and remove unnecessary line [Nix]

  • Fix whitspace issues in code [Nix]

  • Allow Swagger-UI configuration through settings Closes #162 [Nix]

  • extend django_filters test case #155

  • add enum postprocessing handling of blank and null #135

  • rest-auth improvements

  • test_rest_auth: Add test schema transforms [John Vandenberg]

  • tests: Allow transformers on expected schemas [John Vandenberg]

  • Improve schema difference test harness [John Vandenberg]

  • Add rest-auth tests [John Vandenberg]

  • contrib: Add rest-auth support [John Vandenberg]

Breaking changes:

  • enum naming collision resolution changed in cleanly resolvable situations.

  • enums gained null and blank cases, which are modeled through oneOf for deduplication

  • SECURITY setting is now additive instead of being the mostly overridden default

0.9.14 (2020-10-04)

  • improve client generation for paginated listings

  • update pinned swagger-ui version #160

  • Hot fix for AcceptVersioningHeader support [Nicolas Delaby]

  • bugfix module string includes with urlpatterns #157

  • add expressive error in case of misconfiguration #156

  • fix django-filter related resolution. improve test #150 #151

  • improve follow_field_source for reverse resolution and model leafs #150

  • add ref if list field child is serializer [Matt Shirley]

  • add customization option for mock request generation #135

Breaking changes:

  • paginated list response is now wrapped in its own component

0.9.13 (2020-09-13)

  • bugfix filter parameter application on non-list views #147

  • improved support for django-filter

  • add mocked request for view processing. #81 #141

  • Use sha256 to hash lists [David Davis]

  • change empty operation name on API prefix-cut to “root”

  • bugfix lost “missing hint” warning and incorrect empty fallback

  • add operationId collision resolution #137

  • bugfix leaking path var names in operationId #137

  • add config for camelizing names #138

  • bugfix parameterized patterns for namespace versioning #145

  • Add support for Accept header versioning [Krzysztof Socha]

  • support for DictField child type (#142) and models.JSONField (Django>=3.1)

  • add convenience inline_serializer for extend_schema #139

  • remove multipleOf due to schema violation #131

Breaking changes:

  • operationId changed for endpoints using the DRF’s FORMAT path feature.

  • operationId changed where there were path variables leaking into the name.

0.9.12 (2020-07-22)

  • Temporarily pin the swagger-ui unpkg URL to 3.30.0 [Mohamed Abdulaziz]

  • Add deepLinking parameter [p.alekseev]

  • added preprocessing hooks for operation list modification/filtering #93

  • Document effective DRF settings [John Vandenberg]

  • add format query parameter #110

  • improve assert messages #126

  • more graceful handling of magic fields #126

  • allow for field child on ListSerializer. #120

  • Fix sorting of endpoints with params [John Vandenberg]

  • Emit enum of possible format suffixes [John Vandenberg]

  • i18n #109

  • bugfix INSTALLED_APP retrieval #114

  • emit import warning for extensions with installed apps #114

Breaking changes:

  • drf_spectacular.hooks.postprocess_schema_enums moved from blumbing to hooks for consistency. Only relevant if POSTPROCESSING_HOOKS is explicitly set by user.

  • preprocessing hooks are currently experimental and may change on the next release.

0.9.11 (2020-07-08)

  • extend instead of replace extra parameters #111

  • add client generator helper settings for readOnly

  • bugfix format param: path params must be required=True

  • bugfix DRF docstring excludes and configuration #107

  • bugfix operations with urlpattern override #92

  • decrease built-in extension priority and improve doc #106

  • add option to hide serializer fields #100

  • allow None on @extend_schema request/response

  • bugfix json spec violation on “required :[]” for COMPONENT_SPLIT_REQUEST

Breaking changes:

  • @extend_schema(parameters=...) is extending instead of replacing for custom AutoSchema

  • path parameter are now always required=True as required by specification

0.9.10 (2020-06-23)

  • bugfix cyclic import in plumbing. #104

  • add upstream test target with contrib allowed to fail

  • preparations for django 3.1 and DRF 3.12

  • improve tox targets for unreleased upstream

0.9.9 (2020-06-20)

  • added explicit URL option to UI views. #103

  • improve auth extension doc #99

  • bugfix attr typo with Token auth extension #99

  • improve docstring extraction #96

  • Manual polymorphic [Jair Henrique]

  • Add summary field to extend_schema #97 [lilisha100]

  • reduce minimal package requirements

  • extend sdist with tests & doc

  • bugfix nested RO/WO serializer on COMPONENT_SPLIT_REQUEST

  • add pytest option –skip-missing-contrib #87

  • Save test files in temporary folder [Jair Henrique]

  • Setup isort library [Jair Henrique]

0.9.8 (2020-06-07)

  • bugfix read-only many2many relation processing #79

  • Implement OrderedDict representer for yaml dumper [Jair Henrique]

  • bugfix UI permissions #84

  • fix abc import #82

  • add duration field #78

0.9.7 (2020-06-05)

  • put contrib code in packages named files

  • improve djangorestframework-camel-case support #73

  • Add support to djangorestframework-camel-case [Jair Henrique]

  • ENUM_NAME_OVERRIDES accepts import string for easier handling #70

  • honor versioning on schema UIs #71

  • improve enum naming mechanism. #63 #70

  • provide global enum naming. #70

  • refactor choice field

  • remove unused sorter setting

  • improve FileField, add test and documentation. #69

  • Fix file fields [John Vandenberg]

  • allow for functions on models beside properties. #68

  • replace removed DRF compat function

Breaking changes:

  • Enum naming conflicts are now resolved explicitly. how to resolve conflicts

  • Choice fields may be rendered slightly different

  • Swagger UI and Redoc views now honor versioned requests

  • Contrib package code moved. each package has its own file now

0.9.6 (2020-05-23)

  • overhaul documentation #52

  • improve serializer field mapping (nullbool & time)

  • remove duplicate and misplaced description. #61

  • extract serializer docstring

  • Recognise ListModelMixin as a list [John Vandenberg]

  • bugfix component sorting to include enums. #60

  • bugfix fail on missing readOnly flag

  • Fix incorrect parameter cutting [p.alekseev]

0.9.5 (2020-05-20)

  • add optional serializer component split

  • improve SerializerField meta extraction

  • improve serializer directionality

  • add mypy static analysis

  • make all readonly fields required for output. #54

  • make yaml multi-line strings nicer

  • alphanumeric component sorting.

  • generalize postprocessing hooks

  • extension override through priority attr

Breaking changes:

  • Schemas are funtionally identical, but component sorting changed slightly.

  • All read_only fields are required by default

  • SerializerFieldExtension gained direction parameter

0.9.4 (2020-05-13)

  • robustify serializer resolution & enum postprocessing

  • expose api_version to command. robustify version matching. #22

  • add versioning support #22

  • robustify urlconf wrapping. resolver does not like lists

  • explicit override for non-list serializers on ViewSet list #49

  • improve model field mapping via DRF init logic

  • bugfix enum substitution with additional field parameters.

  • Fix getting default parameter for MultipleChoiceField [p.alekseev]

  • bugfix model path traversal via intermediate property

  • try to be more graceful with unknown custom model fields. #33

Breaking changes:

  • If URL or namespace versioning is set in views, it is automatically used for generation. Schemas might shrink because of that. Explicit usage of --api-version="XXX" should yield the old result.

  • Some warnings might change, as the field/view introspection tries to go deeper.

0.9.3 (2020-05-07)

  • Add (partial) support for drf-yasg’s serializer ref_name #27

  • Add thin wrappers for redoc and swagger-ui. #19

  • Simplify serializer naming override #27

  • Handle drf type error for yaml. #41

  • Tox.ini: Add {posargs} [John Vandenberg]

  • add djangorestframework-jwt auth handler [John Vandenberg]

  • Docs: example of a manual configuration to use a apiKey in securitySchemes [Jelmer Draaijer]

  • Introduce view override extension

  • Consolidate extensions

  • Parse path parameter type hints from url. closes #34

  • Consolidate duplicate warnings/add error #28

  • Prevent warning for DRF format suffix param

  • Improve ACCEPT header handling #42

Breaking changes:

  • all extension base classes moved to drf_spectacular.extensions

0.9.2 (2020-04-27)

  • Fix incorrect PK access through id. #25.

  • Enable attr settings on SpectacularAPIView #35.

  • Bugfix @api_view annotation and tests.

  • Fix exception/add support for explicit ListSerializer #29.

  • Introduce custom serializer field extension mechanic. enables tackling #31

  • Improve serializer estimation with educated guesses. #28.

  • Bugfix import error and incorrect warning #26.

  • Improve scope parsing for oauth2. #26.

  • Postprocessing enums to components

  • Handle decimal coersion. closes #24.

  • Improvement: patched serializer variation only on request.

  • Add serializer directionality.

  • End the bucket brigade / cleaner interface.

  • Add poly serializer warning.

  • Bugfix: add serialization for default values.

  • Bugfix reverse access collision from schema to view.

Breaking changes:

  • internal interface changed (method & path removed)

  • fewer PatchedSerializers emitted

  • Enums are no longer inlined

0.9.1 (2020-04-09)

  • Bugfix missing openapi schema spec json in package

  • Add multi-method action decoration support.

  • rest-polymorphic str loading prep.

  • Improve list view detection.

  • Bugfix: response codes must be string. closes #17.

0.9.0 (2020-03-29)

  • Add missing related serializer fields #15.

  • Bugfix properties with $ref component. closes #16.

  • Bugfix polymorphic resource_type lookup. closes #14.

  • Generalize plugin system.

  • Support required parameter for body. [p.alekseev]

  • Improve serializer retrieval.

  • Add query serializer support #10.

  • Custom serializer parsing with plugins.

  • Refactor auth plugin system. support for DjangoOAuthToolkit & SimpleJWT.

  • Bugfix extra components.

Breaking changes:

  • removed to_schema() from OpenApiParameter. Handled in AutoSchema now.

0.8.8 (2020-03-21)

  • Documentation.

  • Schema serving with SpectacularAPIView (configureable)

  • Add generator stats and --fail-on-warn command option.

  • Schema validation with --validation against OpenAPI JSON specification

  • Added various settings.

  • Bugfix/add support for basic type responses (parity with requests)

  • Bugfix required in parameters. failed schema validation.

  • Add validation against OpenAPI schema specification.

  • Improve parameter resolution, warnings and tests.

  • Allow default parameter override. (e.g. id)

  • Fix queryset function call. [p.g.alekseev]

  • Supporting enum values in params. [p.g.alekseev]

  • Allow @extend_schema request basic type annotation.

  • Add support for typing Optional[*]

  • Bugfix: handle proxy models where pk is a OnetoOne relation.

  • Warn on duplicate serializer names.

  • Added explicit exclude flag for operation.

  • Bugfix: PrimaryKeyRelatedField(read_only=True) failing to find type.

  • Change operation sorting to alphanumeric with option (#6)

  • Robustify serializer field support for @extend_schema_field.

  • Enable field serializers support. [p.g.alekseev]

  • Adding custom tags support [p.g.alekseev]

  • Document extend_schema.

  • Allow operation hiding.

  • Catch unknown model traversals. custom fields can be tricky.

  • Improve model field mapping. extend field tests.

  • Add deprecated method to extend_schema decorator. [p.g.alekseev]

Breaking changes:

  • @extend_schema renamed extra_parameters -> parameters

  • ExtraParameter renamed to OpenApiParameter

0.8.5 (2020-03-08)

  • Generalize PolymorphicResponse into PolymorphicProxySerializer.

  • Type dict is resolved as object.

  • Simplify hint resolution.

  • Allow @extend_schema_field for custom serializer fields.

0.8.4 (2020-03-06)

  • @extend_schema_field accepts Serializers and OpenApiTypes

  • Generalize query parameter.

  • Bugfix serializer init.

  • Fix unused get_request_serializer.

  • Refactor and robustify typing system.

  • Helper scripts for swagger and generator.

  • Fix license.

0.8.3 (2020-03-02)

  • Fix parameter type resolution.

  • Remove empty parameters.

  • Improved assert message.

0.8.2 (2020-03-02)

  • Working release.

  • Bugfix wrong call & remove yaml aliases.

0.8.1 (2020-03-01)

  • Initial published version.