Skip to content

Commit

Permalink
Merge pull request #713 from ngnpope/patch-1
Browse files Browse the repository at this point in the history
Small documentation fixes.
  • Loading branch information
tfranzel authored Apr 21, 2022
2 parents 4b7eee7 + 0728fcb commit 2f52d00
Show file tree
Hide file tree
Showing 17 changed files with 162 additions and 158 deletions.
66 changes: 22 additions & 44 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Breaking changes / important additions:
- added callback functionality (EXPERIMENTAL and subject to change due to pending issue)
- Many thanks to all the contributors!


0.21.2 (2022-02-01)
-------------------

Expand All @@ -45,7 +44,6 @@ Breaking changes / important additions:

- Some minor bugfixes and feature additions. Schemas using AcceptHeaderVersioning contain a small change.


0.21.1 (2021-12-20)
-------------------

Expand All @@ -64,7 +62,6 @@ Breaking changes / important additions:

- Some minor bugfixes and small feature additions. No large schema changes are expected


0.21.0 (2021-11-10)
-------------------

Expand Down Expand Up @@ -95,7 +92,6 @@ Breaking changes / important additions:
- Several other small fixes and additional settings for corner cases. This is mainly a y-steam release due to the potential impact
on the Swagger UI and ``minLength`` changes.


0.20.2 (2021-10-15)
-------------------

Expand All @@ -118,7 +114,6 @@ Breaking changes / important additions:
annotation isolation. There should be no more side effects from arbitrarily mixing and matching the decorators.
- Improved handling of completely empty serializers with COMPONENT_SPLIT_REQUEST.


0.20.1 (2021-10-03)
-------------------

Expand All @@ -130,7 +125,6 @@ Breaking changes / important additions:

- Hotfix release due to regression in the Redoc template


0.20.0 (2021-10-01)
-------------------

Expand All @@ -140,8 +134,8 @@ Breaking changes / important additions:
- Add arbitrarily deep ListSerializer nesting `#539 <https://github.com/tfranzel/drf-spectacular/issues/539>`_
- tighten serializer assumptions `#539 <https://github.com/tfranzel/drf-spectacular/issues/539>`_
- fix whitespace stripping on methods
- Rename `AutoSchema._map_field_validators()` → `.insert_field_validators()`. [Nick Pope]
- Rename `AutoSchema._map_min_max()` → `.insert_min_max()`. [Nick Pope]
- Rename ``AutoSchema._map_field_validators()`` → ``.insert_field_validators()``. [Nick Pope]
- Rename ``AutoSchema._map_min_max()`` → ``.insert_min_max()``. [Nick Pope]
- Fix detection of int64 from min/max values. [Nick Pope]
- Fix zero handling in _map_min_max(). [Nick Pope]
- Add support for introspection of nested validators. [Nick Pope]
Expand All @@ -157,10 +151,9 @@ Breaking changes / important additions:

- Added vendor specification extensions
- Completetly overhauled validator logic and bugfixes
- Offline UI assets with optional ``drf-spectacular-sidecar`` package
- Offline UI assets with optional *drf-spectacular-sidecar* package
- several internal logic improvements and stricter assumptions


0.19.0 (2021-09-21)
-------------------

Expand Down Expand Up @@ -206,10 +199,9 @@ Breaking changes / important additions:
- Severely improved path parameter detection for Django-style parameters, RE parameters, and custom converters
- Significantly more defensive settings loading for safer project imports (less prone to import loops)
- Improved type hint support for ``Enum`` and other native types
- Explicit support for ``drf-nested-routers``
- Explicit support for *drf-nested-routers*
- A lot more small improvements


0.18.2 (2021-09-04)
-------------------

Expand All @@ -222,7 +214,6 @@ Breaking changes / important additions:

- Primarily ironing out another issue with the Django check and some minor improvements


0.18.1 (2021-08-31)
-------------------

