Bug fixes:
- Don't set
additionalProperties
ifMeta.unknown
isEXCLUDE
(:issue:`659`). Thanks :user:`kupuguy` for the PR.
Features:
- Populate
additionalProperties
fromMeta.unknown
(:pr:`635`). Thanks :user:`timsilvers` for the PR. - Allow
to_yaml
to pass kwargs toyaml.dump
(:pr:`648`). - Resolve header references in responses (:pr:`650`).
- Resolve example references in parameters, request bodies and responses (:pr:`#651`).
Features:
- Add apispec.core.Components.header to register header components (:pr:`637`).
Features:
- Make components public attributes of
Components
class (:pr:`634`).
Features:
- Resolve schemas in callbacks (:pr:`544`). Thanks :user:`kortsi` for the PR.
Bug fixes:
- Fix docstrings documenting kwargs type as dict (:issue:`534`).
- Use
x-minimum
andx-maximum
extensions to document ranges that are not of number type (e.g. datetime) (:issue:`614`).
Other changes:
- Test against Python 3.9.
Features:
- Backwards-incompatible: Automatically generate references for schemas
passed as strings in responses and request bodies. When using
MarshmallowPlugin
, if a schema is passed as string, the marshmallow registry is looked up for this schema name and if none is found, the name is assumed to be a reference to a manually created schema and a reference is generated. No exception is raised anymore if the schema name can't be found in the registry. (:pr:`554`)
Features:
- Backwards-incompatible: Ignore
location
field metadata. This attribute was used in webargs but it has now been dropped. ASchema
can now only have a single location. This simplifies the logic inOpenAPIConverter
methods, wheredefault_in
argument now becomeslocation
. (:pr:`526`) - Backwards-incompatible: Don't document
int
format as"int32"
andfloat
format as"float"
, as those are platform-dependent (:pr:`595`).
Refactoring:
OpenAPIConverter.field2parameters
andOpenAPIConverter.property2parameter
are removed.OpenAPIConverter.field2parameter
becomes private. (:pr:`581`)
Other changes:
- Drop support for marshmallow 2. Marshmallow 3.x is required. (:pr:`583`)
- Drop support for Python 3.5. Python 3.6+ is required. (:pr:`582`)
Bug fixes:
- Fix crash when field metadata contains non-string keys (:pr:`596`). Thanks :user:`sanzoghenzo` for the fix.
Bug fixes:
- Fix
MarshmallowPlugin
crash whenresolve_schema_dict
is passed a schema as string andschema_name_resolver
returnsNone
(:issue:`566`). Thanks :user:`black3r` for reporting and thanks :user:`Bangertm` for the PR.
Features:
- Instantiate
Components
before calling plugins'init_spec
(:pr:`539`). Thanks :user:`Colin-b` for the PR.
Features:
- Add
match_info
to__location_map__
(:pr:`517`). Thanks :user:`fedorfo` for the PR.
Bug fixes:
- Don't emit a warning when passing "default" as response status code in OASv2 (:pr:`521`).
Features:
- Add apispec.core.Components.example for adding Example Objects (:pr:`515`). Thanks :user:`codeasashu` for the PR.
Support:
- Test against Python 3.8 (:pr:`510`).
Features:
- Add support for generating user-defined OpenAPI properties for custom field
classes via an
add_attribute_function
method (:pr:`478` and :pr:`498`). - [apispec.ext.marshmallow]: Backwards-incompatible
fields.Raw
andfields.Field
are now represented by OpenAPI Any Type (:pr:`495`). - [apispec.ext.marshmallow]: Backwards-incompatible: The
schema_name_resolver
function now receives aSchema
class, aSchema
instance or a string that resolves to aSchema
class. This allows a custom resolver to generate different names depending on schema modifiers used in aSchema
instance (:pr:`476`).
Bug fixes:
- [apispec.ext.marshmallow]: With marshmallow 3, the default value of a field
in the documentation is the serialized value of the
missing
attribute, notmissing
itself (:pr:`490`).
Refactoring:
clean_parameters
andclean_operations
are nowAPISpec
methods (:pr:`489`).- [apispec.ext.marshmallow]:
Schema
resolver methods are extracted fromMarshmallowPlugin
into aSchemaResolver
class member (:pr:`496`). - [apispec.ext.marshmallow]:
OpenAPIConverter
is now a class member ofMarshmallowPlugin
(:pr:`493`). - [apispec.ext.marshmallow]:
Field
to properties conversion logic is extracted fromOpenAPIConverter
intoFieldConverterMixin
(:pr:`478`).
Other changes:
- Drop support for Python 2 (:issue:`491`). Thanks :user:`hugovk` for the PR.
- Drop support for marshmallow pre-releases. Only stable 2.x and 3.x versions are supported (:issue:`485`).
Bug fixes:
- Fix compatibility with marshmallow 3.0.0rc8 (:pr:`469`).
Other changes:
- Switch to Azure Pipelines (:pr:`468`).
Bug fixes:
- Don't mutate
operations
andparameters
inAPISpec.path
to avoid issues when calling it twice with the sameoperations
orparameters
(:pr:`464`).
Features:
- Add support for path level parameters (:issue:`453`). Thanks :user:`karec` for the PR.
- Backwards-incompatible: A apispec.exceptions.DuplicateParameterError is raised when two parameters with same name and location are passed to a path or an operation (:pr:`455`).
- Backwards-incompatible: A apispec.exceptions.InvalidParameterError is
raised when a parameter is missing required
name
andin
attributes after helpers have been executed (:pr:`455`).
Other changes:
- Backwards-incompatible: All plugin helpers must accept extra **kwargs (:issue:`453`).
- Backwards-incompatible: Components must be referenced by ID, not full path (:issue:`463`).
Bug fixes:
- marshmallow 3.0.0rc6 compatibility (:pr:`445`).
Bug fixes:
- Fix handling of OpenAPI v3 components content without schema in
MarshmallowPlugin
(:pr:`443`).
Bug fixes:
- Fix handling of http.HTTPStatus objects (:issue:`426`). Thanks :user:`DStape`.
- [apispec.ext.marshmallow]: Ensure make_schema_key returns a unique key on unhashable iterables (:pr:`416`, :pr:`439`). Thanks :user:`zedrdave`.
Features:
- [apispec.ext.marshmallow]: Use class hierarchy to infer
type
andformat
properties (:issue:`433`, :issue:`250`). Thanks :user:`andrjohn` for the PR.
Bug fixes:
- Fix error in
MarshmallowPlugin
when passingexclude
anddump_only
asclass Meta
attributes mixinglist
andtuple
(:pr:`431`). Thanks :user:`blagasz` for the PR.
Features:
Bug fixes:
- Fix behavior when using "2xx", 3xx", etc. for response keys (:issue:`422`). Thanks :user:`zachmullen` for reporting.
Bug fixes:
- Fix passing references for parameters/responses when using
MarshmallowPlugin
(:pr:`414`).
Features:
- Resolve
Schema
classes in response headers (:pr:`409`).
Features:
- Expanded support for OpenAPI Specification version 3 (:issue:`165`).
- Add
summary
anddescription
parameters toAPISpec.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`).
# <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 nestedSchema
are stored automatically. - Backwards-incompatible: The
extra_fields
argument of apispec.core.Components.schema is removed. All properties may be passed in thecomponent
argument.
# <1.0.0
spec.definition("Pet", schema=PetSchema, extra_fields={"discriminator": "name"})
# >=1.0.0
spec.components.schema("Pet", schema=PetSchema, component={"discriminator": "name"})
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 returnsNone
toapi.ext.MarshmallowPlugin
. - References now respect Schema modifiers, including
exclude
andpartial
. - Backwards-incompatible: A apispec.exceptions.DuplicateComponentNameError is raised when registering two components with the same name (:issue:`340`).
Features:
- Backwards-incompatible: basePath is not removed from paths anymore.
Paths passed to
APISpec.path
should not contain the application base path (:pr:`345`). - Add
apispec.ext.marshmallow.openapi.OpenAPIConverter.resolve_schema_class
(:pr:`346`). Thanks :user:`buxx`.
Features:
apispec.core.Components
is added. EachAPISpec
instance has aComponents
object used to define components such as schemas, parameters or reponses. "Components" is the OpenAPI v3 terminology for those reusable top-level objects.apispec.core.Components.parameter
andapispec.core.Components.response
are added.- Backwards-incompatible:
apispec.APISpec.add_path
andapispec.APISpec.add_tag
are renamed toapispec.APISpec.path
andapispec.APISpec.tag
. - Backwards-incompatible:
apispec.APISpec.definition
is moved to theComponents
class and renamed toapispec.core.Components.schema
.
# apispec<1.0.0b5 spec.add_tag({'name': 'Pet', 'description': 'Operations on pets'}) spec.add_path('/pets/', operations=...) spec.definition('Pet', properties=...) # apispec>=1.0.0b5 spec.tag({'name': 'Pet', 'description': 'Operations on pets'}) spec.path('/pets/', operations=...) spec.components.schema('Pet', properties=...)
- Plugins can define
parameter_helper
andresponse_helper
to modify parameter and response components definitions. MarshmallowPlugin
resolves schemas in parameters and responses components.- Components helpers may return
None
as a no-op rather than an empty dict (:pr:`336`).
Bug fixes:
MarshmallowPlugin.schema_helper
does not crash when no schema is passed (:pr:`336`).
Deprecations/Removals:
- The legacy
response_helper
feature is removed. The same can be achieved fromoperation_helper
.
- Backwards-incompatible:
apispec.ext.flask
,apispec.ext.bottle
, andapispec.ext.tornado
are moved to a separate package, apispec-webframeworks. (:issue:`302`).
If you use these plugins, install apispec-webframeworks
and
update your imports like so:
# apispec<1.0.0b4 from apispec.ext.flask import FlaskPlugin # apispec>=1.0.0b4 from apispec_webframeworks.flask import FlaskPlugin
Thanks :user:`ergo` for the suggestion and the PR.
Features:
- [apispec.core]: Backwards-incompatible:
openapi_version
parameter ofAPISpec
class does not default to '2.0' anymore andinfo
parameter is merged with**options
kwargs.
Bug fixes:
- [apispec.ext.marshmallow]: Exclude
load_only
fields when documenting responses (:issue:`119`). Thanks :user:`luisincrespo` for reporting. - [apispec.ext.marshmallow]: Exclude
dump_only
fields when documenting request body parameter schema.
- Drop deprecated plugin interface. Only plugin classes are now supported. This
includes the removal of
APISpec
'sregister_*_helper
methods, as well as itsschema_name_resolver
parameter. Also drop deprecatedapispec.utils.validate_swagger
. (:pr:`259`) - Use
yaml.safe_load
instead ofyaml.load
when reading docstrings (:issue:`278`). Thanks :user:`lbeaufort` for the suggestion and the PR.
Features:
- [apispec.core]: Backwards-incompatible: Remove Path class. Plugins' path_helper methods should now return a path as a string and optionally mutate the operations dictionary (:pr:`238`).
- [apispec.core]: Backwards-incompatible: YAML support is optional. To
install with YAML support, use
pip install 'apispec[yaml]'
. You will need to do this if you useFlaskPlugin
,BottlePlugin
, orTornadoPlugin
(:pr:`251`). - [apispec.ext.marshmallow]: Allow overriding the documentation for a field's default. This is especially useful for documenting callable defaults (:issue:`196`).
Features:
- [apispec.core]: Backwards-incompatible: Change plugin interface. Plugins are
now child classes of
apispec.BasePlugin
. Built-in plugins are still usable with the deprecated legacy interface. However, the new class interface is mandatory to pass parameters to plugins or to access specific methods that used to be accessed as module level functions (typically inapispec.ext.marshmallow.swagger
). Also,schema_name_resolver
is now a parameter ofapispec.ext.marshmallow.MarshmallowPlugin
. It can still be passed toAPISpec
while using the legacy interface. (:issue:`207`) - [apispec.core]: Backwards-incompatible:
APISpec.openapi_version
is now anapispec.utils.OpenAPIVersion
instance.
Features:
- [apispec.core]: Backwards-incompatible: Rename
apispec.utils.validate_swagger
toapispec.utils.validate_spec
andapispec.exceptions.SwaggerError
toapispec.exceptions.OpenAPIError
. Usingvalidate_swagger
will raise aDeprecationWarning
(:pr:`224`). - [apispec.core]:
apispec.utils.validate_spec
no longer relies on thecheck_api
NPM module.prance
andopenapi-spec-validator
are required for validation, and can be installed usingpip install 'apispec[validation]'
(:pr:`224`). - [apispec.core]: Deep update components instead of overwriting components for OpenAPI 3 (:pr:`222`). Thanks :user:`Guoli-Lyu`.
Bug fixes:
- [apispec.ext.marshmallow]: Fix description for parameters in OpenAPI 3 (:pr:`223`). Thanks again :user:`Guoli-Lyu`.
Other changes:
- Drop official support for Python 3.4. Only Python 2.7 and >=3.5 are supported.
Features:
- [apispec.ext.marshmallow]: Fix OpenAPI 3 conversion of schemas in parameters (:issue:`217`). Thanks :user:`Guoli-Lyu` for the PR.
Features:
- [apispec.ext.marshmallow]: Resolve an array of schema objects in parameters (:issue:`209`). Thanks :user:`cvlong` for reporting and implementing this.
Features:
- [apispec.ext.marshmallow]: Document
values
parameter ofDict
field asadditionalProperties
(:issue:`201`). Thanks :user:`UrKr`.
Features:
- [apispec.ext.marshmallow]: Recurse over properties when resolving schemas (:issue:`186`). Thanks :user:`lphuberdeau`.
- [apispec.ext.marshmallow]: Support
writeOnly
andnullable
in OpenAPI 3 (fall back tox-nullable
for OpenAPI 2) (:issue:`165`). Thanks :user:`lafrech`.
Bug fixes:
- [apispec.ext.marshmallow]: Always use field.missing instead of field.default when introspecting fields (:issue:`32`). Thanks :user:`lafrech`.
Other changes:
- [apispec.ext.marshmallow]: Refactor some of the internal functions in apispec.ext.marshmallow.swagger for consistent API (:issue:`199`). Thanks :user:`lafrech`.
Features:
- [apispec.core]: Maintain order in which methods are added to an endpoint (:issue:`189`). Thanks :user:`lafrech`.
Other changes:
- [apispec.core]: Path no longer inherits from dict (:issue:`190`). Thanks :user:`lafrech`.
Features:
- [apispec.ext.marshmallow]: Respect
data_key
argument on fields (in marshmallow 3). Thanks :user:`lafrech`.
Features:
- [apispec.ext.bottle]: Allow app to be passed to spec.add_path (:issue:`188`). Thanks :user:`dtaniwaki` for the PR.
Bug fixes:
- [apispec.ext.marshmallow]: Fix issue where "body" and "required" were
getting overwritten when passing a
Schema
to a parameter (:issue:`168`, :issue:`184`). Thanks :user:`dlopuch` and :user:`mathewmarcus` for reporting and thanks :user:`mathewmarcus` for the PR.
- [apispec.ext.marshmallow]: Use
dump_to
for name even ifload_from
does not match it (:issue:`178`). Thanks :user:`LeonAgmonNacht` for reporting and thanks :user:`lafrech` for the fix.
Features:
- [apispec.core]: Add
Spec.to_yaml
method for serializing to YAML (:issue:`161`). Thanks :user:`jd`.
Features:
- [apispec.core and apispec.ext.marshmallow]: Add limited support for OpenAPI v3. Pass openapi_version='3.0.0' to Spec to use it (:issue:`165`). Thanks :user:`Bangertm`.
Features:
- [apispec.core and apispec.ext.marshmallow]: Add schema_name_resolver param to APISpec for resolving ref names for marshmallow Schemas. This is useful when a self-referencing schema is nested within another schema (:issue:`167`). Thanks :user:`buxx` for the PR.
Bug fixes:
- [apispec.ext.flask]: Don't document view methods that aren't included
in
app.add_url_rule(..., methods=[...]))
(:issue:`173`). Thanks :user:`ukaratay`.
Features:
- [apispec.core]: Add
register_operation_helper
.
Bug fixes:
- Order of plugins does not matter (:issue:`136`).
Thanks :user:`yoichi` for these changes.
Features:
- [apispec.ext.marshmallow]: Generate "enum" property with single entry
when the
validate.Equal
validator is used (:issue:`155`). Thanks :user:`Bangertm` for the suggestion and PR.
Bug fixes:
- Allow OPTIONS to be documented (:issue:`162`). Thanks :user:`buxx` for the PR.
- Fix regression from 0.25.3 that caused a
KeyError
(:issue:`163`). Thanks :user:`yoichi`.
Bug fixes:
- [apispec.ext.marshmallow]: Fix swagger location mapping for
default_in
param in fields2parameters (:issue:`156`). Thanks :user:`decaz`.
Bug fixes:
- [apispec.ext.marshmallow]: Correctly handle multiple fields with
location=json
(:issue:`75`). Thanks :user:`shaicantor` for reporting and thanks :user:`yoichi` for the patch.
Bug fixes:
- [apispec.ext.marshmallow]: Avoid AttributeError when passing non-dict items to path objects (:issue:`151`). Thanks :user:`yoichi`.
Bug fixes:
- [apispec.ext.marshmallow]: Fix
use_instances
whenmany=True
is set (:issue:`148`). Thanks :user:`theirix`.
Features:
- [apispec.ext.marshmallow]: Add
use_instances
parameter tofields2paramters
(:issue:`144`). Thanks :user:`theirix`.
Other changes:
- Don't swallow
YAMLError
when YAML parsing fails (:issue:`135`). Thanks :user:`djanderson` for the suggestion and the PR.
Features:
- [apispec.ext.marshmallow]: Add
swagger.map_to_swagger_field
decorator to support custom field classes (:issue:`120`). Thanks :user:`frol` for the suggestion and thanks :user:`dradetsky` for the PR.
Bug fixes:
- [apispec.ext.marshmallow]: Fix swagger location mapping for
default_in
param in property2parameter (:issue:`142`). Thanks :user:`decaz`.
- Pass operations constructed by plugins to downstream marshmallow plugin (:issue:`138`). Thanks :user:`yoichi`.
- [apispec.ext.marshmallow] Generate parameter specification from marshmallow Schemas (:issue:`127`). Thanks :user:`ewalker11` for the suggestion thanks :user:`yoichi` for the PR.
- [apispec.ext.flask] Add support for Flask MethodViews (:issue:`85`, :issue:`125`). Thanks :user:`lafrech` and :user:`boosh` for the suggestion. Thanks :user:`djanderson` and :user:`yoichi` for the PRs.
- Release wheel distribution.
Bug fixes:
- [apispec.ext.marshmallow]: Properly handle callable
default
values in output spec (:issue:`131`). Thanks :user:`NightBlues`.
Bug fixes:
- [apispec.ext.marshmallow]: Include
default
in output spec whenFalse
is the default for aBoolean
field (:issue:`130`). Thanks :user:`nebularazer`.
Features:
- [apispec.ext.bottle] Added bottle plugin (:issue:`128`). Thanks :user:`lucasrc`.
Features:
- [apispec.ext.marshmallow] Sort list of required field names in generated spec (:issue:`124`). Thanks :user:`dradetsky`.
Bug fixes:
- [apispec.ext.tornado]: Fix compatibility with Tornado>=4.5.
- [apispec.ext.tornado]: Fix adding paths for handlers with coroutine methods in Python 2 (:issue:`99`).
Features:
- [apispec.core]: Definition helper functions receive the
definition
keyword argument, which is the current state of the definition (:issue:`122`). Thanks :user:`martinlatrille` for the PR.
Other changes:
- [apispec.ext.marshmallow] Backwards-incompatible: Remove
dump
parameter fromschema2parameters
,fields2parameters
, andfield2parameter
(:issue:`114`). Thanks :user:`lafrech` and :user:`frol` for the feedback and :user:`lafrech` for the PR.
Features:
- [apispec.core]: Add
extra_fields
parameter to APISpec.definition (:issue:`110`). Thanks :user:`lafrech` for the PR. - [apispec.ext.marshmallow]: Preserve the order of
choices
(:issue:`113`). Thanks :user:`frol` for the PR.
Bug fixes:
- [apispec.ext.marshmallow]: 'discriminator' is no longer valid as field metadata. It should be defined by passing
extra_fields={'discriminator': '...'}
to APISpec.definition. Thanks for reporting, :user:`lafrech`. - [apispec.ext.marshmallow]: Allow additional properties when translating
Nested
fields usingallOf
(:issue:`108`). Thanks :user:`lafrech` for the suggestion and the PR. - [apispec.ext.marshmallow]: Respect
dump_only
andload_only
specified inclass Meta
(:issue:`84`). Thanks :user:`lafrech` for the fix.
Other changes:
- Drop support for Python 3.3.
Features:
- [apispec.ext.marshmallow]: Translate
allow_none
onFields
tox-nullable
(:issue:`66`). Thanks :user:`lafrech`.
Bug fixes:
- [apispec.ext.marshmallow]: Fix corruption of
Schema._declared_fields
when serializing an APISpec (:issue:`107`). Thanks :user:`serebrov` for the catch and patch.
Bug fixes:
- [apispec.ext.marshmallow]: Fix behavior when passing Schema instances to APISpec.definition. The Schema's class will correctly be registered as a an available ref (:issue:`84`). Thanks :user:`lafrech` for reporting and for the PR.
Bug fixes:
- [apispec.ext.tornado]: Remove usage of
inspect.getargspec
for Python >= 3.3 (:issue:`102`). Thanks :user:`matijabesednik`.
Bug fixes:
- [apispec.ext.marshmallow]: Prevent unnecessary warning when generating specs for marshmallow Schema's with autogenerated fields (:issue:`95`). Thanks :user:`khorolets` reporting and for the PR.
- [apispec.ext.marshmallow]: Correctly translate
Length
validator to minItems and maxItems for array-type fields (Nested
andList
) (:issue:`97`). Thanks :user:`YuriHeupa` for reporting and for the PR.
Features:
- [apispec.ext.marshmallow]: Add support for properties that start with x-. Thanks :user:`martinlatrille` for the PR.
Features:
- [apispec.core]: Allow
description
to be passed toAPISpec.definition
(:issue:`93`). Thanks :user:`martinlatrille`.
Features:
- [apispec.ext.marshmallow]: Allow
'query'
to be passed as a field location (:issue:`89`). Thanks :user:`lafrech`.
Bug fixes:
- [apispec.ext.flask]: Properly strip off
basePath
whenAPPLICATION_ROOT
is set on a Flask app's config (:issue:`78`). Thanks :user:`deckar01` for reporting and :user:`asteinlein` for the PR.
Features:
- [apispec.core]: Maintain order in which paths are added to a spec (:issue:`87`). Thanks :user:`ranjanashish` for the PR.
- [apispec.ext.marshmallow]: Maintain order of fields when
ordered=True
on Schema. Thanks again :user:`ranjanashish`.
Features:
- [apispec.ext.marshmallow]: Add support for
Dict
field (:issue:`80`). Thanks :user:`ericb` for the PR. - [apispec.ext.marshmallow]:
dump_only
fields addreadOnly
flag in OpenAPI spec (:issue:`79`). Thanks :user:`itajaja` for the suggestion and PR.
Bug fixes:
- [apispec.ext.marshmallow]: Properly exclude nested dump-only fields from parameters (:issue:`82`). Thanks :user:`incognick` for the catch and patch.
Support:
- Update tasks.py for compatibility with invoke>=0.13.0.
Features:
- [apispec.ext.marshmallow]: Inspect validators to set additional attributes (:issue:`66`). Thanks :user:`deckar01` for the PR.
Bug fixes:
- [apispec.ext.marshmallow]: Respect
partial
parameters onSchemas
(:issue:`74`). Thanks :user:`incognick` for reporting.
Bug fixes:
- [apispec.ext.flask]: Flask plugin respects
APPLICATION_ROOT
from app's config (:issue:`69`). Thanks :user:`deckar01` for the catch and patch. - [apispec.ext.marshmallow]: Fix support for plural schema instances (:issue:`71`). Thanks again :user:`deckar01`.
Features:
- Support vendor extensions on paths (:issue:`65`). Thanks :user:`lucascosta` for the PR.
- Backwards-incompatible: Remove support for old versions (<=0.15.0) of webargs.
Bug fixes:
- Fix error message when plugin does not have a
setup()
function. - [apispec.ext.marshmallow] Fix bug in introspecting self-referencing marshmallow fields, i.e.
fields.Nested('self')
(:issue:`55`). Thanks :user:`whoiswes` for reporting. - [apispec.ext.marshmallow]
field2property
no longer pops offlocation
from a field's metadata (:issue:`67`).
Support:
- Lots of new docs, including a User Guide and improved extension docs.
Note: This version is a re-upload of 0.10.0. There is no 0.10.0 release on PyPI.
Features:
- Add Tornado extension (:issue:`62`).
Bug fixes:
- Compatibility fix with marshmallow>=2.7.0 (:issue:`64`).
- Fix bug that raised error for Swagger parameters that didn't include the
in
key (:issue:`63`).
Big thanks :user:`lucascosta` for all these changes.
Bug fixes:
- Fix generation of metadata for
Nested
fields (:issue:`61`). Thanks :user:`martinlatrille`.
Features:
- Add
APISpec.add_tags
method for adding Swagger tags. Thanks :user:`martinlatrille`.
Bug fixes:
- Fix bug in marshmallow extension where metadata was being lost when converting marshmallow
Schemas
whenmany=False
. Thanks again :user:`martinlatrille`.
Other changes:
- Remove duplicate
SWAGGER_VERSION
fromapi.ext.marshmallow.swagger
.
Support:
- Update docs to reflect rename of Swagger to OpenAPI.
Features:
apispec.ext.marshmallow.swagger.schema2jsonschema
properly introspectsSchema
instances whenmany=True
(:issue:`53`). Thanks :user:`frol` for the PR.
Bug fixes:
- Fix error reporting when an invalid object is passed to
schema2jsonschema
orschema2parameters
(:issue:`52`). Thanks again :user:`frol`.
Features:
APISpec.add_path
acceptsPath
objects (:issue:`49`). Thanks :user:`Trii` for the suggestion and the implementation.
Bug fixes:
- Use correct field name in "required" array when
load_from
anddump_to
are used (:issue:`48`). Thanks :user:`benbeadle` for the catch and patch.
Features:
- Add
APISpec#add_parameter
for adding common Swagger parameter objects. Thanks :user:`jta`. - The field name in a spec will be adjusted if a
Field's
load_from
anddump_to
attributes are the same. :issue:`43`. Thanks again :user:`jta`.
Bug fixes:
- Fix bug that caused a stack overflow when adding nested Schemas to an
APISpec
(:issue:`31`, :issue:`41`). Thanks :user:`alapshin` and :user:`itajaja` for reporting. Thanks :user:`itajaja` for the patch.
schema2jsonschema
andschema2parameters
can introspect a marshmallowSchema
instance as well as aSchema
class (:issue:`37`). Thanks :user:`frol`.- Backwards-incompatible: The first argument to
schema2jsonschema
andschema2parameters
was changed fromschema_cls
toschema
.
Bug fixes:
- Handle conflicting signatures for plugin helpers. Thanks :user:`AndrewPashkin` for the catch and patch.
- Skip dump-only fields when
dump=False
is passed toschema2parameters
andfields2parameters
. Thanks :user:`frol`.
Bug fixes:
- Raise
SwaggerError
whenvalidate_swagger
fails. Thanks :user:`frol`.
- Correctly pass
dump
parameter tofield2parameters
.
- Add
dump
parameter tofield2property
(:issue:`32`).
- Rename and repackage as "apispec".
- Support
enum
field of JSON Schema based onOneOf
andContainsOnly
validators.
- Add
schema2parameters
,fields2parameters
, andfield2parameters
. - Removed
Fixed
fromswagger.FIELD_MAPPING
for compatibility with marshmallow>=2.0.0.
- First release.