Apispec

Latest version: v6.7.1

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 20

1.2.0

++++++++++++++++++

Features:

- Strip empty sections (components, tags) from generated documentation
(:pr:`421` and :pr:`425`).

1.1.2

++++++++++++++++++

Bug fixes:

- Fix behavior when using "2xx", 3xx", etc. for response keys (:issue:`422`).
Thanks :user:`zachmullen` for reporting.

1.1.1

++++++++++++++++++

Bug fixes:

- Fix passing references for parameters/responses when using
``MarshmallowPlugin`` (:pr:`414`).

1.1.0

++++++++++++++++++

Features:

- Resolve ``Schema`` classes in response headers (:pr:`409`).

1.0.0

++++++++++++++++++

Features:

- Expanded support for OpenAPI Specification version 3 (:issue:`165`).
- Add ``summary`` and ``description`` parameters to ``APISpec.path``
(:issue:`227`). Thanks :user:`timakro` for the suggestion.
- Add `apispec.core.Components.security_scheme` for adding Security
Scheme Objects (:issue:`245`).
- [apispec.ext.marshmallow]: Add support for outputting field patterns
from ``Regexp`` validators (:pr:`364`).
Thanks :user:`DStape` for the PR.

Bug fixes:

- [apispec.ext.marshmallow]: Fix automatic documentation of schemas when
using ``Nested(MySchema, many==True)`` (:issue:`383`). Thanks
:user:`whoiswes` for reporting.

Other changes:

- *Backwards-incompatible*: Components properties are now passed as
dictionaries rather than keyword arguments (:pr:`381`).

.. code-block:: python

<1.0.0
spec.components.schema("Pet", properties={"name": {"type": "string"}})
spec.components.parameter("PetId", "path", format="int64", type="integer")
spec.components.response("NotFound", description="Pet not found")

>=1.0.0
spec.components.schema("Pet", {"properties": {"name": {"type": "string"}}})
spec.components.parameter("PetId", "path", {"format": "int64", "type": "integer"})
spec.components.response("NotFound", {"description": "Pet not found"})

Deprecations/Removals:

- *Backwards-incompatible*: The ``ref`` argument passed to fields is no
longer used (:issue:`354`). References for nested ``Schema`` are
stored automatically.
- *Backwards-incompatible*: The ``extra_fields`` argument of
`apispec.core.Components.schema` is removed. All properties may be
passed in the ``component`` argument.

.. code-block:: python

<1.0.0
spec.definition("Pet", schema=PetSchema, extra_fields={"discriminator": "name"})

>=1.0.0
spec.components.schema("Pet", schema=PetSchema, component={"discriminator": "name"})

1.0.0rc1

+++++++++++++++++++++

Features:

- Automatically generate references to nested schemas with a computed name, e.g.
``fields.Nested(PetSchema())`` -> ``components/schemas/Pet``.
- Automatically generate references for ``requestBody`` using the above mechanism.
- Ability to opt out of the above behavior by passing a ``schema_name_resolver``
function that returns ``None`` to ``api.ext.MarshmallowPlugin``.
- References now respect Schema modifiers, including ``exclude`` and ``partial``.
- *Backwards-incompatible*: A `apispec.exceptions.DuplicateComponentNameError` is raised
when registering two components with the same name (:issue:`340`).

Page 9 of 20

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.