Expand All @@ -239,7 +230,6 @@ Breaking changes / important additions:
- Check also moved into the ``--deploy`` section to prevent double execution. This can be disabled with ``ENABLE_DJANGO_DEPLOY_CHECK``
- Facitities added to utilize SwaggerUI Topbar for versioning.


0.18.0 (2021-08-25)
-------------------

Expand All @@ -260,10 +250,9 @@ Breaking changes / important additions:
Breaking changes / important additions:

- This is a y-stream release because we added `Django checks <https://docs.djangoproject.com/en/3.2/topics/checks/>`_
which might emit warnings and subsequently break CI. This can be easily suppressed with Django's `SILENCED_SYSTEM_CHECKS`.
which might emit warnings and subsequently break CI. This can be easily suppressed with Django's ``SILENCED_SYSTEM_CHECKS``.
- Several small fixes and features that should not have a big impact.


0.17.3 (2021-07-26)
-------------------

Expand All @@ -283,7 +272,6 @@ Breaking changes / important additions:

- Just a few bugfixes and some small features with minimal impact on existing schema


0.17.2 (2021-06-15)
-------------------

Expand All @@ -293,10 +281,9 @@ Breaking changes / important additions:

Breaking changes / important additions:

- Hotfix release that addresses a carelessly added import in `0.17.1`. In certain use-cases,
- Hotfix release that addresses a carelessly added import in 0.17.1. In certain use-cases,
this may have led to an import cycle inside DRF.


0.17.1 (2021-06-12)
-------------------

Expand All @@ -314,7 +301,6 @@ Breaking changes / important additions:
- This release is mainly for fixing incomplete type hints which mypy will potentially complain about.
- A few small fixes that should either have no or a very small impact in schemas.


0.17.0 (2021-06-01)
-------------------

Expand All @@ -337,7 +323,6 @@ Breaking changes / important additions:
This should have no negative impact, but to be on the safe side we'll opt for a y-stream release.
- The package is now marked as being typed, which should get picked up natively by mypy


0.16.0 (2021-05-10)
-------------------

Expand Down Expand Up @@ -369,7 +354,6 @@ Breaking changes / important additions:

- minor release to fix newly introduced default prefix estimation.


0.15.0 (2021-04-03)
-------------------

Expand All @@ -395,11 +379,10 @@ Breaking changes / important additions:
- 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 bug with ``cached_property`` non-Model objects not being traversed [Luke Plant]
- Fixed issue `#314 <https://github.com/tfranzel/drf-spectacular/issues/314>`_ - include information about view/serializer in warnings. [Luke Plant]
- bugfix forward/reverse model traversal `#323 <https://github.com/tfranzel/drf-spectacular/issues/323>`_
- fix nested serializer detection & smarter metadata extraction `#319 <https://github.com/tfranzel/drf-spectacular/issues/319>`_
Expand Down Expand Up @@ -432,14 +415,13 @@ Breaking changes / important additions:

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.
- *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``

- Added *drf-yasg*'s ``swagger_fake_view``

0.13.2 (2021-02-11)
-------------------
Expand All @@ -460,7 +442,6 @@ Breaking changes / important additions:
- fix readonly related fields generating incorrect schema `#274 <https://github.com/tfranzel/drf-spectacular/issues/274>`_ [diesieben07]
- bugfix save parameter removal `#212 <https://github.com/tfranzel/drf-spectacular/issues/212>`_


0.13.1 (2021-01-21)
-------------------

Expand All @@ -473,7 +454,6 @@ Breaking changes / important additions:
- Update README.rst [Chad Ramos]
- Create new mock request on each operation [Matthias Erll]


0.13.0 (2021-01-13)
-------------------

Expand All @@ -491,8 +471,7 @@ Breaking changes / important additions:

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``.

- 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)
-------------------
Expand All @@ -516,7 +495,7 @@ Breaking changes:

Breaking changes:

- reverted back to ``0.10.0`` Swagger UI behavior as default. Users relying on stricter CSP should use ``SpectacularSwaggerSplitView``
- 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

Expand Down Expand Up @@ -629,7 +608,7 @@ Breaking changes:
-------------------

- Temporarily pin the swagger-ui unpkg URL to 3.30.0 [Mohamed Abdulaziz]
- Add `deepLinking` parameter [p.alekseev]
- Add ``deepLinking`` parameter [p.alekseev]
- added preprocessing hooks for operation list modification/filtering `#93 <https://github.com/tfranzel/drf-spectacular/issues/93>`_
- Document effective DRF settings [John Vandenberg]
- add format query parameter `#110 <https://github.com/tfranzel/drf-spectacular/issues/110>`_
Expand Down Expand Up @@ -763,7 +742,7 @@ Breaking changes:
- explicit override for non-list serializers on ViewSet list `#49 <https://github.com/tfranzel/drf-spectacular/issues/49>`_
- improve model field mapping via DRF init logic
- bugfix enum substitution with additional field parameters.
- Fix getting default parameter for `MultipleChoiceField` [p.alekseev]
- 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 <https://github.com/tfranzel/drf-spectacular/issues/33>`_

Expand All @@ -788,13 +767,12 @@ Breaking changes:
- Parse path parameter type hints from url. closes `#34 <https://github.com/tfranzel/drf-spectacular/issues/34>`_
- Consolidate duplicate warnings/add error `#28 <https://github.com/tfranzel/drf-spectacular/issues/28>`_
- Prevent warning for DRF format suffix param
- Improve ACCEPT header handling `#42 <https://github.com/tfranzel/drf-spectacular/issues/42>`_
- Improve ACCEPT header handling `#42 <https://github.com/tfranzel/drf-spectacular/issues/42>`_

Breaking changes:

- all extension base classes moved to ``drf_spectacular.extensions``


0.9.2 (2020-04-27)
------------------

Expand Down Expand Up @@ -846,7 +824,7 @@ Breaking changes:

Breaking changes:

- removed `to_schema()` from `OpenApiParameter`. Handled in ``AutoSchema`` now.
- removed ``to_schema()`` from ``OpenApiParameter``. Handled in ``AutoSchema`` now.

0.8.8 (2020-03-21)
------------------
Expand All @@ -868,7 +846,7 @@ Breaking changes:
- 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 <https://github.com/tfranzel/drf-spectacular/issues/6>`_)
- Change operation sorting to alphanumeric with option (`#6 <https://github.com/tfranzel/drf-spectacular/issues/6>`_)
- Robustify serializer field support for ``@extend_schema_field``.
- Enable field serializers support. [p.g.alekseev]
- Adding custom tags support [p.g.alekseev]
Expand All @@ -885,14 +863,15 @@ Breaking changes:

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.
Expand All @@ -901,21 +880,20 @@ Breaking changes:
- 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.

- Initial published version.
26 changes: 13 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Features
- Callback operations (experimental)
- Included support for:
- `django-polymorphic <https://github.com/django-polymorphic/django-polymorphic>`_ / `django-rest-polymorphic <https://github.com/apirobot/django-rest-polymorphic>`_
- `SimpleJWT <https://github.com/SimpleJWT/django-rest-framework-simplejwt>`_
- `SimpleJWT <https://github.com/jazzband/djangorestframework-simplejwt>`_
- `DjangoOAuthToolkit <https://github.com/jazzband/django-oauth-toolkit>`_
- `djangorestframework-jwt <https://github.com/jpadilla/django-rest-framework-jwt>`_ (tested fork `drf-jwt <https://github.com/Styria-Digital/django-rest-framework-jwt>`_)
- `dj-rest-auth <https://github.com/iMerica/dj-rest-auth>`_ (maintained fork of `django-rest-auth <https://github.com/Tivix/django-rest-auth>`_)
Expand All @@ -48,7 +48,7 @@ Features
- `djangorestframework-dataclasses <https://github.com/oxan/djangorestframework-dataclasses>`_


For more information visit the `documentation <https://drf-spectacular.readthedocs.io>`_.
For more information visit the `documentation <https://drf-spectacular.readthedocs.io/>`_.

License
-------
Expand Down Expand Up @@ -135,16 +135,16 @@ these static files as a separate optional package. Usage is as follows:
Release management
^^^^^^^^^^^^^^^^^^

`drf-spectacular` deliberately stays below version ``1.x.x`` to signal that every
*drf-spectacular* deliberately stays below version *1.x.x* to signal that every
new version may potentially break you. For production we strongly recommend pinning the
version and inspecting a schema diff on update.

With that said, we aim to be extremely defensive w.r.t. breaking API changes. However,
we also acknowledge the fact that even slight schema changes may break your toolchain,
as any existing bug may somehow also be used as a feature.

We define version increments with the following semantics. `y-stream` increments may contain
potentially breaking changes to both API and schema. `z-stream` increments will never break the
We define version increments with the following semantics. *y-stream* increments may contain
potentially breaking changes to both API and schema. *z-stream* increments will never break the
API and may only contain schema changes that should have a low chance of breaking you.


Expand All @@ -158,8 +158,8 @@ Generate your schema with the CLI:
$ ./manage.py spectacular --file schema.yml
$ docker run -p 80:8080 -e SWAGGER_JSON=/schema.yml -v ${PWD}/schema.yml:/schema.yml swaggerapi/swagger-ui
If you also want to validate your schema add the `--validate` flag. Or serve your schema directly
from your API. We also provide convenience wrappers for `swagger-ui` or `redoc`.
If you also want to validate your schema add the ``--validate`` flag. Or serve your schema directly
from your API. We also provide convenience wrappers for ``swagger-ui`` or ``redoc``.

.. code:: python
Expand All @@ -175,7 +175,7 @@ from your API. We also provide convenience wrappers for `swagger-ui` or `redoc`.
Usage
-----

`drf-spectacular` works pretty well out of the box. You might also want to set some metadata for your API.
*drf-spectacular* works pretty well out of the box. You might also want to set some metadata for your API.
Just create a ``SPECTACULAR_SETTINGS`` dictionary in your ``settings.py`` and override the defaults.
Have a look at the `available settings <https://drf-spectacular.readthedocs.io/en/latest/settings.html>`_.

Expand Down Expand Up @@ -288,16 +288,16 @@ globally, and then simply run:
$ tox
.. _Django REST framework: https://www.django-rest-framework.org/
.. _OpenAPI 3.0: https://github.com/OAI/OpenAPI-Specification
.. _tox: http://tox.readthedocs.org/en/latest/
.. _OpenAPI 3.0: https://spec.openapis.org/oas/v3.0.3
.. _tox: https://tox.wiki/
.. _drf-spectacular-sidecar: https://github.com/tfranzel/drf-spectacular-sidecar

.. |build-status| image:: https://github.com/tfranzel/drf-spectacular/actions/workflows/ci.yml/badge.svg
:target: https://github.com/tfranzel/drf-spectacular/actions/workflows/ci.yml
.. |pypi-version| image:: https://img.shields.io/pypi/v/drf-spectacular.svg
:target: https://pypi.python.org/pypi/drf-spectacular
.. |codecov| image:: https://codecov.io/gh/tfranzel/drf-spectacular/branch/master/graph/badge.svg
:target: https://codecov.io/gh/tfranzel/drf-spectacular
:target: https://pypi.org/project/drf-spectacular/
.. |codecov| image:: https://app.codecov.io/gh/tfranzel/drf-spectacular/branch/master/graph/badge.svg
:target: https://app.codecov.io/gh/tfranzel/drf-spectacular
.. |docs| image:: https://readthedocs.org/projects/drf-spectacular/badge/
:target: https://drf-spectacular.readthedocs.io/
.. |pypi-dl| image:: https://img.shields.io/pypi/dm/drf-spectacular
Expand Down
Loading

0 comments on commit 2f52d00

Please sign in to comment.